Restore LXC - edit config file; restore fails

baudneo

Member
Nov 7, 2020
10
0
6
Mars 2032
www.zoneminder.com
Code:
recovering backed-up configuration from 'Backup_NAS:backup/vzdump-lxc-5000-2023_05_03-03_08_55.tar.zst'
restoring 'Backup_NAS:backup/vzdump-lxc-5000-2023_05_03-03_08_55.tar.zst' now..
extracting archive '/backups/dump/vzdump-lxc-5000-2023_05_03-03_08_55.tar.zst'
lxc 20230509055514.227 ERROR    conf - ../src/lxc/conf.c:lxc_map_ids:3701 - newgidmap failed to write mapping "newgidmap: gid range [44-45) -> [44-45) not allowed": newgidmap 252489 0 100000 44 44 44 1 45 100045 62 107 108 1 108 100108 1892 2000 2000 1 2001 102001 63535
Failed to write id mapping for child process
lxc 20230509055514.227 ERROR    utils - ../src/lxc/utils.c:lxc_drop_groups:1365 - Operation not permitted - Failed to drop supplimentary groups
lxc 20230509055514.227 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 101 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:44 -m g:44:44:1 -m g:45:100045:62 -m g:107:108:1 -m g:108:100108:1892 -m g:2000:2000:1 -m g:2001:102001:63535 -- 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/101/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 1

Trying to restore a backup, but it fails due to ID mapping. Is there a way to edit the config file to remove the ID mapping and restore it?

TIA!
 
Code:
recovering backed-up configuration from 'Backup_NAS:backup/vzdump-lxc-5000-2023_05_03-03_08_55.tar.zst'
  Logical volume "vm-5000-disk-0" created.
Creating filesystem with 48234496 4k blocks and 12058624 inodes
Filesystem UUID: a371600c-e61a-452a-a567-36201548f7e3
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872
restoring 'Backup_NAS:backup/vzdump-lxc-5000-2023_05_03-03_08_55.tar.zst' now..
extracting archive '/backups/dump/vzdump-lxc-5000-2023_05_03-03_08_55.tar.zst'
lxc 20230509060727.558 ERROR    conf - ../src/lxc/conf.c:lxc_map_ids:3701 - newgidmap failed to write mapping "newgidmap: gid range [44-45) -> [44-45) not allowed": newgidmap 75693 0 100000 44 44 44 1 45 100045 62 107 108 1 108 100108 1892 2000 2000 1 2001 102001 63535
Failed to write id mapping for child process
lxc 20230509060727.559 ERROR    utils - ../src/lxc/utils.c:lxc_drop_groups:1365 - Operation not permitted - Failed to drop supplimentary groups
lxc 20230509060727.559 ERROR    utils - ../src/lxc/utils.c:lxc_switch_uid_gid:1340 - Invalid argument - Failed to switch to gid 0
  Logical volume "vm-5000-disk-0" successfully removed
TASK ERROR: unable to restore CT 5000 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:44 -m g:44:44:1 -m g:45:100045:62 -m g:107:108:1 -m g:108:100108:1892 -m g:2000:2000:1 -m g:2001:102001:63535 -- 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/5000/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 1