Strange backup error on NFS storage on only one LXC container

openaspace

Active Member
Sep 16, 2019
486
14
58
Italy
Strange backup error on NFS storage on only one LXC container:

Code:
2021-10-19 22:17:17 INFO: Starting Backup of VM 101 (lxc)
2021-10-19 22:17:17 INFO: status = running
2021-10-19 22:17:17 INFO: CT Name: alphine-proxy
2021-10-19 22:17:17 INFO: including mount point rootfs ('/') in backup
2021-10-19 22:17:17 INFO: backup mode: snapshot
2021-10-19 22:17:17 INFO: ionice priority: 7
2021-10-19 22:17:17 INFO: create storage snapshot 'vzdump'
2021-10-19 22:17:17 INFO: creating vzdump archive '/mnt/pve/synology/dump/vzdump-lxc-101-2021_10_19-22_17_17.tar.lzo'
2021-10-19 22:17:18 INFO: tar: /mnt/pve/synology/dump/vzdump-lxc-101-2021_10_19-22_17_17.tmp: Cannot open: Permission denied
2021-10-19 22:17:18 INFO: tar: Error is not recoverable: exiting now
2021-10-19 22:17:18 INFO: cleanup temporary 'vzdump' snapshot
2021-10-19 22:17:18 ERROR: Backup of VM 101 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=/mnt/pve/synology/dump/vzdump-lxc-101-2021_10_19-22_17_17.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' ./ | lzop >/mnt/pve/synology/dump/vzdump-lxc-101-2021_10_19-22_17_17.tar.dat' failed: exit code 2
 
hi,

Code:
2021-10-19 22:17:18 INFO: tar: /mnt/pve/synology/dump/vzdump-lxc-101-2021_10_19-22_17_17.tmp: Cannot open: Permission denied

when you make a backup of an unprivileged container, the backup is executed in the context of the unprivileged user (which doesn't have write-permission on your NFS share)

you can set a tmpdir variable in the /etc/vzdump.conf file to a world-writable location and then it should work :)