1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 10:18:12 +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:
Thomas Waldmann 2018-04-28 21:03:08 +02:00
parent 9256e5c8b5
commit d671e9acf2

View file

@ -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).')