Pruning of revisions retention command

I am confused by the pruning -keep commands.

I am doing daily backups.

I want the following retention of revisions:
Daily for 30 days
Monthly for 12 months
Annually forever

Would the command be this?:
-keep 365:365 -keep 30:30 -keep 1:1 -a

Thanks

Yes

Thanks, so if I wanted to limit annual to last 5 years would the command be this: keep 0:1825 -keep 365:365 -keep 30:30 -a

I’m trusting google LLM on this so wary of it’s response - is that trustworthy? as I really cannot get my head round how this works!

It’s pretty simple.

Prune deletes all revisions except keeping some if there is a matching keep rule

Rules are checked left to right and first matching is used. That’s why you have to sort them.

-keep 123:456 will match specific revision being tested if it is older than 456 days. The effect of this rule will be deletion of all revisions older than 456 days, except keeping one every 123 days.

If any specific revision is newer than 456 days — this specific keep rule won’t affect it and the next keep rule will be tested. If no keep rules march - nothing is done.

That’s it. Pretty straightforward, no magic.