Backup fails for LXC

Lucas Rey

Well-Known Member
May 18, 2018
39
24
48
51
Dear community, I'm facing an issue on backup 2 LXC where I hosted AdGuard Home.

This is the error I have:
Code:
INFO: starting new backup job: vzdump 202 --notification-mode auto --remove 0 --mode snapshot --node myhostname --compress 0 --storage local --notes-template '{{guestname}}'
INFO: Starting Backup of VM 202 (lxc)
INFO: Backup started at 2024-08-03 07:07:21
INFO: status = running
INFO: CT Name: AdGuard2
INFO: including mount point rootfs ('/') in backup
INFO: mode failure - some volumes do not support snapshots
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend
INFO: ionice priority: 7
INFO: CT Name: AdGuard2
INFO: including mount point rootfs ('/') in backup
INFO: starting first sync /proc/2649616/root/ to /var/lib/vz/dump/vzdump-lxc-202-2024_08_03-07_07_21.tmp
ERROR: rsync: [sender] readlink_stat("/proc/2649616/root/snap/adguard-home/7100") failed: Permission denied (13)
ERROR: rsync: [sender] readlink_stat("/proc/2649616/root/snap/core22/1380") failed: Permission denied (13)
ERROR: rsync: [sender] readlink_stat("/proc/2649616/root/snap/snapd/21759") failed: Permission denied (13)
ERROR: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
ERROR: Backup of VM 202 failed - command 'rsync --stats -h -X -A --numeric-ids -aH --delete --no-whole-file --sparse --one-file-system --relative '--exclude=/tmp/?*' '--exclude=/var/tmp/?*' '--exclude=/var/run/?*.pid' /proc/2649616/root//./ /var/lib/vz/dump/vzdump-lxc-202-2024_08_03-07_07_21.tmp' failed: exit code 23
INFO: Failed at 2024-08-03 07:07:22
INFO: Backup job finished with errors
INFO: notified via target `mail-to-root`
TASK ERROR: job errors

The LXC config:
Code:
arch: amd64
cores: 4
features: nesting=1,fuse=1
hostname: AdGuard2
memory: 512
nameserver: 1.1.1.1
net0: name=eth0,bridge=vmbr7,gw=192.168.10.1,hwaddr=BC:24:11:94:6E:A2,ip=192.168.10.19/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local:202/vm-202-disk-0.raw,size=4G
searchdomain: 8.8.8.8
startup: order=4
swap: 2048
unprivileged: 1
lxc.mount.auto: cgroup:rw
lxc.mount.auto: sys:rw

My other LXCs don't have any issue in backup, but they don't have the following settings:
Code:
features: nesting=1,fuse=1
lxc.mount.auto: cgroup:rw
lxc.mount.auto: sys:rw

Is this settings the root cause? Currently I'm using STOP MODE and I'm able to do backup. Is there any other way?

Thank you
Lucas
 
Could you provide the config of another LXC where it works? Did you start the command via the WebGUI or in a console?
 
Could you provide the config of another LXC where it works? Did you start the command via the WebGUI or in a console?
This is another LXC where backup works.
I'm using the GUI to start the backup on problematic LXC, but I get the same error if I use the CLI.

Code:
arch: amd64
cores: 4
features: nesting=1
hostname: PiHole1
memory: 512
nameserver: 8.8.8.8
net0: name=eth0,bridge=vmbr7,gw=192.168.10.1,hwaddr=AA:29:02:B2:35:10,ip=192.168.10.16/24,type=veth
onboot: 0
ostype: debian
rootfs: local:204/vm-204-disk-0.raw,size=4G
searchdomain: 1.1.1.1
startup: order=4
swap: 512
 
I assume the backup destination is a network storage (smb, nfs)?

A backup to network shares only works with privileged containers. With unprivileged containers, this is only possible via detours ...
 
I assume the backup destination is a network storage (smb, nfs)?

A backup to network shares only works with privileged containers. With unprivileged containers, this is only possible via detours ...
I tried also with local storage, but unfortunately I got same error
 
With unprivileged containers, this is only possible via detours ...
Second this, especially if the container is still running. As far as I know, AdGuard Home should usually be run privileged user, except if you have set it up to be able to run it without superuser (see here).
 
What errors are there?
Still same error

Code:
# vzdump 201 --node mynode --storage local
INFO: starting new backup job: vzdump 201 --node mynode --storage local
INFO: Starting Backup of VM 201 (lxc)
INFO: Backup started at 2024-08-05 14:59:48
INFO: status = running
INFO: CT Name: AdGuard1
INFO: including mount point rootfs ('/') in backup
INFO: mode failure - some volumes do not support snapshots
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend
INFO: ionice priority: 7
INFO: CT Name: AdGuard1
INFO: including mount point rootfs ('/') in backup
INFO: starting first sync /proc/1156652/root/ to /var/lib/vz/dump/vzdump-lxc-201-2024_08_05-14_59_48.tmp
ERROR: rsync: [sender] readlink_stat("/proc/1156652/root/snap/adguard-home/7100") failed: Permission denied (13)
ERROR: rsync: [sender] readlink_stat("/proc/1156652/root/snap/core22/1380") failed: Permission denied (13)
ERROR: rsync: [sender] readlink_stat("/proc/1156652/root/snap/snapd/21759") failed: Permission denied (13)
ERROR: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
ERROR: Backup of VM 201 failed - command 'rsync --stats -h -X -A --numeric-ids -aH --delete --no-whole-file --sparse --one-file-system --relative '--exclude=/tmp/?*' '--exclude=/var/tmp/?*' '--exclude=/var/run/?*.pid' /proc/1156652/root//./ /var/lib/vz/dump/vzdump-lxc-201-2024_08_05-14_59_48.tmp' failed: exit code 23

This most probably is the root cause, maybe because is unprivileged: 1 as stated above
INFO: mode failure - some volumes do not support snapshots

EDIT:
Confirmed! It's the unprivileged setting. If I setup as 0 the backup works (only suspend mode, not snapshot). But then AdGuard doesn't load properly. So, I'll keep the backup setting as "STOP MODE" and do the backup every night... or maybe rollback to PiHole.
 
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!