I’ve been using Restic 0.7.3 for a while and actually wanted to ask what happens when a snapshot file is removed in time. See, I’ve been trying to automatically synchronize the whole backup folder using Google Drive and it keeps telling me that a file has been removed (I guess locally), and asks What do you want to do? Remove or restore it. As I don’t understand how these files live their lives, I’m puzzled what choice to make, so I keep choosing Remove.
I’d love to hear some details so I know in the future whether it is safe to choose Remove or it doesn’t really matter if I by mistake choose to Restore. Will it ruin the local backup or not?
Basically, the files in a restic repo are “write-only”, which means that whenever there’s new data to be written, a new file is created. Files are never changed. The other side is that whenever you run restic forget and restic prune, it’ll reorganize the files, delete old ones and create new ones. So in your case I guess that you ran restic forget locally, so some files in the snapshots folder were removed. That’s normal and expected. When you run restic prune, it’ll also remove files in the data and index folders.
So, overall if you run forget and prune locally, removed files are normal and to be expected, the right option here seems to be “Remove”.
When you don’t run prune, the only directory that sees files removed is the locks directory. Can you check the next time it pops up if the file comes from that directory? For lock files, you can click “Remove” in that dialogue.