[SOLVED] Error while Backup of LCX container

Jun 16, 2024
14
0
1
Environment: Proxmox VE 8.3.2

I have created an LCX container (200) (Debian Bookworm) on a node (ESX3).
This container is to be backed up together with the data backup of the data center.
Without this container, the data backup worked for months.
During the first backup with the new container, the following error occurs:
Code:
INFO: starting new backup job: vzdump 200 --compress zstd --notes-template '{{guestname}}' --storage backup --notification-mode auto --mode snapshot --remove 0 --node ESX3
INFO: Starting Backup of VM 200 (lxc)
INFO: Backup started at 2025-01-05 15:49:21
INFO: status = running
INFO: CT Name: Docker
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
INFO: creating vzdump archive '/mnt/pve/backup/dump/vzdump-lxc-200-2025_01_05-15_49_21.tar.zst'
INFO: tar: /mnt/pve/backup/dump/vzdump-lxc-200-2025_01_05-15_49_21.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
INFO: cleanup temporary 'vzdump' snapshot
ERROR: Backup of VM 200 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/backup/dump/vzdump-lxc-200-2025_01_05-15_49_21.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/backup/dump/vzdump-lxc-200-2025_01_05-15_49_21.tar.dat' failed: exit code 2
INFO: Failed at 2025-01-05 15:49:23
INFO: Backup job finished with errors
TASK ERROR: job errors

How can I avoid this error?
 
Last edited:
As far as I remember backups are performed by a user called "backup". To avoid this: you may try to grant write access to that user.
The user 'backup' should already have write access to this directory, since the other VMs have been backed up there for some time:
Code:
Header
Proxmox
Virtual Environment 8.3.2
Datacenter
Logs
INFO: starting new backup job: vzdump --compress zstd --notes-template '{{guestname}}, {{node}}, {{vmid}}' --quiet 1 --storage backup --mailnotification failure --mailto heiko@helbigs.com --prune-backups 'keep-last=3,keep-monthly=1' --fleecing '1,storage=local-zfs' --mode snapshot --all 1
INFO: skip external VMs: 100, 101, 104
INFO: Starting Backup of VM 105 (qemu)
INFO: Backup started at 2025-01-06 03:15:06
INFO: status = running
INFO: VM Name: HouseKeeper2
INFO: include disk 'scsi0' 'local-zfs:vm-105-disk-1' 200G
INFO: include disk 'efidisk0' 'local-zfs:vm-105-disk-0' 528K
INFO: include disk 'tpmstate0' 'local-zfs:vm-105-disk-2' 4M
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating vzdump archive '/mnt/pve/backup/dump/vzdump-qemu-105-2025_01_06-03_15_06.vma.zst'
INFO: attaching TPM drive to QEMU for backup
INFO: drive-scsi0: attaching fleecing image local-zfs:vm-105-fleece-0 to QEMU
INFO: issuing guest-agent 'fs-freeze' command
INFO: issuing guest-agent 'fs-thaw' command
INFO: started backup task '191f1c85-8860-4acf-9f52-4a2a98cb59d2'
INFO: resuming VM again
INFO:   0% (978.8 MiB of 200.0 GiB) in 3s, read: 326.2 MiB/s, write: 286.3 MiB/s
INFO:   1% (2.1 GiB of 200.0 GiB) in 7s, read: 290.0 MiB/s, write: 288.0 MiB/s
...
INFO:  99% (199.8 GiB of 200.0 GiB) in 3m 46s, read: 2.9 GiB/s, write: 98.8 MiB/s
INFO: 100% (200.0 GiB of 200.0 GiB) in 3m 47s, read: 209.5 MiB/s, write: 207.5 MiB/s
INFO: backup is sparse: 118.98 GiB (59%) total zero data
INFO: transferred 200.00 GiB in 227 seconds (902.2 MiB/s)
INFO: archive file size: 16.79GB
INFO: adding notes to backup
INFO: prune older backups with retention: keep-last=3, keep-monthly=1
INFO: removing backup 'backup:backup/vzdump-qemu-105-2025_01_03-03_15_03.vma.zst'
INFO: pruned 1 backup(s) not covered by keep-retention policy
INFO: Finished Backup of VM 105 (00:05:33)
INFO: Backup finished at 2025-01-06 03:20:39
INFO: Starting Backup of VM 106 (qemu)
INFO: Backup started at 2025-01-06 03:20:39
INFO: status = running
INFO: VM Name: Files
INFO: include disk 'scsi0' 'local-zfs:vm-106-disk-1' 1000G
INFO: include disk 'efidisk0' 'local-zfs:vm-106-disk-0' 528K
INFO: include disk 'tpmstate0' 'local-zfs:vm-106-disk-2' 4M
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating vzdump archive '/mnt/pve/backup/dump/vzdump-qemu-106-2025_01_06-03_20_39.vma.zst'
INFO: attaching TPM drive to QEMU for backup
INFO: drive-scsi0: attaching fleecing image local-zfs:vm-106-fleece-0 to QEMU
INFO: issuing guest-agent 'fs-freeze' command
INFO: issuing guest-agent 'fs-thaw' command
INFO: started backup task '8dc645a3-7af2-4e4a-8db7-c9fee95d9f65'
INFO: resuming VM again
INFO:   0% (1.0 GiB of 1000.0 GiB) in 3s, read: 350.4 MiB/s, write: 333.5 MiB/s
INFO:   1% (10.4 GiB of 1000.0 GiB) in 37s, read: 280.8 MiB/s, write: 276.4 MiB/s
...
INFO:  99% (996.6 GiB of 1000.0 GiB) in 1h 8m, read: 3.4 GiB/s, write: 0 B/s
INFO: 100% (1000.0 GiB of 1000.0 GiB) in 1h 8m 2s, read: 1.7 GiB/s, write: 251.9 MiB/s
INFO: backup is sparse: 177.36 GiB (17%) total zero data
INFO: transferred 1000.00 GiB in 4082 seconds (250.9 MiB/s)
INFO: archive file size: 680.42GB
INFO: adding notes to backup
INFO: prune older backups with retention: keep-last=3, keep-monthly=1
INFO: removing backup 'backup:backup/vzdump-qemu-106-2025_01_03-03_20_46.vma.zst'
INFO: pruned 1 backup(s) not covered by keep-retention policy
INFO: Finished Backup of VM 106 (01:11:23)
INFO: Backup finished at 2025-01-06 04:32:02
INFO: Starting Backup of VM 200 (lxc)
INFO: Backup started at 2025-01-06 04:32:02
INFO: status = running
INFO: CT Name: Docker
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
INFO: creating vzdump archive '/mnt/pve/backup/dump/vzdump-lxc-200-2025_01_06-04_32_02.tar.zst'
INFO: tar: /mnt/pve/backup/dump/vzdump-lxc-200-2025_01_06-04_32_02.tmp: Cannot open: Permission denied
INFO: tar: Error is not recoverable: exiting now
INFO: cleanup temporary 'vzdump' snapshot
ERROR: Backup of VM 200 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/backup/dump/vzdump-lxc-200-2025_01_06-04_32_02.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/backup/dump/vzdump-lxc-200-2025_01_06-04_32_02.tar.dat' failed: exit code 2
INFO: Failed at 2025-01-06 04:32:08
INFO: Backup job finished with errors
TASK ERROR: job errors

