LXC config restore

quickmic

Renowned Member
Dec 12, 2014
3
0
66
Hello

I modified my container config file a bit to forward USB devices.

lxc.cgroup.devices.allow: c 189:385 rwm
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file
lxc.cgroup.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB1 none bind,optional,create=file

Each time after I restore a snapshot, the modifications are ignored and I have to add them again manually.
Is this behavior on purpuse? I my case it's a bit annoying.
 
If you restore a snapshot that was made after you added the options to your container, they should be restored too.

If you take a look at your container config, you should see the individual configurations that will be restored by a snapshot below the main configuration (in [snapshot-name] sections). Check if the snapshot you want to restore has the options set in its configuration section. If not, it should be fine to add it there as well.
 
Sorry, I used the wrong wording in my previous post.
I'm talking about backups not snapshots.
I checked the backup dump file. I guess the config is stored in the /etc/vzdump/pct.conf
This file includes all my modifications, but skipped on restore.
 
That is intended behaviour if you are not root, for security reasons. Restoring a container only restores a set of whitelisted parameters.

Incidentally, it seems there is currently a bug where even if you are root, custom options will not be restored.
I have opened an issue on our bugtracker for you, you can check it's status here.
 

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!