[SOLVED] Backup von LXC-Container scheitert -- unprivilegierter Container!

Dec 19, 2012
481
14
83
Hallo.
Ich hatte irgendwann schon mal ein ähnliches Problem und seit einiger Zeit taucht es erneut auf: Ein LXC-Container kann nicht mehr über das automatische Backup gesichert werden. Die entsprechende Meldung lautet:

Code:
INFO: Starting Backup of VM 115 (lxc)
INFO: Backup started at 2022-12-29 00:15:07
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: CT Name: osticket
INFO: including mount point rootfs ('/') in backup
INFO: creating vzdump archive '/mnt/pve/Diskstation/dump/vzdump-lxc-115-2022_12_29-00_15_07.tar.zst'
INFO: tar: /mnt/pve/Diskstation/dump/vzdump-lxc-115-2022_12_29-00_15_07.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
ERROR: Backup of VM 115 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/Diskstation/dump/vzdump-lxc-115-2022_12_29-00_15_07.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' >/mnt/pve/Diskstation/dump/vzdump-lxc-115-2022_12_29-00_15_07.tar.dat' failed: exit code 2
INFO: Failed at 2022-12-29 00:15:07

Deutet das "Cannot open: Permission denied" darauf hin, dass dies ein unprivilegierter Container ist? Ich habe parallel ein paar andere Container im Backup, bei denen die Option auf "Nein" gesetzt wurde und da klappt das Backup problemlos. Falls das damit zusammenhängt, ist mir der Zusammenhang trotzdem nicht klar...
Danke für Klärung.
Viele Grüße.
 
DieLösung ist, das tmpdir von vzdump zu ändern. In /etc/vzdump.conf anpassen:

Code:
# vzdump default settings
#tmpdir: DIR
tmpdir: /tmp
 
Hallo. Danke -- die Idee mit dem /tmp funktioniert aber nur, wenn da auch Platz ist. Wir haben das System hier auf relativ kleinen Entrprise-SSDs, wohingegen das Storage woanders gemountet ist.

Code:
 /tmp # df -h .
Filesystem        Size  Used Avail Use% Mounted on
rpool/ROOT/pve-1  101G   19G   82G  19% /

Könnte etwas knapp werden...
 
hi, auf NASen gibts oft bei den NFS rechten ein setting wie: Map all users to admin.
wenn du das aktivierst, sollte es auch mit unprivileged klappen...
 
  • Like
Reactions: Skyless81
hi, auf NASen gibts oft bei den NFS rechten ein setting wie: Map all users to admin.
wenn du das aktivierst, sollte es auch mit unprivileged klappen...
Perfekt, danke für den Tipp. Was hab ich gesucht im Netz, und dann so einfach.
 

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!