Understanding backup retention correctly?

janvv

Active Member
Jun 21, 2020
63
10
28
66
52.24154182722349, 5.117853866801705
I do not have the backup server installed, instead I use the backup option of the DataCenter.
When I set:
keep-daily=2,keep-weekly=1
then I have the backup of yesterday and the day before, AND it will keep the backup of last sunday.

- the backup on Tuesday will keep Monday and Sunday, pruning all backups before
- the backup on Wednesday will keep Tuesday and Monday, and Sunday as the weekly backup
- and so on
- next Wednesday the older Sunday backup will be removed, because we have a newer weekly backup

Do I understand this correctly?
 
Last edited:
Hi,
I do not have the backup server installed, instead I use the backup option of the DataCenter.
When I set:
keep-daily=2,keep-weekly=1
then I have the backup of yesterday and the day before, AND it will keep the backup of last sunday.
If you have daily backups, it will keep one for today, i.e. the newly created backup, one for yesterday, and one for the Sunday before that (which is not last Sunday if yesterday is last Sunday ;)). Once you have enough backups to cover the time range, it will always keep 3 in total.
- the backup on Tuesday will keep Monday and Sunday, pruning all backups before
- the backup on Wednesday will keep Tuesday and Monday, and Sunday as the weekly backup
- and so on
- next Wednesday the older Sunday backup will be removed, because we have a newer weekly backup

Do I understand this correctly?
See the prune simulator (works the same way in Proxmox VE).
 
Hi,
What time retention starts ? For example i set to save one monthly.
if you just have this rule alone then the latest backup will be kept (and the whole month that the backup is part of is considered covered). If you also have earlier rules like e.g. keep-weekly, then it will be the latest backup that is not yet covered by those rules.
 
Hi,

if you just have this rule alone then the latest backup will be kept (and the whole month that the backup is part of is considered covered). If you also have earlier rules like e.g. keep-weekly, then it will be the latest backup that is not yet covered by those rules.
What time retention starts? 00-00 ?
 
It starts considering from the latest backup, whenever that is, i.e. the backup with the newest timestamp determines the start. If the backups timestamp is for 00:00 on February 1st, that's part of February.
 
So old one will be deleted after the new created ? Without creating new one old one will not be deleted ?
 
So old one will be deleted after the new created ? Without creating new one old one will not be deleted ?
If you run pruning multiple times without creating any backups, it will do nothing on the subsequent runs. The pruning selection does not depend on the current time, only on what backups are present. E.g. if you have retention settings that will keep 1 backup, then the backup is only ever removed after a newer backup was created.
 
If you run pruning multiple times without creating any backups, it will do nothing on the subsequent runs. The pruning selection does not depend on the current time, only on what backups are present. E.g. if you have retention settings that will keep 1 backup, then the backup is only ever removed after a newer backup was created.
The same with 1 month age ? Old will be deleted ONLY after new will be created ?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!