mirror of https://github.com/borgbackup/borg.git
Fix borg-check --verify-data failing with rebuilt objects
There are some instances where --repair would do something. In these instances --verify-data would fail if --repair was not given also, since the changes without --repair are only in the index, but not in the repository.
This commit is contained in:
parent
1b6b0cfae6
commit
d0ec7e76bb
|
@ -909,6 +909,8 @@ class ArchiveChecker:
|
||||||
self.repository = repository
|
self.repository = repository
|
||||||
self.init_chunks()
|
self.init_chunks()
|
||||||
self.key = self.identify_key(repository)
|
self.key = self.identify_key(repository)
|
||||||
|
if verify_data:
|
||||||
|
self.verify_data()
|
||||||
if Manifest.MANIFEST_ID not in self.chunks:
|
if Manifest.MANIFEST_ID not in self.chunks:
|
||||||
logger.error("Repository manifest not found!")
|
logger.error("Repository manifest not found!")
|
||||||
self.error_found = True
|
self.error_found = True
|
||||||
|
@ -916,8 +918,6 @@ class ArchiveChecker:
|
||||||
else:
|
else:
|
||||||
self.manifest, _ = Manifest.load(repository, key=self.key)
|
self.manifest, _ = Manifest.load(repository, key=self.key)
|
||||||
self.rebuild_refcounts(archive=archive, last=last, prefix=prefix)
|
self.rebuild_refcounts(archive=archive, last=last, prefix=prefix)
|
||||||
if verify_data:
|
|
||||||
self.verify_data()
|
|
||||||
self.orphan_chunks_check()
|
self.orphan_chunks_check()
|
||||||
self.finish(save_space=save_space)
|
self.finish(save_space=save_space)
|
||||||
if self.error_found:
|
if self.error_found:
|
||||||
|
|
Loading…
Reference in New Issue