check: --find-lost-archives reuses the archive metadata ids found by --verify-data, fixes #8478 - #10447
Open
mr-raj12 wants to merge 3 commits into
Open
check: --find-lost-archives reuses the archive metadata ids found by --verify-data, fixes #8478#10447mr-raj12 wants to merge 3 commits into
mr-raj12 wants to merge 3 commits into
Conversation
…--verify-data, fixes borgbackup#8478
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10447 +/- ##
==========================================
+ Coverage 88.73% 88.86% +0.12%
==========================================
Files 103 103
Lines 19387 19405 +18
Branches 3023 3028 +5
==========================================
+ Hits 17204 17244 +40
+ Misses 1514 1495 -19
+ Partials 669 666 -3 ☔ View full report in Codecov by Harness. |
…corrupt archive meta report, clarify help
This was referenced Sep 28, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
borg check --verify-data --find-lost-archivesread every object twice: once inverify_dataand once inrebuild_archives_directoryto find the archive metadata objects.verify_datanow records the ids of the archive metadata objects it parses, including chunks that succeed on the--repairretry, inArchiveChecker.archive_meta_ids. If the pass is interrupted, the ids stayNone.If
archive_meta_idsis notNone,rebuild_archives_directoryreads only those objects. Otherwise it reads the meta dict (ro_type, without the data) of every object to find them.Behavior change: with
--verify-dataand without--repair, an archive metadata object that fails inverify_data(corrupted, or a transient read error) is reported only byverify_dataand not read again. The full scan no longer runs, so the extra "Skipping corrupted chunk" message is gone.error_foundis the same.Tests:
test_check_undelete_archivesandtest_spoofed_archiverun with and without--verify-data.verify_data, and chunks kept by the--repairretry.test_check_find_lost_archives_corrupt_archive_metachecks which step reports a corrupt archive metadata object, with and without--verify-data.rebuild_archives_directorytests cover an interrupted rebuild on both paths and skipping a corrupt, non-archive or invalid msgpack object fromarchive_meta_ids.fixes #8478
Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)