[SOLVED] Backup LXC funktioniert nicht

SteffenDE

Active Member
Feb 10, 2021
34
7
28
54
Hi,

beim Versuch einen laufenden LXC Container auf mein NAS zu sichern (dort werden erfolgreich alle VMs hin gesichert) bekomme ich nur jedem Menge Zeilen mit folgenden Fehler:

ERROR: rsync: [generator] chown "/mnt/pve/NAS-PVE-Backup/dump/vzdump-lxc-501-2025_02_08-11_15_59.tmp/." failed: Operation not permitted (1)

Halte ich den Container an erhalte ich folgenden Fehler:

Code:
INFO: starting new backup job: vzdump 501 --notes-template '{{guestname}}' --notification-mode auto --compress zstd --node smcbs-pveh2 --remove 0 --storage NAS-PVE-Backup --mode snapshot
INFO: Starting Backup of VM 501 (lxc)
INFO: Backup started at 2025-02-08 11:19:13
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: CT Name: Calibre
INFO: including mount point rootfs ('/') in backup
INFO: excluding bind mount point mp0 ('/mnt/nas') from backup (not a volume)
INFO: creating vzdump archive '/mnt/pve/NAS-PVE-Backup/dump/vzdump-lxc-501-2025_02_08-11_19_13.tar.zst'
INFO: tar: /mnt/pve/NAS-PVE-Backup/dump/vzdump-lxc-501-2025_02_08-11_19_13.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
ERROR: Backup of VM 501 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/NAS-PVE-Backup/dump/vzdump-lxc-501-2025_02_08-11_19_13.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 '--threads=1' >/mnt/pve/NAS-PVE-Backup/dump/vzdump-lxc-501-2025_02_08-11_19_13.tar.dat' failed: exit code 2
INFO: Failed at 2025-02-08 11:19:14
INFO: Backup job finished with errors
TASK ERROR: job errors

Was passt hier nicht und verursacht dass ein LXC Backup nicht läuft?

Danke.
 
So, dann habe ich die Lösung doch gefunden. Es liegt an den speziellen User (um 1000 verschoben) in einem unprivilegierten Container. Es braucht am NAS die Einstellung

Squash: Alle Benutzer zu Admin zuordnen, damit der LXC User auch Rechte auf dem NFS bekommt.

Bzw. nur halb, im ausgeschalteten Zustand funktioniert es nun, aber im laufenden Zustand leider immer noch der gleiche Fehler.

Danke.
 
Last edited:
  • Like
Reactions: waltar
So, das tmpdir muss in der /etc/vzdump.conf gesetzt werden, dann klappt es auch mit dem Online LXC Backup auf ein NAS:

tmpdir: /mnt/fast_local_disk
 
  • Like
Reactions: kirdan and waltar