Pruning/Retention policy

Greetings,

I hate to be “that guy” when I know this has been covered several times but I’m hoping that someone more well versed in Duplicacy’s pruning system could glance at my config and confirm if its going to act the way I expect.

I’m switching from Duplicati after several issues and, for my use case at least, have always felt like their “Smart Backup Retention” policy fit my needs just fine so I’m trying to roughly mimic that in Duplicacy with my own twist. Here’s what I’ve come up with:

-keep 0:1095 -keep 365:365 -keep 30:35 -keep 7:8

I typically run my backups nightly and some jobs only run one or two nights a week. In my head this policy should remove all backups older than 3 years, keep one yearly backup for each of the last 3 years, keep 1 monthly backup for the previous year, keep weekly backups for the previous 5 weeks, and I’ll have my daily or however frequenly run backups for the previous week.

If someone has suggestions for improving my retention times please let me know what you’d change. I’m always open to improvements!

Thanks in advance

Should not it end with 7, not 8?

You want keep weekly backups for those older than 7 up to 35 days, no?

If this timing already proven to work for you — keep using it. My retention policy used to be “ -keep 31:360 -keep 7:90 -keep 1:14 -all” — for the same reason, it worked for me. Now I do daily backups and don’t prune: because a) Storage is cheap, no reason to delete anything.b) duplicacy deduplicates well, so there are no significant savings either

Yes it should end in 7, not 8. Not sure what I was thinking there!

I wanted to make this post because I feel like I’m not processing this right in my mind, my numbers all match or very closely match each other (- keep 365:365, etc…) but all the examples I find look more like your old policy. I have to wonder if there’s a more efficient or proper way to achieve the same goal.

So essentially your old policy kept all backups that were run for 14 days, daily backups for 14-90 days, weekly backups for 90 days - 1 year, and monthly backups for forever. Am I reading that right?

Yes. One way to think about it, duplicacy checks age of file against keep rules from let to right, until it matches; and each rule means “keep one file every so many days (first number) if it’s older than specified number of days (second number).

A post was merged into an existing topic: Duplicacy prune -keep-max PR submitted today