Is it possible to cause restic to error if a file changes during backup?

Based on What happens if file changes during backup?, I understand that if a file changes during a backup it can end up in an inconsistent state. My question is, is there any way to tell restic to either 1) retry the file, 2) skip that specific file, ie just leave the previous version in the repo, or 3) fail the backup entirely in this case?

I’m planning a system with some basic daily/weekly/monthly/yearly snapshots and if a file (or even the whole backup) gets missed on a given day that might not be a big problem, but restoring a corrupted file would be.

Nope it is not possible. And it applies to all backup systems.

Solution is to use file system snapshots - you can do this nowadays on pretty much all systems - definitely Windows, macOS and Linux.

Simply you take file system snapshots and run snapshot backup.


Yeah based on the research I’ve done since asking the question, snapshots indeed seem to be a good solution. Thanks!

@kapitainsky, do you happen to know if there’s a way to take snapshot on Windows for WSL2 distros?

Sorry - but I have no idea. Never used WSL2

1 Like