[SOLVED] Cant backup only unprivileged container I have.

DVDIsDead

New Member
Dec 19, 2021
11
1
3
30
Code:
INFO: starting new backup job: vzdump 125 --notes-template '{{guestname}}' --remove 0 --compress zstd --mode stop --node pve --storage raid1-backups
INFO: filesystem type on dumpdir is '-' -using /var/tmp/vzdumptmp4105384_125 for temporary files
INFO: Starting Backup of VM 125 (lxc)
INFO: Backup started at 2022-11-08 20:05:20
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: CT Name: mailserver
INFO: including mount point rootfs ('/') in backup
INFO: excluding bind mount point mp0 ('/Storage') from backup (not a volume)
INFO: creating vzdump archive '/backups/proxmox/dump/vzdump-lxc-125-2022_11_08-20_05_20.tar.zst'
INFO: tar: ./dev/lxc-125.log: Cannot open: Permission denied
INFO: Total bytes written: 3133184000 (3.0GiB, 19MiB/s)
INFO: tar: Exiting with failure status due to previous errors
ERROR: Backup of VM 125 failed - command 'set -o pipefail && lxc-usernsexec -m u:0:100000:1000 -m g:0:100000:1000 -m u:1000:1000:1 -m g:1000:1000:1 -m u:1001:101001:64534 -m g:1001:101001:64534 -- 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/tmp/vzdumptmp4105384_125' ./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' >/backups/proxmox/dump/vzdump-lxc-125-2022_11_08-20_05_20.tar.dat' failed: exit code 2
INFO: Failed at 2022-11-08 20:08:03
INFO: Backup job finished with errors
job errors
 
Hello,

Can you please try to set the `tmpdir` variable in the `/etc/vzdump.conf` to a world writable such as /tmp and test the backup again?
 
no change, but I just realized the console in proxmox web interface no longer works for any container however SSH works fine:
Code:
failed waiting for client: timed out
TASK ERROR: command '/usr/bin/termproxy 5900 --path /vms/125 --perm VM.Console -- /usr/bin/dtach -A /var/run/dtach/vzctlconsole125 -r winch -z lxc-console -n 125 -e -1' failed: exit code 1
error:
Code:
INFO: starting new backup job: vzdump 125 --mode snapshot --node pve --remove 0 --storage raid1-backups --notes-template '{{guestname}}' --compress zstd
INFO: Starting Backup of VM 125 (lxc)
INFO: Backup started at 2022-11-11 00:47:49
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: CT Name: mailserver
INFO: including mount point rootfs ('/') in backup
INFO: excluding bind mount point mp0 ('/Storage') from backup (not a volume)
INFO: creating vzdump archive '/backups/proxmox/dump/vzdump-lxc-125-2022_11_11-00_47_49.tar.zst'
INFO: tar: ./dev/lxc-125.log: Cannot open: Permission denied
INFO: Total bytes written: 3119308800 (3.0GiB, 22MiB/s)
INFO: tar: Exiting with failure status due to previous errors
ERROR: Backup of VM 125 failed - command 'set -o pipefail && lxc-usernsexec -m u:0:100000:1000 -m g:0:100000:1000 -m u:1000:1000:1 -m g:1000:1000:1 -m u:1001:101001:64534 -m g:1001:101001:64534 -- 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=/tmp/vzdumptmp1708357_125/' ./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' >/backups/proxmox/dump/vzdump-lxc-125-2022_11_11-00_47_49.tar.dat' failed: exit code 2
INFO: Failed at 2022-11-11 00:50:10
INFO: Backup job finished with errors
TASK ERROR: job errors

permissions:
host /tmp:

Code:
ls -la / |grep tmp
drwxrwxrwt  12 root root  4096 Nov 11 01:06 tmp

container /dev:
Code:
drwxr-xr-x   6 root   root      500 Nov 11 06:13 dev
 
Last edited:
Hello,

You can try to use Backup Mode "Snapshot" instead of "Stop" or make sure that there is enough space available on the local disk to fit the mountpoint / rootfs of the container into the /tmp directory.
 
Hello,

