LXC backup error (unprivileged) after upgrade from 6.4 to 7.0

ragman1976

Active Member
Mar 5, 2021
38
2
28
49
Hi,

after upgrading to 7.0Backup (local) my unprivileged LXC containers fail with following message:

Code:
INFO: starting new backup job: vzdump 104 --storage local --compress zstd --remove 0 --node NUC --mode snapshot
INFO: Starting Backup of VM 104 (lxc)
INFO: Backup started at 2021-07-08 11:56:27
INFO: status = running
INFO: CT Name: observium
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "snap_vm-104-disk-0_vzdump" created.
  WARNING: Sum of all thin volume sizes (351.00 GiB) exceeds the size of thin pool pve/data and the amount of free space in volume group (<16.00 GiB).
INFO: creating vzdump archive '/var/lib/vz/dump/vzdump-lxc-104-2021_07_08-11_56_27.tar.zst'
INFO: tar: /var/lib/vz/dump/vzdump-lxc-104-2021_07_08-11_56_27.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-104-disk-0_vzdump" successfully removed
ERROR: Backup of VM 104 failed - command 'set -o pipefail && lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar cpf - --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' --one-file-system '--warning=no-file-ignored' '--directory=/var/lib/vz/dump/vzdump-lxc-104-2021_07_08-11_56_27.tmp' ./etc/vzdump/pct.conf ./etc/vzdump/pct.fw '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' ./ | zstd --rsyncable '--threads=1' >/var/lib/vz/dump/vzdump-lxc-104-2021_07_08-11_56_27.tar.dat' failed: exit code 2
INFO: Failed at 2021-07-08 11:56:27
INFO: Backup job finished with errors
TASK ERROR: job errors

Priviledged container backup work fine.

Any hints?

Greets and thanks in advance.
 
hi,

Code:
INFO: creating vzdump archive '/var/lib/vz/dump/vzdump-lxc-104-2021_07_08-11_56_27.tar.zst'
INFO: tar: /var/lib/vz/dump/vzdump-lxc-104-2021_07_08-11_56_27.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now

this is the important part, since you say
Priviledged container backup work fine.
it indicates that you don't have write permission on that directory with the unprivileged container (unprivileged containers use a mapped userid on the host, and backups for containers are made in context of that userid).

you can try setting the tmpdir variable in your /etc/vzdump.conf file to a world-writable directory (for example /var/tmp/ or so) and then it should work.