diff --git a/internal/dis/component/sql/backup.go b/internal/dis/component/sql/backup.go index 9941d9d..c865c79 100644 --- a/internal/dis/component/sql/backup.go +++ b/internal/dis/component/sql/backup.go @@ -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.NonInteractive(scontext.Progress()), "sql", "mysqldump", "--all-databases")() + code := sql.Stack().Exec(ctx, stream.NewIOStream(file, scontext.Progress(), nil, 0), "sql", "mysqldump", "--all-databases")() if code != 0 { return errSQLBackup } diff --git a/internal/dis/component/sql/snapshot.go b/internal/dis/component/sql/snapshot.go index 310f6a2..0310db6 100644 --- a/internal/dis/component/sql/snapshot.go +++ b/internal/dis/component/sql/snapshot.go @@ -23,7 +23,7 @@ func (sql *SQL) Snapshot(wisski models.Instance, scontext component.StagingConte // SnapshotDB makes a backup of the sql database into dest. func (sql *SQL) SnapshotDB(ctx context.Context, progress io.Writer, dest io.Writer, database string) error { - code := sql.Stack().Exec(ctx, stream.NonInteractive(progress), "sql", "mysqldump", "--databases", database)() + code := sql.Stack().Exec(ctx, stream.NewIOStream(dest, progress, nil, 0), "sql", "mysqldump", "--databases", database)() if code != 0 { return errSQLBackup } diff --git a/internal/dis/component/sql/sql.go b/internal/dis/component/sql/sql.go index f4ab085..22f0113 100644 --- a/internal/dis/component/sql/sql.go +++ b/internal/dis/component/sql/sql.go @@ -7,7 +7,6 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/dis/component" "github.com/FAU-CDI/wisski-distillery/pkg/fsx" - "github.com/tkw1536/pkglib/lazy" ) type SQL struct { @@ -19,8 +18,6 @@ type SQL struct { ServerURL string // upstream server url PollInterval time.Duration // duration to wait for during wait - - lazyNetwork lazy.Lazy[string] } var (