Need Help with Restic Backup Configuration

I’m currently using Restic for my backup needs, and I’m facing an issue with managing my snapshots effectively. I hope someone here can provide guidance or suggest a solution.

Every month, I download new files, save them to Restic, and delete them from my local drive. However, I’ve noticed that after a month, when I create a new snapshot, it seems to “forget” the old files, even though they were saved in the previous snapshot. Essentially, I want each new snapshot to include all files from previous snapshots as well as the new files for that month. If I can to view a “virtual” cumulative snapshot it will be helpful.

I’ve tried using the backup command with different flags, but it doesn’t seem to achieve the desired result. Are there specific flags or commands in Restic that I can use to maintain a cumulative snapshot of all files?

Thank you in advance for your help!

2 Likes

What you are observing is the expected behavior. The backup snapshots that are created when you back up your data using restic are points in time, where each point (snapshot) represent what the data set you backed up contained at that point. So if you remove a file in a folder and then run the backup again, then that snapshot will not contain that file, as it represents what the content of the folder was at the time you backed it up.

No, there isn’t, sorry. Restic is designed with a different use case than what you have in mind here.

The short summary is that what you are looking for is an archiving utility rather than a backup utility designed like restic and many other backup software. I believe rsync will be able to do what you want, although it’s not as focused on the concept of snapshots along a timeline. There’s also rclone which perhaps can do it, I’m not sure on the “not delete” part as I haven’t looked into it.

Actually I am using rclone today and the reason that I am looking for a new solution is that the backup became very large and most of the files are similar so I wanted to take advanced of the deduplication feature

Yeah, that makes sense. It’s the same with rclone, it won’t give you deduplication.

Either way, you cannot do what you want with restic, since the snapshots represent what the backup set looks like at the time of the backup run. If you want to archive data, you need an archiving utility rather than a backup utility.

Do you know such a tool?

try zpaq (but do test it first – especially the specific functionality you are asking for, though it does work that way if I recall correctly)

downside is that it puts everything in ONE FILE, which can become very fragile if your dataset is way too big. Again, I don’t have any personal experience of zpaq so I can’t say what is “too big” or how

For your archive, you could use a filesystem which supports deduplication. For example ZFS or BTRFS.

1 Like

Not off the top of my head. We’re looking at adding an option to restic to enable keeping files from the previous snapshot of the same backup set, which would then solve your need. However, this will happen in a future version, so right now this won’t help you.

Created a feature request here: Option to create cumulative snapshots · Issue #4804 · restic/restic · GitHub

1 Like