fix snapshot taking
This commit is contained in:
parent
2bf1227ee6
commit
413373622f
12
app.go
12
app.go
@ -456,12 +456,8 @@ func (a AppConfig) TakeSnapshot(schedule string) error {
|
||||
}
|
||||
|
||||
takeSnapshot := make(map[string]string)
|
||||
delSnapshot := make(map[string]string)
|
||||
for _, v := range a.Sources {
|
||||
takeSnapshot[v.Box()] = takeSnapshot[v.Box()] + " " + v.Path()
|
||||
for _, v2 := range a.Destinations {
|
||||
delSnapshot[v2.Box()] = delSnapshot[v2.Box()] + " " + v2.Path() + "/" + v.Box() + "/" + v.Path()
|
||||
}
|
||||
}
|
||||
for k, v := range takeSnapshot {
|
||||
if *debugFlag {
|
||||
@ -642,6 +638,14 @@ func (a AppConfig) RunAppBackup() error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
err = a.TakeSnapshot(schedule)
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.RunAppBackup : %s : TakeSnapshot : %s", a.Name, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err = a.RefreshSnapshot()
|
||||
|
Loading…
Reference in New Issue
Block a user