Q: about bad chunks #7912
-
my friend in the UK has this Q....
we plan to do periodic checks of our backups to detect if they become corrupt, we do nightly short self test and the long test once a month, and before a drive is put in to service we test the entire disk for bad blocks and the smart self test, i dont think we can do much more as drives are concerned... is that somewhat a corect view? as for the memory we plan to do memtest every 6 months... and while that runs we check the drives again for bad blocks we use mergerfs and it seems that in some edge cases where disks are near full can interrupt a backup in a way that is not desired, so as an experiment we have reduced the chunk size to be max 100mb internet connection could also somewhat have a say if the connection is broken at the wrong point but... lets say we get a bad chunk but data access is still good, what is the best way to move forward? do a check with --repair, then add another backup and do a another check? and is it possible to know what files are affected by a bad chunk if there are no access to the data? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
if you then do another backup and that backup creates the missing chunk again, the next
you're doing quite a lot to make sure your hw works ok. asking myself whether you might like i can't say anything about mergerfs, never used it myself. but i can say that a correctly and reliably working fs is essential for a borg repository. if a borg backup gets interrupted in the middle (machine crash or breakdown of borg client/server ssh connection), usually nothing really bad should happen: the next time you start borg, it will notice the incomplete transaction and roll back to last consistent state. |
Beta Was this translation helpful? Give feedback.
borg check
(repository part) might find defect chunks based on a crc32 mismatch - in such a case it will tell you the chunkid and the segment/offset where it happened.borg check
(archives part) will read all archives and check whether all referred chunks exist - if you add--verify-data
it will also do a cryptographic verification of the chunk contents (which is much slower, but more thorough).borg check --repair
will delete defect chunks and change all references to them to refer to all-zero replacement chunks of same size. it will still remember the chunkid of the correct/missing chunk inside the archive metadata.if you then do another backup and that backup creates the missing chunk…