Backing up Folder with backup files, removing the older ones

Hi guys,

at work I have an aplication which makes a backup every day, but it also gives the file another name every time. It will also delete, the files which are more than 2 days old.

I would like to backup this folder to another location, and I would like to keep all files for 1 month, so I would like to delete all files older tahn one month in this folder. How can I do this with duplicati? ALL files will only have 1 version, since they all have another name. Can I somehow delete files older than 1 month?

Kind regards

In Duplicati, every backup version is a full backup. If the source folder contains a backup file of today, one from yesterday and one from 2 days ago, you have to keep the backups of the last 28 days.
You can do this by using --keep-time=28D or --retention-policy=28D:1D.

(BTW I have moved this topic to the #support category, #howto is intended for explaining how things work, this in the #support category you can ask questions).

Kees,

I am using the standard interface and this is the option you have there:
image
I know you can also change the --keep-time in the advanced option. But they both sound the same to me.

I would expect that the “keep this number backups” from the standard interface, will delete all versions older than 3 months, BUT will keep the last version, whatever age it has… Otherwise it is not a backup in my opinion.

I suspect, from your explanation, --keep-time will not do that, and will really delete everything older than the keep-time even the latest version. IS this correct? Because I can not really read this from the manual…

Are both assumptions correct?

Kind regards,

With the date range I believe it will delete all backups that are more than 3 months old. If for whatever reason you don’t have any backups newer than 3 months old, then yes - all versions would be deleted.

However, unless your backups are failing to be created I think you’d basically have to disable automatic runs, wait 3 months, then manually run a cleanup step to make this happen.

To avoid it, you can move to the more advanced option that let’s you allow fewer backups over longer time frames. For example you could could go with “keep all backups for 3 months then only 1 backup for every 3 month period beyond that” or even “keep all for 3 months then 1 per year forever”. I hope that made some sense…

JonMikelV,

in my opinion this option is not really the best choice for a backup (it is the standard choice now!). In my personal folder I have a lot of files (e.g fotos, invoices, etc) which never change, after 3 months they would all be removed from my backup. That’s definitely not the purpose.

I understand there is a newer way to define how to keep the version, which I think is great. But it is only available in the experimental or canary version. I am using the official beta version, not really willing to change this. My data is somewhat too important to me, too use experimental code to back it up

Kind regards,

If you don’t delete the files then they’re part of every backup and are never deleted from the backup.

With 3 months retention you only lose files that have been deleted for 3 months.

2 Likes