Backup permission denied - LXC unprivileged

tony blue

Active Member
Dec 26, 2017
64
1
33
50
Hallo,

ich habe für Backups ein NFS Share in Proxmox angelegt. Darauf kann ich problemlos Backups von VMs oder auch von LXC privileged Containern erstellen. Wenn ich jedoch das Backup für einen unprivileged LXC Container starte bricht der Vorgang mit dieser Fehlermeldung ab:

INFO: starting new backup job: vzdump 112 --storage backupserver_virtualhost_nfs --node virtualhost --mode stop --remove 0 --compress lzo
INFO: Starting Backup of VM 112 (lxc)
INFO: Backup started at 2019-07-20 16:11:36
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: CT Name: ubuntu-18.04-lts-plain-wan-unprivileged
INFO: creating archive '/mnt/pve/backupserver_virtualhost_nfs/dump/vzdump-lxc-112-2019_07_20-16_11_36.tar.lzo'
INFO: tar: /mnt/pve/backupserver_virtualhost_nfs/dump/vzdump-lxc-112-2019_07_20-16_11_36.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
ERROR: Backup of VM 112 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/backupserver_virtualhost_nfs/dump/vzdump-lxc-112-2019_07_20-16_11_36.tmp' ./etc/vzdump/pct.conf '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' ./ | lzop >/mnt/pve/backupserver_virtualhost_nfs/dump/vzdump-lxc-112-2019_07_20-16_11_36.tar.dat' failed: exit code 2
INFO: Failed at 2019-07-20 16:11:36
INFO: Backup job finished with errors
TASK ERROR: job errors​

Woran könnte das liegen?

Vielen Dank!

Tony
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
7,697
1,260
169
wie ist denn mnt/pve/backupserver_virtualhost_nfs/ gemounted?
(das backup wird als user root ausgefuehrt, kann sein, dass der nfs-share nicht zulaesst, dass root files anlegt (siehe https://en.wikipedia.org/wiki/Unix_security#Root_squash))

Kannst du als root ein file auf '/mnt/pve/backupserver_virtualhost_nfs' touchen?
`touch /mnt/pve/backupserver_virtualhost_nfs/test' ?

Ich hoffe das hilft!
 

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 your own in 60 seconds.

Buy now!