usb backup retention automatically set to 3

DrillSgtErnst

Active Member
Jun 29, 2020
91
6
28
Hi,
I am using usb automount to backup servers.
I set backup retention to 1 but everytime i unplug and replug the drive the backup retention gets set automatically to 3.

How can I change this behavior?
 
In case anyone finds this.
For now I added
--prune-backups keep-last=x
(where x ist your desired retention) to the file /etc/pve/vzdump.cron.

I will report back if that works. AFAIK this has to be done per node you want this to work.
 
Hi,
Hi,
I am using usb automount to backup servers.
I set backup retention to 1 but everytime i unplug and replug the drive the backup retention gets set automatically to 3.
Does that automount script maybe reconfigure the storage each time?

In case anyone finds this.
For now I added
--prune-backups keep-last=x
(where x ist your desired retention) to the file /etc/pve/vzdump.cron.

I will report back if that works. AFAIK this has to be done per node you want this to work.
That file is shared in the cluster (as is everything in /etc/pve/) so it should be enough to do it for each job.

Note that there also is /etc/vzdump.conf for node-specific defaults.
 
Well well well
Thanks for the Reply. Actually it does not work.
The command
vzdump 100 -quiet 1 -compress zstd --prune-backups keep-last=1 --storage usb-sda --mode snapshot

But I receive an error
Some errors have been encountered:
pve: Parameter verification failed. (400)

prune-backups: invalid format - value without key, but schema does not define a default key

looking into the documentation
https://pve.proxmox.com/pve-docs/vzdump.1.html
it seems, that --prune-backups keep-last=1 should be an alright option.
I tried keep-all=0. keep-last=1
but the error persists


I am using pve6-usb-automount for the usb mount. I am not quite sure if it does reconfigure the backup target each time.

I tried /etc/vzdump.conf maxfiles=1
I wil report back in about an hour if that worked. Since it is only one Host I do not hesitate to use that solution, if it just works
 
Last edited:
Well well well
Thanks for the Reply. Actually it does not work.
The command
vzdump 100 -quiet 1 -compress zstd --prune-backups keep-last=1 --storage usb-sda --mode snapshot

But I receive an error
Some errors have been encountered:
pve: Parameter verification failed. (400)

prune-backups: invalid format - value without key, but schema does not define a default key

looking into the documentation
https://pve.proxmox.com/pve-docs/vzdump.1.html
it seems, that --prune-backups keep-last=1 should be an alright option.
I tried keep-all=0. keep-last=1
but the error persists
The same command (different storage name/ID) works for me on latest 6.4 and 7. Is the node up-to-date?

I am using pve6-usb-automount for the usb mount. I am not quite sure if it does reconfigure the backup target each time.
Seems like they do and you need to configure the maxfiles option for that script (see line 20 and 119).

I tried /etc/vzdump.conf maxfiles=1
I wil report back in about an hour if that worked. Since it is only one Host I do not hesitate to use that solution, if it just works
Note that the storage option takes precedence (the order is: CLI option, storage config, node-specific config) so that won't help.
 
regarding softwareversion
root@pve:~# pveversion --v
proxmox-ve: 6.4-1 (running kernel: 5.4.124-1-pve)
pve-manager: 6.4-13 (running version: 6.4-13/9f411e79)
pve-kernel-5.4: 6.4-4
pve-kernel-helper: 6.4-4
pve-kernel-5.4.124-1-pve: 5.4.124-1
pve-kernel-5.4.114-1-pve: 5.4.114-1
pve-kernel-5.4.103-1-pve: 5.4.103-1
pve-kernel-5.4.78-2-pve: 5.4.78-2
pve-kernel-5.4.73-1-pve: 5.4.73-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.1.2-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.20-pve1
libproxmox-acme-perl: 1.1.0
libproxmox-backup-qemu0: 1.1.0-1
libpve-access-control: 6.4-3
libpve-apiclient-perl: 3.1-3
libpve-common-perl: 6.4-3
libpve-guest-common-perl: 3.1-5
libpve-http-server-perl: 3.2-3
libpve-storage-perl: 6.4-1
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.6-2
lxcfs: 4.0.6-pve1
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.1.12-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.6-1
pve-cluster: 6.4-1
pve-container: 3.3-6
pve-docs: 6.4-2
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-4
pve-firmware: 3.2-4
pve-ha-manager: 3.1-1
pve-i18n: 2.3-1
pve-qemu-kvm: 5.2.0-6
pve-xtermjs: 4.7.0-3
qemu-server: 6.4-2
smartmontools: 7.2-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 2.0.4-pve1

Well you were right about the vzdump.conf file not working.

I'll try with the automount script, didn't think they would be the ones setting that up. sorry.

I've tried again with the
--prune backups keep-last=1
But the error remains the same.
 
Last edited: