[SOLVED] Backup fails

Skipping1895

New Member
Jul 14, 2024
3
0
1
All my CM/CT backups fails with the same reason.
What is the cause of this, and what to do?

I am trying to backup to my NAS.
The NAS is connected through NFS and works fine with everything else than backups.


Code:
()
INFO: starting new backup job: vzdump 111 --compress zstd --mode snapshot --notification-mode auto --node pve --remove 0 --storage NAS --notes-template '{{guestname}}'
INFO: Starting Backup of VM 111 (lxc)
INFO: Backup started at 2024-07-14 00:30:17
INFO: status = running
INFO: CT Name: wastebin
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  Logical volume "snap_vm-111-disk-0_vzdump" created.
INFO: creating vzdump archive '/mnt/pve/NAS/dump/vzdump-lxc-111-2024_07_14-00_30_17.tar.zst'
INFO: tar: /mnt/pve/NAS/dump/vzdump-lxc-111-2024_07_14-00_30_17.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-111-disk-0_vzdump" successfully removed.
ERROR: Backup of VM 111 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/dump/vzdump-lxc-111-2024_07_14-00_30_17.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/dump/vzdump-lxc-111-2024_07_14-00_30_17.tar.dat' failed: exit code 2
INFO: Failed at 2024-07-14 00:30:17
INFO: Backup job finished with errors
INFO: notified via target `mail-to-root`
TASK ERROR: job errors
 
It is a permission problem on the NAS. I guess user "root" is not allowed to create files there.

> INFO: tar: /mnt/pve/NAS/dump/vzdump-lxc-111-2024_07_14-00_30_17.tmp: Cannot open: Permission denied
 
  • Like
Reactions: Skipping1895
Please note that it's the unprivileged container's root user, i.e. 100000 from the host's perspective, that needs the permission.
 
  • Like
Reactions: Skipping1895
Thank you @dietmar and @fiona for your replies. Very appreciated!
I am still not sure what to do to fix it.

It should have permission to create files. I can have ISO's, VM/CT's etc. to be created/saved on there.
So I am a bit confused what permission needed or set, or where to grant this permission.
It's a Sonology NAS if that makes any useful information.
 
  • Like
Reactions: Skipping1895
You need to configure your NAS so that the user with ID 100000 has the necessary permissions: https://forum.proxmox.com/threads/backup-of-some-lxcs-failing-permission-denied.56612/#post-579476
This is the option that worked for others:
https://forum.proxmox.com/threads/p...-containers-but-not-on-vms.130224/post-571205
Thank you so much!
The "Squash -> Map all users to admin on the NFS side (in my case a synology NAS)" worked for me as well.
Topic can be closed as resolved.
 
You can do that by using the Edit thread button at the top and selecting the [SOLVED] prefix.
 
  • Like
Reactions: Skipping1895

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!