How to backup users and permissions?

dm15

New Member
Mar 4, 2018
13
3
3
82
I have a node that has lots of VMs attached to individual users with exclusive permissions for each VM.

How can I backup and restore all users and permissions on the other node? (no cluster)

I have tried copying /etc/pve/user.cfg directly to a new node, but this solution seem to be incorrect and prevents even a root to access the web interface.

There is absolutely zero documentation regarding this issue at https://pve.proxmox.com/wiki/User_Management
 
Last edited:

dm15

New Member
Mar 4, 2018
13
3
3
82
Okay, I have found a solution in this precious post:

Since /etc/pve is a virtual filesystem stored in a SQLite database all you need to backup is:
/var/lib/pve-cluster/
- Do a SQLite database backup of config.db (https://www.sqlite.org/backup.html)
- Backup corosync.authkey
/var/lib/pve-firewall/
- What ever is in there

Just to recapitulate, what I did was:
On the source node
Code:
systemctl stop pve-cluster
backup /var/lib/pve-cluster/config.db

On the target node
Code:
systemctl stop pve-cluster
restore /var/lib/pve-cluster/config.db from a source backup
systemctl start pve-cluster

/etc/hostname and /etc/hosts records should match on both nodes as well as a root password.

I hope this will help someone in future
 

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 your own in 60 seconds.

Buy now!