Any way I can get Restic to auto scan and notify me the first time there’s a Pack ID mismatch error? Or do I have to manually run “check –read-data”?
Is there a way to do this with a script? (I’m a newbie and know nothing about scripting). I want Restic to auto scan every new snapshot with the “check --read-data” command, and notify me if it finds an error.
Recently I discovered one of my repos was for a long time riddled with fatal Pack ID mismatch errors. So I submitted a feature request for the devs to come up with some way to auto check and notify the user the first time a Pack ID mismatch error occurs.
I must say I think you are overcomplicating this. Sure, you can run
check --read-data after every backup, but that seems very overkill. If you feel that you have to do this, you have a different problem to solve. In this/your case it is that the disk you store your backups on is not acting properly. As has been mention in the other thread you opened, there’s presumably issues with the storage, making the files restic create become corrupt. That is what you should solve, instead of doing some workarounds. Don’t store your backups on untrustworthy media
Good point. Thanks. I used to use SpinRite to check my drives but now it’s very very slow on large drives. I’m eagerly waiting for SpinRite 6.1. In the meantime, do you know of any fast disk surface scan/repair tools? Thanks.
After some quick googling, looks like this may work: Hard Disk Sentinel - Free Linux version
You really shouldn’t need to use that type of tool more than occasionally. Why don’t you just get a disk that doesn’t fail on you? I may be misunderstanding you, but it seems like currently you are running on a non-working disk and intending to fix the corruption as you go. Kind of seems like a recipe for disaster
I would encourage considering an offsite storage instead. Personally I use rest-server with block storage at Hetzner and my other hosting, but a lot of people use S3, Backblaze B2, Wasabi, etc.