[Borgbackup] How to fix corrupted index or hints?

Thomas Waldmann tw at waldmann-edv.de
Tue Nov 29 05:12:07 EST 2022


Next time do not use --verify-data.

I guess it is not useful in this case and makes the check run take much 
longer.

> Remote: compacting segment 2000 with usage count -84 (maybe freeable: 
> 197.06% [276754300 bytes])

Your repo is still in a very weird state.

> Further the "rsync -a --delete backup/ repo/" did not help because the 
> cronjob for the rsync backup job with ~"rsync -a repo/ backup/" was not 
> disabled and created another remote copy :-/

I hope you still have a consistent, valid state of that repo somewhere.

Sounds a bit like your rsync activities are creating weird mixups?

> Any hints to proceed to get a writable repo again?

Get a valid repo files state at that place (either start from empty 
directory or do not forget the --delete option of rsync and do not have 
rsync jobs running in parallel), delete the repo index and the hints, 
run borg check --repair.

This should either rebuild index and hints and result in a valid, proven 
state or it proves that the repo state you have is very invalid and 
beyond repair.

> But I assume that borgs internal structure is comparable to git tree 
> which I do know.
We have docs, if you read them, you do not to jump to conclusions / 
assumptions.

> So can I reconstruct/rebuilt the repo, eg. by the new transfer command 
> of borg 2? Is there an alternative for borg 1.2?

borg2 transfer needs a borg 1.2 repo in good/valid state, thus it is not 
useful for your case.



More information about the Borgbackup mailing list