I want to backup an unprivileged LXC to a NFS (Qnap nas).
This is a frequent question, and usually the answer is to remove NO_ROOT_SQUASH or enable --tmpdir.
I tried both, without success:
This command works:
Any suggestion?
This is a frequent question, and usually the answer is to remove NO_ROOT_SQUASH or enable --tmpdir.
I tried both, without success:
Code:
INFO: starting new backup job: vzdump 108 --storage backup --mode suspend --mailto log@example.com --tmpdir /data/tmp-backup/ --mailnotification always --quiet 1 --compress lzo
INFO: Starting Backup of VM 108 (lxc)
INFO: Backup started at 2020-04-22 13:04:26
INFO: status = running
INFO: backup mode: suspend
INFO: ionice priority: 7
INFO: CT Name: revp
INFO: starting first sync /proc/14727/root// to /data/tmp-backup/vzdumptmp25774
INFO: Number of files: 35,281 (reg: 25,102, dir: 4,372, link: 5,807)
INFO: Number of created files: 35,280 (reg: 25,102, dir: 4,371, link: 5,807)
INFO: Number of deleted files: 0
INFO: Number of regular files transferred: 23,555
INFO: Total file size: 1,026,856,147 bytes
INFO: Total transferred file size: 1,014,928,006 bytes
INFO: Literal data: 1,014,928,006 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 1,507,116
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 1,017,447,914
INFO: Total bytes received: 586,837
INFO: sent 1,017,447,914 bytes received 586,837 bytes 55,028,905.46 bytes/sec
INFO: total size is 1,026,856,147 speedup is 1.01
INFO: first sync finished (18 seconds)
INFO: suspend vm
INFO: starting final sync /proc/14727/root// to /data/tmp-backup/vzdumptmp25774
INFO: Number of files: 35,281 (reg: 25,102, dir: 4,372, link: 5,807)
INFO: Number of created files: 0
INFO: Number of deleted files: 0
INFO: Number of regular files transferred: 0
INFO: Total file size: 1,026,856,147 bytes
INFO: Total transferred file size: 0 bytes
INFO: Literal data: 0 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 196,578
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 1,153,710
INFO: Total bytes received: 4,667
INFO: sent 1,153,710 bytes received 4,667 bytes 772,251.33 bytes/sec
INFO: total size is 1,026,856,147 speedup is 886.46
INFO: final sync finished (1 seconds)
INFO: resume vm
INFO: guest is online again after 1 seconds
INFO: creating archive '/mnt/pve/backup/dump/vzdump-lxc-108-2020_04_22-13_04_26.tar.lzo'
INFO: /bin/bash: /mnt/pve/backup/dump/vzdump-lxc-108-2020_04_22-13_04_26.tar.dat: Permission denied
ERROR: Backup of VM 108 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=/data/tmp-backup/vzdumptmp25774' ./etc/vzdump/pct.conf ./etc/vzdump/pct.fw '--directory=/data/tmp-backup/vzdumptmp25774' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' . | lzop >/mnt/pve/backup/dump/vzdump-lxc-108-2020_04_22-13_04_26.tar.dat' failed: exit code 1
INFO: Failed at 2020-04-22 13:04:47
cp: cannot create regular file '/mnt/pve/backup/dump/vzdump-lxc-108-2020_04_22-13_04_26.log': Permission denied
INFO: Backup job finished with errors
TASK ERROR: job errors
This command works:
Code:
lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 touch /mnt/pve/backup/testfile
Any suggestion?