internal/dis/component/sql: Fix backup for mariadb

This commit is contained in:
Tom 2023-06-27 14:26:23 +02:00
parent 865959f530
commit b084e3673b
3 changed files with 10 additions and 2 deletions

View file

@ -18,7 +18,7 @@ func (*SQL) BackupName() string {
// Backup makes a backup of all SQL databases into the path dest.
func (sql *SQL) Backup(scontext *component.StagingContext) error {
return scontext.AddFile("", func(ctx context.Context, file io.Writer) error {
code := sql.Stack().Exec(ctx, stream.NewIOStream(file, scontext.Progress(), nil, 0), "sql", "mysqldump", "--all-databases")()
code := sql.Stack().Exec(ctx, stream.NewIOStream(file, scontext.Progress(), nil, 0), "sql", SQlDumpExecutable, "--all-databases")()
if code != 0 {
return errSQLBackup
}