component: Add 'Snapshottable' component
This commit is contained in:
parent
1dac09bc03
commit
b6c36b5488
7 changed files with 28 additions and 13 deletions
|
|
@ -14,7 +14,7 @@ func (*SQL) BackupName() string {
|
|||
}
|
||||
|
||||
// Backup makes a backup of all SQL databases into the path dest.
|
||||
func (sql *SQL) Backup(context component.BackupContext) error {
|
||||
func (sql *SQL) Backup(context component.StagingContext) error {
|
||||
return context.AddFile("", func(file io.Writer) error {
|
||||
io := context.IO().Streams(file, nil, nil, 0).NonInteractive()
|
||||
code, err := sql.Stack(sql.Environment).Exec(io, "sql", "mysqldump", "--all-databases")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue