From 1833ce58cf54cb68e555bf1a2974ea0a9cd120e2 Mon Sep 17 00:00:00 2001 From: Jason Cameron Date: Sun, 3 Nov 2024 01:34:50 -0500 Subject: [PATCH] Fix ordering of mysqldump Signed-off-by: Jason Cameron --- handlers/mysql.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/mysql.go b/handlers/mysql.go index caf9a63..0eab015 100644 --- a/handlers/mysql.go +++ b/handlers/mysql.go @@ -25,13 +25,13 @@ func (h *MySQLHandler) Backup(ctx context.Context) (string, error) { filename := filepath.Join(h.tempDir, fmt.Sprintf("mysql_%s.sql", timestamp)) cmd := exec.CommandContext(ctx, "mysqldump", "--single-transaction", + "--quick", + "--result-file=", filename, "-h", config.Cfg.MySQL.Host, "-P", config.Cfg.MySQL.Port, "-u", config.Cfg.MySQL.User, fmt.Sprintf("-p%s", config.Cfg.MySQL.Password), - config.Cfg.MySQL.Database, - "--quick", - "-r ", filename) + config.Cfg.MySQL.Database) output, err := cmd.Output() if err != nil {