The Repository.check() method in src/borg/repository.py (line 319) has an existing TODO comment for a progress indicator, but it has not been implemented.
For large repositories, the repository check loop iterates over all data objects, loading and verifying checksums for each one. This can take many hours with no user-visible progress output - only a raw key checkpoint is logged every 5 minutes (line 390-392).
ProgressIndicatorPercent is already used in several other places in the codebase (compact_cmd.py, archive.py, analyze_cmd.py), so the pattern is well established.
Proposed change
Add a ProgressIndicatorPercent to the check() loop in Repository, showing the user a percentage/count as objects are verified. The total object count could be obtained via store.list() or a pre-count step.
Related
The
Repository.check()method insrc/borg/repository.py(line 319) has an existing TODO comment for a progress indicator, but it has not been implemented.For large repositories, the repository check loop iterates over all data objects, loading and verifying checksums for each one. This can take many hours with no user-visible progress output - only a raw key checkpoint is logged every 5 minutes (line 390-392).
ProgressIndicatorPercentis already used in several other places in the codebase (compact_cmd.py,archive.py,analyze_cmd.py), so the pattern is well established.Proposed change
Add a
ProgressIndicatorPercentto thecheck()loop inRepository, showing the user a percentage/count as objects are verified. The total object count could be obtained viastore.list()or a pre-count step.Related
# TODO: progress indicator, ...atsrc/borg/repository.py:319Remote: checking segment file /whatever/data/17/17078...#8009 - similar request for segment check progress (borg 1.x)