You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently (beta12), borg2 check just deletes the chunks index cached in the repo. This is because borg check --repair might have deleted some invalid repo objects, thus the cached chunks index is not uptodate anymore. After that, first access to the repo will rebuild the chunks index cache (slow).
Guess we could just build and cache a new chunks index within borg check --repair and maybe also in borg check without --repair.
It builds a ChunkIndex in the repository part of the check (for close to zero addtl. cost) and reuses it in the archives part (saving the slow rebuild there we had before).
After the archives part, it still kills the ChunkIndex and triggers another rebuild by next operation though.
Have raised draft PR #10379 for this, now finish() of check --repair re-reads only the packs written by the repair instead of all packs, kindly have a look once #10368 is merged.
check --repair writes the resulting index back to the repo and clears the invalid marker, so the next command does not rebuild it.
Without --repair, borg check uses the stored index and does not rebuild it from the packs. With --repair, it walks all packs once. It needs to do that to find archives that reference chunks in missing packs.
Avoiding unnecessary index rebuilds in other commands is tracked in #8476.
Activity
ThomasWaldmann commentedon Oct 10, 2024
Some improvements were done in #8468:
It builds a ChunkIndex in the repository part of the check (for close to zero addtl. cost) and reuses it in the archives part (saving the slow rebuild there we had before).
After the archives part, it still kills the ChunkIndex and triggers another rebuild by next operation though.
17 remaining items
check --repair: re-read only the packs the repair wrote, refs borgbac…
mr-raj12 commentedon Sep 16, 2026
Have raised draft PR #10379 for this, now finish() of check --repair re-reads only the packs written by the repair instead of all packs, kindly have a look once #10368 is merged.
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: verify the written packs in two passes, refs borgback…
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: verify the written packs in two passes, refs borgback…
check --repair: re-read only the packs the repair wrote, refs borgbac…
check --repair: verify the written packs in two passes, refs borgback…
Merge pull request #10379 from mr-raj12/check-finish-narrow-walk-8466
ThomasWaldmann commentedon Oct 5, 2026
This is done on master:
borg checkshare one chunks index, so a check no longer builds it twice.check --repairre-reads only the packs the repair wrote infinish(), not all packs.check --repairrebuilds a corrupt index only once, not twice.check --repairwrites the resulting index back to the repo and clears the invalid marker, so the next command does not rebuild it.Without
--repair,borg checkuses the stored index and does not rebuild it from the packs. With--repair, it walks all packs once. It needs to do that to find archives that reference chunks in missing packs.Avoiding unnecessary index rebuilds in other commands is tracked in #8476.