How to restore config.db or list contents

carsten2

Renowned Member
Mar 25, 2017
283
37
93
56
I case of desaster revovery:

1) How to replace the /var/lib/pve-cluster/config.db output backup with an existing one? I.e. which services to stop and restart?
2) How to list contents of VM configuration vom config.db?
 
/var/lib/pve-cluster/config.db

is a sqlite database serving as backing storage for the pmxcfs (cluster filesystem) - if you want to replace it you need to stop the pve-cluster.service beforehand and make sure that the pmxcfs process is not running - if this is a clustered environment you need to stop the service on all nodes before replacing the database.

on the other hand - you can also just save the contents of /etc/pve (where pmxcfs is mounted) via rsync and replace those on a fresh install.

How to list contents of VM configuration vom config.db?
easiest way is to start pmxcfs with the file in place - the contents are in /etc/pve
else the schema is not too difficult to understand - you can also open it with sqlite

check out the reference documentation on the topic: https://pve.proxmox.com/pve-docs/chapter-pmxcfs.html

I hope this helps!