Prune before creating backup

fnatter

New Member
Nov 3, 2026
4
0
0
hello Proxmox experts,

I am running pretty current PVE9 (updated last week) and my challenge
is that I have two backup disks (using vzdump, no PBS!) that each have
space for only one backup.
Later I want to configure two backup jobs for the two disks
(one running 1st and 3rd Sunday, the other running 2nd and 4th Sunday),
but for now my question is whether Proxmox9 is so smart to prune the
backup *before* creating the new backup if there is an existing backup
and keep-last==1 (and in doing so prevent running out of disk space)?

Many Thanks and Best Regards,
Felix
 
Hi!

No, Proxmox VE does not prune the backup before creating the new backup in this case. Any remove action is only done after the new backup has been written. If you really wanted to do this, you could always run a hook script at the 'backup-start' phase. You can find an example script here. Of course, you should note that if that backup then fails, you don't have a backup on that disk at all.
 
whether Proxmox9 is so smart to prune the
backup *before* creating the new backup
Sorry to argue with your assessment of smartness, but removing a backup before creating a new one, in my books is the unsmart choice. So I declare PVE smart!

Having room for just one backup at a time, is a recipe for disaster. Except for the problem with creating a new one (as above), I believe that at any given time you should have multiple backups (different instances) of a VM/LXC, as not all backups restore gracefully/functionally. This is quite apart from the 321 rule. Keep in mind that a backup is not that until it has been correctly tested.
 
  • Like
Reactions: flames
hello, in general I agree with you. But in my case I have two HDDs each having just enough space for one vm backup.
So I will configure hdd1 on first Saturday of each month and hdd2 on third Saturday of each month.
That is the best I can get with limited storage space. And yes, it should be an option and the option should not be "for beginners".
 
But in my case I have two HDDs each having just enough space for one vm backup.
Bear in mind, the VM backup size will vary, as will probably your available disk space.
It sounds like you are running on a shoe-string waiting for an accident.
If you enjoy living on the edge - keep smiling!

Happy Proxmoxing to you.