BUG: restoring LXC from backup w/o disks present ends up deleting LXC config

ickyfehmleh

New Member
Dec 4, 2024
1
0
1
Unsure if this has been posted before but I believe I have found a bug with Proxmox 8.3.0, possibly other releases.

My RAID recently died, luckily after I made backups. The root disk was still live along with all the .conf files for LXCs and VMs. During the restoration I rsync'ed files to the new RAID (/raid/dump/) and then used the Proxmox UI to restore that backup. Nothing was present in /raid/images for any of the VMs or LXCs. For a VM, this was not an issue. For an LXC, this resulted in the deletion of the LXC configuration from Proxmox:

Code:
recovering backed-up configuration from 'pool-raid:backup/vzdump-lxc-401-2025_12_07-13_31_17.tar.zst'
Formatting '/raid/images/401/vm-401-disk-0.raw', fmt=raw size=34359738368 preallocation=off
Creating filesystem with 8388608 4k blocks and 2097152 inodes
Filesystem UUID: e18c5202-2753-4576-a423-948a2bb1337f
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624
disk image '/raid/images/401/vm-401-disk-0.raw' does not exist
TASK ERROR: unable to restore CT 401 - volume 'pool-raid:401/vm-401-disk-0.raw' does not exist

At this point Proxmox will also delete the LXC's .conf file from /etc/pve/lxc/###.conf. Eek!

The expected behavior would be the same as the VM restore: create the files if they're not present. It was wildly unexpected to have Proxmox delete the LXC when doing a restore.

Making /raid/images/###/vm-###-disk-#.raw (just using mkdir -p and touch) prevented this bug from reoccurring. Luckily I also made backups of the LXC configuration files before restoring.