It seems to be a LCX container specific problem.
 
Last edited:
Could you provide the storage backend setup. So maybe post output for cat /etc/pve/storage.cfg

Could you provide info on that 200 LXC. So maybe post output for pct config 200

What is the storage named backup?

Have you tried backing up that 200 LXC to a different storage location successfully?
 
Could you provide the storage backend setup. So maybe post output for cat /etc/pve/storage.cfg
Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl
        shared 0

nfs: backup
        export /volume1/ExternalBackup
        path /mnt/pve/backup
        server 192.168.200.120
        content backup
        options vers=4
        prune-backups keep-all=1

nfs: iso
        export /volume2/iso
        path /mnt/pve/iso
        server 192.168.200.121
        content iso
        options vers=4.1
        prune-backups keep-all=1

zfspool: local-zfs
        pool rpool
        content images,rootdir
        mountpoint /rpool
        sparse 1
 
Could you provide info on that 200 LXC. So maybe post output for pct config 200
Code:
arch: amd64
cores: 4
features: keyctl=1,nesting=1
hostname: Docker
memory: 4098
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:B3:83:6D,ip=dhcp,ip6=auto,type=veth
onboot: 1
ostype: debian
rootfs: local-zfs:subvol-200-disk-0,size=100G
swap: 512
unprivileged: 1
 
Ok as I though, that backup is an NFS share.

The following will probably / hopefully clear this up:

You need to set a local tmpdir in the /etc/vzdump.conf file. As in the docs. This will cause the backup to temporarily be created locally (non-NFS) & only then be transferred to the backup storage (NFS).

Here is an example (from the above docs):
Code:
tmpdir: /mnt/fast_local_disk
# This is only an example, so you can use any local directory you want.
AFAIK you will need to create that local dir yourself - if it does not already exist.
 
  • Like
Reactions: UdoB
Happy you got it working, maybe mark this thread as Solved. At the top of the thread, choose the Edit thread button, then from the (no prefix) dropdown choose Solved.
 

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!