diff --git a/app.go b/app.go index 60f8df5..859c0f6 100644 --- a/app.go +++ b/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()