2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-03 17:40:53 +00:00

Fix message display for parent snapshot id

This commit is contained in:
Alexander Neumann 2015-07-25 18:09:38 +02:00
parent 5cdcc99eba
commit 054256468b

View File

@ -276,20 +276,22 @@ func (cmd CmdBackup) Execute(args []string) error {
} }
parentSnapshotID = &id parentSnapshotID = &id
cmd.global.Verbosef("found parent snapshot %v\n", parentSnapshotID.Str())
} }
// Find last snapshot to set it as parent, if not already set // Find last snapshot to set it as parent, if not already set
if !cmd.Force && parentSnapshotID == nil { if !cmd.Force && parentSnapshotID == nil {
id, err := findLatestSnapshot(repo, target) id, err := findLatestSnapshot(repo, target)
if err == nil { if err == nil {
cmd.global.Verbosef("using parent snapshot %v\n", parentSnapshotID)
parentSnapshotID = &id parentSnapshotID = &id
} else if err != errNoSnapshotFound { } else if err != errNoSnapshotFound {
return err return err
} }
} }
if parentSnapshotID != nil {
cmd.global.Verbosef("using parent snapshot %v\n", parentSnapshotID.Str())
}
cmd.global.Verbosef("scan %v\n", target) cmd.global.Verbosef("scan %v\n", target)
selectFilter := func(item string, fi os.FileInfo) bool { selectFilter := func(item string, fi os.FileInfo) bool {