You can try to use Backup Mode "Snapshot" instead of "Stop" or make sure that there is enough space available on the local disk to fit the mountpoint / rootfs of the container into the /tmp directory.
i had tried all three, all did the same error.

i fixed it though: i had to stop the container, mount the disk image file in a tmp directory, and remove
Code:
(container root)/dev/lxc-125.log
, which was not present when the container was running.
 
  • Like
Reactions: Moayad
I understand this is an old thread, but I got there when googling: "cant backup unprivileged container".

I had few containers that were set to privileged and were backing up without any problems and few unprivileged that errored with the following message:

Code:
INFO: creating vzdump archive '/mnt/pve/ds1515-backups/dump/vzdump-lxc-105-2023_10_01-15_30_48.tar.zst'
INFO: tar: /mnt/pve/ds1515-backups/dump/vzdump-lxc-105-2023_10_01-15_30_48.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-105-disk-0_vzdump" successfully removed.
ERROR: Backup of VM 105 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/ds1515-backups/dump/vzdump-lxc-105-2023_10_01-15_30_48.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/ds1515-backups/dump/vzdump-lxc-105-2023_10_01-15_30_48.tar.dat' failed: exit code 2
INFO: Failed at 2023-10-01 15:30:49
INFO: Backup job finished with errors
TASK ERROR: job errors

My situation was as @Moayad described - backup location on NFS share (exported from Synology), and his suggestion also fixed my problem.

I have opened console, and did:
Code:
nano -w d /etc/vzdump.conf

then uncommented tmpdir line and changed it to:
Code:
# vzdump default settings


tmpdir: /tmp
 
Another option would be to make sure that UID 0 as well as UID 100000 got rights to write to the backup storage.
 
Another option would be to make sure that UID 0 as well as UID 100000 got rights to write to the backup storage.

I was afraid that I would have to do that. Fortunately, the other solution worked.

The reason why I didn't want to do anything with access rights is that I'm using Synology and quite disappointingly, it doesn't even have user/password authentication for NFS (it authenticates only by IP address). The whole UI for managing NFS looks quite bare, more like "let's just throw in the NFS, but nobody will use it anyway".

I could probably change those UIDs somehow on Proxmox box, but I want to leave the configuration as close to default as possible, so I can add/retire more nodes without wondering why it works on one of them, but not on the others.

The other option would be to set up CIFS/SMB share, but I wanted to use something more native to Linux.
 
Last edited:
Hello,

i open a new thred https://forum.proxmox.com/threads/backup-only-unprivileged-container-failed.156322/#post-713941

here the next problem.
Use Proxmox with one Backup Share on my MediaOpenVault as a NFS Share.
3 LXC container
* 101 pihole priviliged
* 103 NextCloud unpriviliged
use an CIFS Share on my MediaOpenVault
* 105 Jellyfin unpriviliged
2 VM
* 100 Ubuntu with Docker FHEM;MYSQL,ZigBee2MQTT ...
* 104 Home Assistant

i use only one Backup job
only 103 Nextcloud has a error.

