PBS only keeping one snapshot when run from Datacenter-> Backup job

Nov 23, 2017
12
2
43
54
Proxmox cluster is configured to work with PBS. Proxmox cluster has a subscription, PBS is no-subscription updates.
Previouly the Proxmox cluster was configure to save to a NFS share using vzdump, and only the latest backup was retained. But that was changed when PBS was released.
The Proxmox backup job is set to keep all backups. PBS datastore is configured to keep latest 3 backups, 5 daily, 5 weekly, 3 monthly backups.

Latest updates were applied today.

Last week, ran out of space on the PBS datastore, and realized that I had not scheduled Prune and GC. Ran a manual Garbage collection to clean up disk space.
When I ran out of space, I also noticed that PBS is only retaining latest snapshot, despite setting to keep last 5 daily, 5 weekly, and 3 monthly snapshots.

It has been 3 days since that Garbage Collection was done, there is lots of free disk space, but PBS is still only keeping 1 snapshot when run from the Datacenter -> Backup Job. However, if I run a manual backup job at the VM level, that snapshot is retained.

Any thoughts on what would be causing this?
 
please post your backup job config (/etc/pve/vzdump.cron), /etc/pve/storage.cfg and /etc/vzdump.conf
 
/etc/pve/vzdump.cron
Code:
30 17 * * 1,2,3,4,5   root vzdump --storage pbs --mode snapshot --maxfiles 1 --quiet 1 --compress zstd --mailnotification always --mailto admin@****.com --all 1
So I see --maxfiles 1, assuming this is the issue. Not sure why the gui is not removing it. Will remove it from vzdump.cron.

/etc/pve/storage.cfg
Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,rootdir,images
        maxfiles 0
pbs: pbs
        datastore backup
        server 10.99.99.201
        content backup
        fingerprint 6e:19:a0:a6:16:54:74:4d:e2:2b:db:04:ad:6a:7e:69:54:6e:89:bb:b5:2a:3c:48:87:54:0b:04:65:84:91:71
        prune-backups keep-all=1
        username root@pam

nfs: nfs
        export /mnt/pool1/proxmox
        path /mnt/pve/nfs
        server 10.99.99.249
        content rootdir,vztmpl,images,iso

/etc/pve/vzdump.conf
Code:
# vzdump default settings

#tmpdir: DIR
#dumpdir: DIR
#storage: STORAGE_ID
#mode: snapshot|suspend|stop
bwlimit: 400000
#ionice: PRI
#lockwait: MINUTES
#stopwait: MINUTES
#size: MB
#stdexcludes: BOOLEAN
#mailto: ADDRESSLIST
#maxfiles: N
#script: FILENAME
#exclude-path: PATHLIST
#pigz: N:
 
  • Like
Reactions: fabian
I've found that when adding the storage by command:

Code:
pvesm add pbs pbs --server x.x.x.x --datastore backup --username login@pbs --fingerprint xx:xx --password xx

doesn't include the value:

Code:
prune-backups keep-all=1

Wich cause error running:

Code:
ERROR: Backup of VM 100 failed - There is a max backup limit of 1 enforced by the target storage or the vzdump parameters. Either increase the limit or delete old backup(s).
 
Hi,
I've found that when adding the storage by command:

Code:
pvesm add pbs pbs --server x.x.x.x --datastore backup --username login@pbs --fingerprint xx:xx --password xx

doesn't include the value:

Code:
prune-backups keep-all=1

Wich cause error running:

Code:
ERROR: Backup of VM 100 failed - There is a max backup limit of 1 enforced by the target storage or the vzdump parameters. Either increase the limit or delete old backup(s).
the default behavior for vzdump in the backend has been keep-last=1 (was still called maxfiles 1 then) for a long time. And if nothing is specified when adding a backup storage, the storage will fall-back to that default. Changing those behaviors is a breaking API change, so we have to wait until PVE 7.0 to do it.

For now, you need to specify the retention options when adding the storage (or use the web UI which defaults to keep-all=1).
 
Last edited:

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!