mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 17:57:59 +00:00
borg check: fixup for "deleting orphaned objs" msgs, fixes #3795
only output msgs if there is actually something to delete. be more precise, show count of orphaned / superseded objects.
This commit is contained in:
parent
9256e5c8b5
commit
d671e9acf2
1 changed files with 4 additions and 3 deletions
|
@ -1585,11 +1585,12 @@ def orphan_chunks_check(self):
|
|||
if orphaned:
|
||||
logger.error('{} orphaned objects found!'.format(len(orphaned)))
|
||||
self.error_found = True
|
||||
if self.repair:
|
||||
logger.info('Deleting orphaned objects...')
|
||||
if self.repair and unused:
|
||||
logger.info('Deleting %d orphaned and %d superseded objects...' % (
|
||||
len(orphaned), len(self.possibly_superseded)))
|
||||
for id_ in unused:
|
||||
self.repository.delete(id_)
|
||||
logger.info('Finished deleting orphaned objects.')
|
||||
logger.info('Finished deleting orphaned/superseded objects.')
|
||||
else:
|
||||
logger.info('Orphaned objects check skipped (needs all archives checked).')
|
||||
|
||||
|
|
Loading…
Reference in a new issue