forked from TrueCloudLab/restic
rewrite: log snapshot saved before removal of the old snapshot
The snapshot was already saved before removing the old snapshot. Only the log messages were printed in the wrong order.
This commit is contained in:
parent
913eab3361
commit
09cddb8927
1 changed files with 1 additions and 1 deletions
|
@ -136,6 +136,7 @@ func rewriteSnapshot(ctx context.Context, repo *repository.Repository, sn *resti
|
|||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
Verbosef("saved new snapshot %v\n", id.Str())
|
||||
|
||||
if opts.Forget {
|
||||
h := restic.Handle{Type: restic.SnapshotFile, Name: sn.ID().String()}
|
||||
|
@ -145,7 +146,6 @@ func rewriteSnapshot(ctx context.Context, repo *repository.Repository, sn *resti
|
|||
debug.Log("removed old snapshot %v", sn.ID())
|
||||
Verbosef("removed old snapshot %v\n", sn.ID().Str())
|
||||
}
|
||||
Verbosef("saved new snapshot %v\n", id.Str())
|
||||
return true, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue