mirror of https://github.com/restic/restic.git
restic diff, stats, tag - more command which vannot handle partial snapshots
inserted check for partial snapshots
This commit is contained in:
parent
1873780d41
commit
be6a144503
|
@ -74,6 +74,10 @@ func loadSnapshot(ctx context.Context, be restic.Lister, repo restic.LoaderUnpac
|
|||
if err != nil {
|
||||
return nil, "", errors.Fatal(err.Error())
|
||||
}
|
||||
err = checkPartialSnapshot(sn, "fatal", "diff")
|
||||
if err != nil {
|
||||
return sn, "", err
|
||||
}
|
||||
return sn, subfolder, err
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,10 @@ func runStats(ctx context.Context, opts StatsOptions, gopts GlobalOptions, args
|
|||
}
|
||||
|
||||
for sn := range FindFilteredSnapshots(ctx, snapshotLister, repo, &opts.SnapshotFilter, args) {
|
||||
err = checkPartialSnapshot(sn, "fatal", "stats")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = statsWalkSnapshot(ctx, sn, repo, opts, stats)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error walking snapshot: %v", err)
|
||||
|
|
|
@ -157,6 +157,10 @@ func runTag(ctx context.Context, opts TagOptions, gopts GlobalOptions, term *ter
|
|||
}
|
||||
|
||||
for sn := range FindFilteredSnapshots(ctx, repo, repo, &opts.SnapshotFilter, args) {
|
||||
err := checkPartialSnapshot(sn, "fatal", "tag")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
changed, err := changeTags(ctx, repo, sn, opts.SetTags.Flatten(), opts.AddTags.Flatten(), opts.RemoveTags.Flatten(), printFunc)
|
||||
if err != nil {
|
||||
Warnf("unable to modify the tags for snapshot ID %q, ignoring: %v\n", sn.ID(), err)
|
||||
|
|
Loading…
Reference in New Issue