borg icon indicating copy to clipboard operation
borg copied to clipboard

borg2: check [--repair] improvements

Open ThomasWaldmann opened this issue 1 year ago • 1 comments

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.

ThomasWaldmann avatar Oct 08 '24 11:10 ThomasWaldmann

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.

ThomasWaldmann avatar Oct 10 '24 11:10 ThomasWaldmann