And yet more prune confusion

I’ve read the command docs here:

As well as various threads tagged with “prune” which ask similar questions:

I believe I understand the algorithm used by the command when executed, however I’m struggling to create a command that reflects what I actually want.

I continually run duplicacy every 6 hours and want to keep everything for the last week (days 0-7), one per day for the remainder of the next two months (days 8-60), one per week for the rest of the year (days 61-360) and then one per year indefinitely. I don’t need these collections to be precise, just regular.

I’ve gotten this so far:

duplicacy prune -keep 365:365 -keep 7:60 -keep 1:7

I think I have the last two clauses right, but am struggling with the first one (one per year indefinitely).

Any thoughts welcome!

1 Like

At least to me, your prune command appears to be (roughly) consistent with your description of the desired pruning behavior.

-keep 365:365 should keep 1 snapshot every 365 days, for snapshots older than 365 days – which sounds like it meets the “one per year indefinitely” requirement.

1 Like

It probably doesn’t matter for you but for the sake of accuracy: you said

so that means one snapshot per year for snapshots older than 360 days which translates to -keep 365:360 :nerd_face: