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

Thomas Waldmann tw at waldmann-edv.de
Tue Apr 2 17:47:48 EDT 2019


> 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).

-- 

GPG ID: 9F88FB52FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393


More information about the Borgbackup mailing list