How to backup users and permissions?

dm15

New Member
Mar 4, 2018
13
6
3
85
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:
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