Delete old backup prior to new backup

gob

Renowned Member
Aug 4, 2011
69
2
73
Chesterfield, United Kingdom
Hi

I have proxmox doing snapshot backups to a series of 1Tb hotswap USB disks which get rotated each night. This has been working fine until the backup job grew over 500Gb. As VZdump deletes the old backup after a successful backup we are running out of space each night and have to manually go in and delete the old backup each day to get a successful backup.

We currently have Max Backups set to 1 on the USB storage. If we set that to 0 does that disable the Max Backups threshold and not remove any? or would that delete the old backup file first?

I have come across the VZdump hool script option so I guess I could create a script that runs at job-start to remove the old backup prior to running the backup.

I just wondered if there is another way to automate this and will this break if somebody tweaks the backup job in the gui?

Many thanks
 
Hi
If we set that to 0 does that disable the Max Backups threshold and not remove any? or would that delete the old backup file first?

Yes maxfiles=0 means unlimited backup.

Erasing the previous backup to make room for a new one is dangerous if you have only one backup backup.
Buy a bigger external hard drive !
 
Yes, I understand that "Erasing the previous backup to make room for a new one is dangerous", however as I mentioned in the post, the disks are rotated so there will be 4 newer backups at the point when we delete the old backup. This is an acceptable risk to us.