Changing Proxmox backup limit number.

Drax

Active Member
Jul 21, 2012
113
2
38
Got some errors on automated Proxmox VM backups. Backups now fail and I get a message saying backups are limited to 5. Where is this value set? Can it be changed to a larger number? Say 15?
 

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
2,876
453
103
South Tyrol/Italy
shop.maurer-it.com
Where is this value set? Can it be changed to a larger number? Say 15?
This limit is set in the Storage configuration. To change it open the Webinterface and go to Datacenter → Storage, there edit the storage which is your current backup target storage. There you can change the Max. Backups value to 15.
 
Jun 28, 2019
99
9
8
40
just add a '--remove 1' to your /etc/pve/vzdump.cron job, it will remove the oldest backup file and make room for a new backup, maintaining your backup retention police to 5... Otherwise, if you just raise the backup limit to 15, it will start to fail again shortly!!
 
Last edited:

Drax

Active Member
Jul 21, 2012
113
2
38
just add a '--remove 1' to your /etc/pve/vzdump.cron job, it will remove the oldest backup file and make room for a new backup, maintaining your backup retention police to 5... Otherwise, if you just raise the backup limit to 15, it will start to fail again shortly!!
So if I add this to the cron job, it will limit the backups to 5 or can I simply make it delete the oldest backup while still say retaining a fixed number, like say 30?
 

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
1,979
203
63
So if I add this to the cron job, it will limit the backups to 5 or can I simply make it delete the oldest backup while still say retaining a fixed number, like say 30?
it will keep the amount of maximum files you selected while deleting the oldest one when it's reached. you can set the number to whatever you like.
 
May 16, 2020
30
0
6
@oguz @Drax - I am trying to do the same thing. But I see that the ' /etc/pve/vzdump.cron ' is automatically generated. There is a "do no edit message" there - perhaps any edits will be overwritten ? My backups are failing because I have hit the limit I set as well.
 

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
1,979
203
63
@oguz @Drax - I am trying to do the same thing. But I see that the ' /etc/pve/vzdump.cron ' is automatically generated. There is a "do no edit message" there - perhaps any edits will be overwritten ? My backups are failing because I have hit the limit I set as well.
it's generated when you add/modify a clusterwide backup job in Datacenter -> Backup

it's safe to add the --remove 1 flag at the end of the command but it can get overwritten when you use the GUI to edit the backup job again.

i guess it could be a feature request to add this as a checkbox in the frontend so the GUI can be used for it
 
May 16, 2020
30
0
6
it's generated when you add/modify a clusterwide backup job in Datacenter -> Backup

it's safe to add the --remove 1 flag at the end of the command but it can get overwritten when you use the GUI to edit the backup job again.

i guess it could be a feature request to add this as a checkbox in the frontend so the GUI can be used for it

My scheduled backup from the datacenter are failing because of this - I thought automatic deletion of old backups is active on scheduled tasks.?
 

t.lamprecht

Proxmox Staff Member
Staff member
Jul 28, 2015
2,876
453
103
South Tyrol/Italy
shop.maurer-it.com
My scheduled backup from the datacenter are failing because of this - I thought automatic deletion of old backups is active on scheduled tasks.?
Yes, scheduled task default to removing old backups if the max. backups is set. Can you please post a task log of such a scheduled job?
 
May 16, 2020
30
0
6
Yes, scheduled task default to removing old backups if the max. backups is set. Can you please post a task log of such a scheduled job?
Hello Thomas - I was going to post but you beat me to it. So I added the --remove 1 flag and was able to manually perform a back up . It completed successfully. But I woke up this morning and found that the scheduled overnight backup has failed again ! Now not sure it was a limit issue but something else.

