Prune rules correctly encoded?

This is what I want to achieve:

Keep a snapshot every

  • none older than 360 days
  • 30 days for snapshots older than 180 days (monthly after 6 months)
  • 7 days for snapshots older than 30 days (weekly after 1 month up to 6 months)
  • 1 day for snapshots older than 7 days (daily after 1 week for up to 4 weeks)

duplicacy prune -keep 0:360 -keep 30:180 -keep 7:30 -keep 1:7

Is this encoding correct? I’m not totally sure…

Yep, seems correct. The manual contains example of almost verbatim your configuration :slight_smile:

1 Like

Ok.

And for snapshots newer than 7 days it keeps every snapshot? So I have daily snapshots for 1 week, and 4 weekly snapshots per month etc.

And for snapshots newer than 7 days it keeps every snapshot?

Yes, that’s right.

So I have daily snapshots for 1 week, and 4 weekly snapshots per month etc.

Depending how often do you run backup. If ran hourly, like I do, you would end up with hourly snapshots spanning up to a weak in the past, and then daily snapshots, etc.

In other words it won’t touch snapshots younger than the smallest m in ( -keep n:m) in the sequence

1 Like

Ah, the last point is the important one. IMO should be added to the docs, because that’s not clear.

Hourly snapshots? Wow… you end up with quite some stuff… but better save than not.