Backup error

Stives

New Member
Mar 10, 2023
6
0
1
Hi,

This is the message I get when I make a backup of an LXC Node-red; at the NAS level, I gave the same rights (LXC IP address and DNS) as for my Home Assistant VM for which the backup works?

2024-03-21 16:12:58 INFO: Starting Backup of VM 103 (lxc)
2024-03-21 16:12:58 INFO: status = running
2024-03-21 16:12:58 INFO: CT Name: node-red
2024-03-21 16:12:58 INFO: including mount point rootfs ('/') in backup
2024-03-21 16:12:58 INFO: backup mode: snapshot
2024-03-21 16:12:58 INFO: ionice priority: 7
2024-03-21 16:12:58 INFO: create storage snapshot 'vzdump'
2024-03-21 16:12:58 INFO: creating vzdump archive '/mnt/pve/Svg_VM_Syno/dump/vzdump-lxc-103-2024_03_21-16_12_57.tar.zst'
2024-03-21 16:12:58 INFO: tar: /mnt/pve/Svg_VM_Syno/dump/vzdump-lxc-103-2024_03_21-16_12_57.tmp: Cannot open: Permission denied
2024-03-21 16:12:58 INFO: tar: Error is not recoverable: exiting now
2024-03-21 16:12:58 INFO: cleanup temporary 'vzdump' snapshot
2024-03-21 16:12:59 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=/mnt/pve/Svg_VM_Syno/dump/vzdump-lxc-103-2024_03_21-16_12_57.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/Svg_VM_Syno/dump/vzdump-lxc-103-2024_03_21-16_12_57.tar.dat' failed: exit code 2
 
For VMs and privileged LXCs only UID 0 needs write access to the backup storage.
For unprivileged LXCs UID 0 + 100000 are needed.
So either make sure UID 100000 got write access too or edit your /etc/vzdump.conf and set the "tmpdir" to some local folder where UID 0 + 100000 are allowed to write (like "/tmp").
 
Last edited:
Thanks for the vzdump.conf track

I finally used this solution; it will perhaps benefit others:
1) Connect via SSH to Proxmox (with MobaXtherm)
2) Create a temporary folder with the command mkdir /var/lib/vz/tmpdump
3) Edit the /etc/vzdump.conf file (possible directly with the MobaXtherm browser)
4) Uncomment the #tmpdir DIR line and add the path to the temporary folder; the line therefore becomes tmpdir: /var/lib/vz/tmpdump

All backups will go through the /tmpdump folder before being moved to the local or remote backup storage configured in Proxmox
No need to stop the lxc to perform the backup.
 
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!