mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
prune: Add plausibility check
This commit is contained in:
parent
4c6b626db6
commit
d7e644272f
@ -179,6 +179,12 @@ func pruneRepository(gopts GlobalOptions, repo restic.Repository) error {
|
|||||||
}
|
}
|
||||||
bar.Done()
|
bar.Done()
|
||||||
|
|
||||||
|
if len(usedBlobs) > stats.blobs {
|
||||||
|
return errors.Fatalf("number of used blobs is larger than number of available blobs!\n" +
|
||||||
|
"Please report this error (along with the output of the 'prune' run) at\n" +
|
||||||
|
"https://github.com/restic/restic/issues/new")
|
||||||
|
}
|
||||||
|
|
||||||
Verbosef("found %d of %d data blobs still in use, removing %d blobs\n",
|
Verbosef("found %d of %d data blobs still in use, removing %d blobs\n",
|
||||||
len(usedBlobs), stats.blobs, stats.blobs-len(usedBlobs))
|
len(usedBlobs), stats.blobs, stats.blobs-len(usedBlobs))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user