mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 22:22:27 +00:00
Merge pull request #5809 from elho/archive-check-progress
add progress indicator for archive check
This commit is contained in:
commit
cb0db339d3
1 changed files with 4 additions and 0 deletions
|
@ -1877,8 +1877,11 @@ def valid_item(obj):
|
||||||
return
|
return
|
||||||
num_archives = len(archive_infos)
|
num_archives = len(archive_infos)
|
||||||
|
|
||||||
|
pi = ProgressIndicatorPercent(total=num_archives, msg='Checking archives %3.1f%%', step=0.1,
|
||||||
|
msgid='check.rebuild_refcounts')
|
||||||
with cache_if_remote(self.repository) as repository:
|
with cache_if_remote(self.repository) as repository:
|
||||||
for i, info in enumerate(archive_infos):
|
for i, info in enumerate(archive_infos):
|
||||||
|
pi.show(i)
|
||||||
logger.info('Analyzing archive {} ({}/{})'.format(info.name, i + 1, num_archives))
|
logger.info('Analyzing archive {} ({}/{})'.format(info.name, i + 1, num_archives))
|
||||||
archive_id = info.id
|
archive_id = info.id
|
||||||
if archive_id not in self.chunks:
|
if archive_id not in self.chunks:
|
||||||
|
@ -1908,6 +1911,7 @@ def valid_item(obj):
|
||||||
cdata = self.key.encrypt(data)
|
cdata = self.key.encrypt(data)
|
||||||
add_reference(new_archive_id, len(data), len(cdata), cdata)
|
add_reference(new_archive_id, len(data), len(cdata), cdata)
|
||||||
self.manifest.archives[info.name] = (new_archive_id, info.ts)
|
self.manifest.archives[info.name] = (new_archive_id, info.ts)
|
||||||
|
pi.finish()
|
||||||
|
|
||||||
def orphan_chunks_check(self):
|
def orphan_chunks_check(self):
|
||||||
if self.check_all:
|
if self.check_all:
|
||||||
|
|
Loading…
Reference in a new issue