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?
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.
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