Prune setting keep yearly

websmith

Member
May 18, 2022
17
2
8
Hi,

I wonder if its possible to not keep any yearly backups.

All I care about is the daily, weekly, monthly backups - and soon as a year has gone and the last monthly backup is still there - I don't want to have a backup of last years.

i.e.

when I have:

backups for:

2022-12-31
2023-02-28

And my setting says keep monthly: 1

Then I would like to remove the 2022-12-31 backup.

When I try to set the "Keep Yearly" to 0 in the UI, it will not allow me to save it.

I get why it has been implemented like this, because then you don't have to take into account the year of a backup when evaulating "monthly" - but it would be nice to not be forced to store a backup for a year, when you really only care about the monthly backups.
 
Hi,
if you don't put any number for a keep option, it behaves like 0. Is the backup from December maybe marked as protected (those won't ever get pruned)? Do you only have the keep monthly: 1 setting and no others?

You can try your settings here: https://pbs.proxmox.com/docs/prune-simulator/index.html
 
Perfect thanks - that was not so intuitive :-)

Perhaps it would make sense to allow 0 as a value as opposed to a blank value - since its a field for a number.

But I got my issue resolved - my old backups are moved - but it might be an idea to make it into a feature request for that dialog's validation, so it allows 0 as a value.
 
Well, it's usually the case that no value means that the setting is not used. Or a default, but then we usually display the default as a greyed-out value. While we could show 0 as a greyed-out value, it'd add to the visual overhead, so not sure. But feel free to open a feature request on our bug tracker so other developers can chime in too: https://bugzilla.proxmox.com/