Code:
INFO: starting new backup job: vzdump 100 111 112 113 114 115 --quiet 1 --storage synology-nfs-storage --remove 1  --mode snapshot --compress zstd
INFO: Starting Backup of VM 100 (qemu)
INFO: Backup started at 2020-06-24 02:00:02
INFO: status = running
INFO: VM Name: pfsense
INFO: include disk 'virtio0' 'local-zfs-vmstore:vm-100-disk-0' 15G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: snapshots found (not included into backup)
INFO: creating archive '/mnt/pve/synology-nfs-storage/dump/vzdump-qemu-100-2020_06_24-02_00_02.vma.zst'
ERROR: got timeout
 

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
1,979
203
63
It completed successfully. But I woke up this morning and found that the scheduled overnight backup has failed again ! Now not sure it was a limit issue but something else.
you got a timeout, and your target storage is NFS. so i think it might be an issue with the share or the network connection
 
May 16, 2020
30
0
6
you got a timeout, and your target storage is NFS. so i think it might be an issue with the share or the network connection
I tested it this weekend. The backup works ok for all vms and containers except the pfsense vm. As soon as the pfsense backup starts, all network connectivity is lost and the backup fails - as well as the internet. The whole system becomes unresponsive until I reboot the server. Any ideas why the pfsense vm is causing the backup to fail ?
 

Vladimir Bulgaru

Active Member
Jun 1, 2019
194
29
28
33
Moscow, Russia
I tested it this weekend. The backup works ok for all vms and containers except the pfsense vm. As soon as the pfsense backup starts, all network connectivity is lost and the backup fails - as well as the internet. The whole system becomes unresponsive until I reboot the server. Any ideas why the pfsense vm is causing the backup to fail ?
Is pfsense somehow responsible for the networking between the server and NAS?
 

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
1,979
203
63
I tested it this weekend. The backup works ok for all vms and containers except the pfsense vm. As soon as the pfsense backup starts, all network connectivity is lost and the backup fails - as well as the internet. The whole system becomes unresponsive until I reboot the server. Any ideas why the pfsense vm is causing the backup to fail ?
well if your setup depends on the pfsense for network connectivity that's no surprise :)
 
May 16, 2020
30
0
6
well if your setup depends on the pfsense for network connectivity that's no surprise :)
ok - I must be confused then on how to setup my proxmox host with pfsense then. How can I setup proxmox , with pfsense vm, where the setup does not depend on pfsense for network connectivity - I am new at this so please allow the occasional dumb question. If I setup pfsense, isn't everything going thorugh it? one lan and one wan port , with all vms/containers going through the pfsense lan for network connectivity?

here is how my network connection is setup. Pfsense is on eno 2,3,5 and 5. But there are two other connections going out the server to the network switch are not on pfsense at all - eno1 and eno7. So there should be network connectivity besides pfsense . My VMs are all assigned a VF which through eno7 - they all have network connectivity .

supermicro-port-setup.png
 
Last edited:

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
1,979
203
63
If I setup pfsense, isn't everything going thorugh it? one lan and one wan port , with all vms/containers going through the pfsense lan for network connectivity?
if you set the pfsense as the default gateway of the PVE host, then it will lose the network connectivity when the VM goes down.

that's the bad part of a configuration like this.

the backup fails because the NFS server can't be reached (since default gateway is pfsense and it's down)

maybe if you make a local backup of the pfsense instead, it will come back up once the backup completes successfully. then you can transfer the backup to NFS.

But there are two other connections going out the server to the network switch are not on pfsense at all - eno1 and eno7. So there should be network connectivity besides pfsense
are they routed correctly?
 
May 16, 2020
30
0
6
if you set the pfsense as the default gateway of the PVE host, then it will lose the network connectivity when the VM goes down.
that's the bad part of a configuration like this.
What should the correct configuration be? Not sure I setup pfsense as the default gateway for the pve host. As I said, the pve host has its own network port ( eno1), which is not on pfsense at all


are they routed correctly?
yes they are - well, all vms going through the eno7 nic ( which is not on pfsense are routed to their correct vlans and have internet connectivity.
I am also connecting to the pve host via the ip address on eno1 not on pfsense.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!