[Borgbackup] Get know which files are damaged by: Data integrity error: Segment entry checksum mismatch

Marcin Zajączkowski mszpak at wp.pl
Tue Apr 2 18:46:24 EDT 2019


Thanks for your comprehensive explanations!

Marcin


On 2019-04-02 23:47, Thomas Waldmann wrote:
>> Changing a little bit my question, would I know after a repair operation
>> or while getting my files from the backup (also after a repair
>> operation) that those accessed files are corrupted?
>>
>> Or those files would be read as any other files, just having
>> occasionally some zeros inside?
> 
> If you try to extract stuff from a corrupt repo, you will get exceptions
> like ObjectNotFound or IntegrityError, so you'll definitely notice
> something is wrong.
> 
> borg check --repair tries to get a repo into a consistent state.
> 
> That doesn't mean that data which is lost can be magically brought back,
> but it will either delete corrupt archives or replace missing/corrupt
> content blocks in files by all-zero blocks of same size (and also it
> will remember the correct block hashes).
> 
> Repo objects that have invalid contents (invalid crc or invalid MAC)
> will be removed from the repo.
> 
> If you extract such a "zero-patched" file, borg will warn you about it.
> borg mount will reject reading such files, except when mounting with a
> special option.
> 
> If you do a backup again after such a repair that reproduces objects
> which were lost / corrupted and you run borg check --repair again
> afterwards, borg might be able to heal some "patched" files (because it
> notices that lost blocks are there again and it still knows the correct
> hash of the previously missing blocks).




More information about the Borgbackup mailing list