Skip to content

Commit

Permalink
Fix ordering of mysqldump
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Cameron <[email protected]>
  • Loading branch information
JasonLovesDoggo committed Nov 3, 2024
1 parent 92753fb commit 1833ce5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1833ce5

Please sign in to comment.