Advice on pruning backups done iregularly

Hi there,

I’m looking at setting up an appropriate retention policy. I am aware of the default retention policy, the following. But what does it mean?

Am I right that it says delete snapshots that older than 5 years, but what does the keep 1 snapshot every 7 days mean? Is it so that if I do a load of backups quite often, say every day, then if a backup is older than a month then only keep weekly backups i.e. delete backups that done every day except backups done between a week?

The only thing is that I back up whenever I can, not on a fixed cycle, as the backups are done to external hard drives that I keep offline.

Many thanks for your help.

Heres my understanding of how pruning rules are. Pruning is mainly to keep the backup size under control (because duplicacy keeps versions of backups, meaning if you change a file name and want to restore it you can see both the new file name and the older file name in a older backup.) in the first box keeping a snapshot ever X amount of days older than Y days is like this. Lets say you did a backup every day for the last month and you chose to keep 1 snapshot every 7 days older than 10 days. After 10 days you would have one snapshot every week until one month, so you would have days 1,2,3,4,5,6,7,8,9,10,17,24.

Yes the big box on the top just deletes anything older than the preset date (in this case 5 years).

Hope that helps, or even made any sense.

I think that make good sense.

Basically, the older the backup, the larger the gaps between each backup.

My only question is that i do backups on a rolling period. So I would back up whenever I feel it or need to. Does that may any difference to prune. for instance, i manually back up a few times a week. But then may not back up for 3 weeks or something along those lines how does affect pruning?

This is a bad example, because it won’t use additional space. Only if content of the file changes — the changes will occupy space.

Prune can delete specific revisions or do deletions based on number of days.

For example, prune -a -keep 0:180 -keep 7:14 will keep no backups made 180 or more days ago and keep at most 1 backup every 7 days for those made 14 or more days ago, and keep all newer backups.

I generally it’s easier to think in terms of time than number of backups — maybe some days you did 15 backups and other days zero. “Backup done 5 days ago” is more meaningful and useful that “backup done 65 revisions ago”. Hence, -keep is a very useful filter.

But if you don’t like that you can construct any other solution. list command lists available regions and `prune -r -id prunes specific revision from specific snapshot. You can script any approach you want.