1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-03 05:35:58 +00:00

ArchiveChecker: .rebuild_refcounts -> .rebuild_archives

This commit is contained in:
Thomas Waldmann 2024-08-29 15:43:32 +02:00
parent 266e6caa80
commit e9c42a7d6b
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -1645,7 +1645,7 @@ def check(
if not isinstance(repository, (Repository, RemoteRepository)):
del self.chunks[Manifest.MANIFEST_ID]
self.manifest = self.rebuild_manifest()
self.rebuild_refcounts(
self.rebuild_archives(
match=match, first=first, last=last, sort_by=sort_by, older=older, oldest=oldest, newer=newer, newest=newest
)
self.finish()
@ -1830,13 +1830,10 @@ def valid_archive(obj):
logger.info("Manifest rebuild complete.")
return manifest
def rebuild_refcounts(
def rebuild_archives(
self, first=0, last=0, sort_by="", match=None, older=None, newer=None, oldest=None, newest=None
):
"""Rebuild object reference counts by walking the metadata
Missing and/or incorrect data is repaired when detected
"""
"""Analyze and rebuild archives, expecting some damage and trying to make stuff consistent again."""
# Exclude the manifest from chunks (manifest entry might be already deleted from self.chunks)
if not isinstance(self.repository, (Repository, RemoteRepository)):
self.chunks.pop(Manifest.MANIFEST_ID, None)
@ -2044,7 +2041,7 @@ def valid_item(obj):
num_archives = len(archive_infos)
pi = ProgressIndicatorPercent(
total=num_archives, msg="Checking archives %3.1f%%", step=0.1, msgid="check.rebuild_refcounts"
total=num_archives, msg="Checking archives %3.1f%%", step=0.1, msgid="check.rebuild_archives"
)
with cache_if_remote(self.repository) as repository:
for i, info in enumerate(archive_infos):