Fix corrupted config in pct backup

cbc02009

New Member
May 3, 2020
7
1
1
39
Hello,

I'm trying to restore a container from backup, but I'm getting the following error:
Code:
lxc 20200721002219.834 ERROR    conf - conf.c:lxc_map_ids:2779 - newgidmap failed to write mapping "newgidmap: gid range [1001-1002) -> [1001-1002) not allowed": newgidmap 7869 0 100000 1001 1001 1001 1 1002 101002 64534
Failed to write id mapping for child process

It was previously an unprivileged container but I'm trying to restore it as a privileged container, so the mappings no longer matter and I can safely remove them. Is there a way to modify the configuration within the backup to remove the mappings that are causing the error?
 
yes - it's just a tar archive with the configs as first files. you can either pass it to 'pct create' as container template and re-use the parts of the configuration you want, or you can modify the config file stored in the tar archive.
 
yes - it's just a tar archive with the configs as first files. you can either pass it to 'pct create' as container template and re-use the parts of the configuration you want, or you can modify the config file stored in the tar archive.

Thank you for your help, I was mostly able to get it to work with pct restore, but I think I'm missing some part of the original configuration. Where is the .conf file located in the tar.lzo file, and how do I access it to verify I've recreated the container accurately?
 
it's the first file inside ;) you can view the config with pvesm extractconfig or the View Configuration button on the GUI
 
it's the first file inside ;) you can view the config with pvesm extractconfig or the View Configuration button on the GUI

Sorry that I'm having so much trouble with this, but when I run the command:
Code:
pvesm extractconfig vzdump-lxc-105-2020_07_19-06_47_27.tar.lzo

I get the error:
Code:
unable to parse volume ID 'vzdump-lxc-105-2020_07_19-06_47_27.tar.lzo'

I have also tried the same command on the extracted tar file, but I get the same error.

Also, when I extract the tar file, there is no 'first file' it's all directories. Is there a specific directory I'm supposed to look in?
Thank you so much for your help.
 
pvesm expects STORAGEID:VOLUMEID , as returned by pvesm list STORAGEID

Code:
$ tar tf /var/lib/vz/dump/vzdump-lxc-100023-2020_05_13-11_57_15.tar | head
./etc/vzdump/pct.conf
./etc/vzdump/pct.fw
./
[...]

those first two files are the container and firewall config
 
  • Like
Reactions: cbc02009
pvesm expects STORAGEID:VOLUMEID , as returned by pvesm list STORAGEID

Code:
$ tar tf /var/lib/vz/dump/vzdump-lxc-100023-2020_05_13-11_57_15.tar | head
./etc/vzdump/pct.conf
./etc/vzdump/pct.fw
./
[...]

those first two files are the container and firewall config

Thank you so much for your help!
 

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!