If i have multiple snapshots, and some of the snapshots contain the same exact files that are inside later snapshots, is there a way to prune all snapshots that have duplicate data, just keeping the snapshots that has changed files?
No it’s not and it’s also not necessary because restic deduplicates those files anyway so they only really exist once in the restic repository even though they appear in multiple snapshots. I hope that answers your question?
Ok nice…would be nice though to be able to shrink the number of snapshots from hundreds to only a few though if that where the case - but backup wise - no problem.
If what was the case? You mean to have files “archived” in your backup that you don’t have in your live system anymore? That would not be very practical as you’d have a hard time finding them in case you ever need them.
But you can use restic’s forget and prune functions to get rid of old snapshots while keeping some for longer. I usually use a slightly modified version of the forget and prune example in the documentation:
forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 75
Yep for archive use. If you know the filename, finding it is no issue. Right now i’m tagging key snapshots to keep them from being pruned.