Backup container error : failed: exit code 2

issa2020

Active Member
Sep 9, 2020
83
4
28
Hello, i got some Cotnainer on Proxmox and i need to backu them, but all container got error message

can u help to found what is wrong please :

1696753663935.png



i got this error :


Bash:
INFO: starting new backup job: vzdump 112 --compress zstd --remove 0 --notes-template '{{guestname}}' --mode snapshot --node proxmox2 --storage NFS2
INFO: Starting Backup of VM 112 (lxc)
INFO: Backup started at 2023-10-08 10:27:49
INFO: status = running
INFO: CT Name: heimdalldashboard
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "snap_vm-112-disk-0_vzdump" created.
  WARNING: Sum of all thin volume sizes (1.78 TiB) exceeds the size of thin pool LUN02/LUN02 and the size of whole volume group (931.51 GiB).
INFO: creating vzdump archive '/mnt/pve/NFS2/dump/vzdump-lxc-112-2023_10_08-10_27_49.tar.zst'
INFO: tar: /mnt/pve/NFS2/dump/vzdump-lxc-112-2023_10_08-10_27_49.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-112-disk-0_vzdump" successfully removed.
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/NFS2/dump/vzdump-lxc-112-2023_10_08-10_27_49.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/NFS2/dump/vzdump-lxc-112-2023_10_08-10_27_49.tar.dat' failed: exit code 2
INFO: Failed at 2023-10-08 10:27:50
INFO: Backup job finished with errors
TASK ERROR: job errors

thanks
 
Code:
tar: /mnt/pve/NFS2/dump/vzdump-lxc-112-2023_10_08-10_27_49.tmp: Cannot open: Permission denied

That's your problem. You're not allowed to create the file mentioned above.
 
Code:
tar: /mnt/pve/NFS2/dump/vzdump-lxc-112-2023_10_08-10_27_49.tmp: Cannot open: Permission denied

That's your problem. You're not allowed to create the file mentioned above.
i do that with the proxmox web interface, how i can change the rights on the folder ?
 
but that's work for all VM machine, and only not working for CT ?

well i m using samba now and works for the CT machine and NFS for full VM

thanks all
 
Hi,
but that's work for all VM machine, and only not working for CT ?
for unprivileged containers, the backup is done unprivileged with lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536, so you'd need the unprivileged user to also have the correct access rights on the NFS.

EDIT: This applies for the tmpdir (which is on the backup storage by default).
 
Last edited:
Hey!
Thx this workaround fixed this bug... adding the tmpdir: /tmp in the config file.

But, I'm thinking to the future... when the HDD will not have enough space to store the temp file in the /tmp folder...
Better to add the tmp folder in my USB disk (used for backup files) ? Or performance problem ?

Thx !

PS : this is not so friendly to not having backup working nice with a fresh install, I'm discovering Proxmox and it has given a little anxiety ;)
 

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!