Help needed with prune

Hi all,

I’m new to Duplicacy and wondering if someone can help me out with the prune option.

I backup once a day and I want to keep one backup for 30 days, then keep one backup at 30, 60 & 90 days.

What would my prune option look like?

This is what I came up with:
-keep 90:0 -keep 60:1 -keep 30:1 -keep 1:1


I am pretty sure this is incorrect on several aspects, at the very least you’re reversing numbers in the notation. What you want is something like this:

-keep 0:90 -keep 30:30 -keep 1:1

If you’re doing daily, the last part (-keep 1:1) is not necessary.

1 Like

Thank you for your reply. So, if I’m doing daily backups and want to keep 30 days worth of backups and one at 30 days, 60 days & 90 days would this be correct.

-keep 0:90 -keep 1:60 -keep 30:30


You don’t need the -keep 1:60; the 30, 60, 90 days interval is already handled by the -keep 30:30. This is how you should read the each parameter:

-keep 30:30      # Keep a revision every 30 days for revisions older than 30 days

Where the first number is n or interval (gap between consecutive revisions to keep), and the second number is m or age. The various keep's must be sorted by decreasing age.

So as you’re doing daily backups, this is enough:

-keep 0:90 -keep 30:30

Though keep in mind your 90 day old backup will suddenly get deleted (after it reaches 91 days age) and then your oldest backup becomes 61 days old. If you want to keep a backup that’s always at least 90 days old, consider changing the first -keep 0:120 or longer.

De-duplication should keep the storage size down. Many of us have much longer retentions, and personally I don’t delete anything not even have 3 years or so.

1 Like

Thank you very much for your explanation. It’s taking me a while to get my head around the prune option, but I will get there.

I’m interested in this statement “De-duplication should keep the storage size down.” Are you saying in my example above Duplicacy does not hold a full backup at 30, 60 & 90 days? As that’s what I’ve been used to with previous backup software like Macrium Reflect.

Indeed yes. Don’t think of them as full (or incremental) backups - though each snapshot represents a fully restorable copy of the data at that point in time.

Duplicacy will keep only the chunks around that your 30, 60 and 90 day backups all reference. So while older data may consume more chunks that reach back that far, you’d be surprised at how efficient the de-duplication is - and keeping longer backups should definately be considered if you have the space.

You can always change your mind later by bringing the first -keep 0:age down, and you can analyse the de-duplication whenever you run a check -stats.

1 Like

Very sorry, but one more question if I may. My schedulted backups are daily, but what if I manually do an additional backup on some days. Will Duplicacy just delete one when the sceduled backup is done?

Not unless you have -keep 1:1, though only one of 'em will be kept once it reaches 30 days.

So adding that might be a good idea and certainly no harm as it’ll do nothing for days with only 1 snapshot. Otherwise, the most recent snapshot in the day will be kept.

1 Like

Once again, thank you for all your assistance. Greatly appreciated.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.