/etc/fstab
Code:
#Backup Mount vom NAS
192.168.10.3:/Backup  /mnt/pve/NASBackupNeu  nfs  defaults 0 0
#Mount Media for jellyfin LXC 105
192.168.10.3:/  /mnt/media  nfs  defaults 0 0
#Mount Nextcloud for nextcloud LXC 103
//192.168.10.3/Nextcloud /mnt/nextcloud cifs _netdev,x-systemd.automount,noatime,uid=100033,gid=100033,dir_mode=0770,file_mode=0770,,credentials=/home/.smbcredentials 0 0
i give the mountingpoint to my LXC container
Code:
pct set 103 -mp0 /mnt/nextcloud/,mp=/var/www/html/data
Backup Job failed
Code:
INFO: starting new backup job: vzdump 103 --mode snapshot --prune-backups 'keep-weekly=2' --compress zstd --storage NASBackup --fleecing 0 --node pve --notes-template '{{guestname}}' --all 0
INFO: Starting Backup of VM 103 (lxc)
INFO: Backup started at 2024-10-16 11:50:24
INFO: status = running
INFO: CT Name: NextCloud
INFO: including mount point rootfs ('/') in backup
INFO: excluding bind mount point mp0 ('/var/www/html/data/') from backup (not a volume)
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  Logical volume "snap_vm-103-disk-0_vzdump" created.
INFO: creating vzdump archive '/mnt/pve/NASBackupNeu/dump/vzdump-lxc-103-2024_10_16-11_50_24.tar.zst'
INFO: tar: ./var/spool/rsyslog: Cannot open: Permission denied
INFO: tar: ./var/cache/private: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/sbin.dhclient-aWE9TC: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/lsb_release-L4zL5g: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/ubuntu_pro_esm_cache-owaSvo: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/lsb_release-Z59yI5: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/usr.bin.man-02l8ra: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/sbin.dhclient-rj2oMT: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/ubuntu_pro_apt_news-6AH71t: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/ubuntu_pro_esm_cache-SDvqjN: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/ubuntu_pro_apt_news-7EK3gM: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/usr.bin.tcpdump-O0iFrN: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/usr.bin.tcpdump-bP0IQf: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/usr.bin.man-AwlDt4: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/nvidia_modprobe-9Xy4cr: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/684a20eb.0/nvidia_modprobe-0OjfFx: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/nvidia_modprobe-Ei4n8U: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/lsb_release-7bACw4: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.tcpdump-sqbjwq: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_apt_news-3wyiTk: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.man-hjFm8f: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/nvidia_modprobe-7iWaDC: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_esm_cache-HslwAl: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_esm_cache-nHVJm3: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.man-rIgsYb: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/lsb_release-CKavPZ: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.man-7rE5Qj: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.man-OsHa4J: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.tcpdump-fexP61: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/nvidia_modprobe-R549fF: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_apt_news-RkXyXv: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_apt_news-K3hGNu: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_esm_cache-CFxRWw: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/sbin.dhclient-02ythu: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/nvidia_modprobe-SQsKqg: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_esm_cache-JKe2PA: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/lsb_release-MdTGeW: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/lsb_release-7nuya2: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/sbin.dhclient-2TKQYd: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/sbin.dhclient-sFPbgP: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.man-jK5N3I: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/sbin.dhclient-UUl0Zk: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.tcpdump-2xNdpu: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.tcpdump-35hBmW: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/nvidia_modprobe-y4FihN: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/lsb_release-LWutDP: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/nvidia_modprobe-GlIL4J: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.man-inr9b0: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/lsb_release-PDXiK8: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_esm_cache-MxE3Nd: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.tcpdump-yLOl7j: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/sbin.dhclient-Jm9YOR: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_apt_news-MY8Rg4: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_apt_news-CfdCTq: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_esm_cache-mezNjF: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/usr.bin.tcpdump-BTyrFu: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/ubuntu_pro_apt_news-eKYWfm: Cannot open: Permission denied
INFO: tar: ./var/cache/apparmor/7a03f264.0/sbin.dhclient-NReWQt: Cannot open: Permission denied
INFO: tar: ./var/lib/private: Cannot open: Permission denied
INFO: tar: ./var/log/btmp: Cannot open: Permission denied
INFO: tar: ./var/log/mail.err: Cannot open: Permission denied
INFO: tar: ./var/log/private: Cannot open: Permission denied
INFO: Total bytes written: 4434565120 (4.2GiB, 48MiB/s)
INFO: tar: Exiting with failure status due to previous errors
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-103-disk-0_vzdump" successfully removed.
ERROR: Backup of VM 103 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=/tmp/vzdumptmp2305694_103/' ./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/NASBackupNeu/dump/vzdump-lxc-103-2024_10_16-11_50_24.tar.dat' failed: exit code 2
INFO: Failed at 2024-10-16 11:51:55
INFO: Backup job finished with errors
TASK ERROR: job errors

Why i use an Share on my OMV für data on Nextcloud?
So, my idea was, on OMV i have 2 datastore on differnet Disk:
* Nextcloud
* NextcloudBackup
every day, a rsync job duplicate data from Nextcloud to Nextcloudbackup

at the moment i'm standing in the forest and can't find my way out
thanks
 
Last edited:

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!