Problem restoring LXC backups from proxmox 7 to proxmox 8

e36Alex

Member
Jan 1, 2021
10
0
6
42
Hi,

i got a problem "migrating" my LXC containers from node with v7 to another node with v8.

My attempt was to use backups from v7 for restoring them on v8 node, but i get this error:

Code:
recovering backed-up configuration from 'nas02:backup/vzdump-lxc-102-2023_12_25-00_07_27.tar.zst'
Creating filesystem with 2097152 4k blocks and 524288 inodes
Filesystem UUID: 5bd7c893-8c7f-4d36-94ef-3d96b8c8d93d
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
restoring 'nas02:backup/vzdump-lxc-102-2023_12_25-00_07_27.tar.zst' now..
extracting archive '/mnt/pve/nas02/dump/vzdump-lxc-102-2023_12_25-00_07_27.tar.zst'
lxc 20231225200120.517 ERROR    conf - ../src/lxc/conf.c:lxc_map_ids:3701 - newuidmap failed to write mapping "newuidmap: uid range [991200000-991400000) -> [991200000-991400000) not allowed": newuidmap 487066 991200000 991200000 200000 0 100000 65536
Failed to write id mapping for child process
lxc 20231225200120.517 ERROR    utils - ../src/lxc/utils.c:lxc_drop_groups:1365 - Operation not permitted - Failed to drop supplimentary groups
lxc 20231225200120.517 ERROR    utils - ../src/lxc/utils.c:lxc_switch_uid_gid:1340 - Invalid argument - Failed to switch to gid 0
TASK ERROR: unable to restore CT 102 - command 'lxc-usernsexec -m u:991200000:991200000:200000 -m g:991200000:991200000:200000 -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --zstd --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' -C /var/lib/lxc/102/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 1

Importing VM backups works fine.

Any ideas how to solve it?

Thanks in advance,
Alex
 
The backup being restored contains an idmap that maps container IDs to the same IDs on the host. This seems unnecessary. I recommend removing the idmap to resolve the error. To do so, you will need to edit the container configuration of the backup.
Code:
mkdir vzdump_edit
tar --zstd -xf vzdump.tar.zst -C vzdump_edit

# Remove these lines from vzdump_edit/etc/vzdump/pct.conf
# lxc.idmap: u 991200000 991200000 200000
# lxc.idmap: g 991200000 991200000 200000

tar -czpf vzdump_edit.tar.zstd -C vzdump_edit .
 
Last edited:
  • Like
Reactions: e36Alex
Thanks for your reply.
I think these IDs are needed for FreeIPA - thought the mapping would be migrated as well.
Do i have so set something manually on the new host?