Forgetting snapshots based on tag

It seems the policy for forgetting snapshots using keep is based on a combination between host and paths. IOW, restic groups snapshots based on host+paths. If the path+host are the same, they’re considered in the group.

Because I tend to add files to my include file, the paths will actually grow, and suddenly forget will not be forgetting everything I would like it to forget.

I’ve also start to tag my backups. I tag my normal big backup as full and tag my cronjob backup as cronjob (@daily crontab -l | fish --command 'restic backup --stdin --tag crontab' if you must know).

Would be possible to consider treating a group of snapshot based solely on the tag as opposed to host+paths ? This way it doesn’t matter if I end up adding things to my paths via the include file, things will be grouped and forgotten/kept based on tag. Or is this possible already? I tried using the --tag switch and it did not have the intended behavior

OK, well, this is what the --group-by was for :joy:

Glad you figured it out by yourself, I’ve marked your second post as the solution :slight_smile:

1 Like

I didn’t know about the --group-by feature. Great!

I created a tool for managing the automatic purge of Restic backups based on time and retention policies. Maybe you can make a good use of it…

For different folders with different retention policies we should launch different utility containers…