borg check: show progress while rebuilding missing manifest, fixes #3787

This commit is contained in:
Thomas Waldmann 2018-04-28 19:12:01 +02:00
parent 6366502afa
commit 85bc590c75
1 changed files with 4 additions and 0 deletions

View File

@ -1318,7 +1318,10 @@ class ArchiveChecker:
# within this repository (assuming that newer borg versions support more item keys).
manifest = Manifest(self.key, self.repository)
archive_keys_serialized = [msgpack.packb(name.encode()) for name in ARCHIVE_KEYS]
pi = ProgressIndicatorPercent(total=len(self.chunks), msg="Rebuilding manifest %6.2f%%", step=0.01,
msgid='check.rebuild_manifest')
for chunk_id, _ in self.chunks.iteritems():
pi.show()
cdata = self.repository.get(chunk_id)
try:
data = self.key.decrypt(chunk_id, cdata)
@ -1350,6 +1353,7 @@ class ArchiveChecker:
logger.warning('Duplicate archive name %s, storing as %s', name, new_name)
name = new_name
manifest.archives[name] = (chunk_id, archive.time)
pi.finish()
logger.info('Manifest rebuild complete.')
return manifest