From d0ec7e76bb36ffd4fce005c144c2f2c4c4080e3b Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Thu, 28 Jul 2016 18:41:08 +0200 Subject: [PATCH] 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. --- src/borg/archive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index f19ba9793..0efb1a6a3 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -909,6 +909,8 @@ class ArchiveChecker: self.repository = repository self.init_chunks() self.key = self.identify_key(repository) + if verify_data: + self.verify_data() if Manifest.MANIFEST_ID not in self.chunks: logger.error("Repository manifest not found!") self.error_found = True @@ -916,8 +918,6 @@ class ArchiveChecker: else: self.manifest, _ = Manifest.load(repository, key=self.key) self.rebuild_refcounts(archive=archive, last=last, prefix=prefix) - if verify_data: - self.verify_data() self.orphan_chunks_check() self.finish(save_space=save_space) if self.error_found: