In my last post (Backup vCSA vPostgres database, roles and permissions) I described the creation of a vCSA vPostgres database backup and the export of all roles and permissions. Now it is time to restore the data.

To restore a previous created backup from a vCSA vPostgres database as well as the roles and permissions you need to follow these steps.


Restore vPostgres Database:

  • Transfer the file and VCDB.bak to /tmp on the vCSA via WinSCP or e.g. (How to enable BASH on vCSA to transfer files via SCP or e.g.)
  • Login to vCSA as root
  • Make the py script executable chmod 700 /tmp/
  • stop the services vpxd and vdcs
    • service vmware-vpxd stop
    • service vmware-vdcs stop
  • Execute the script python /tmp/ -f /tmp/VCDB.bak

  • After successfully restore start the services vpxd and vdcs
    • service vmware-vpxd start
    • service vmware-vdcs start

Login Web Client with administrator@vsphere.local

  • Reconnect your ESXi hosts.
  • Add missing licenses

Import roles and permissions:

  • Execute the vsphere_RightsRoles_Import.ps1 script and fill in your data
  • The script uses the vcenter-permissions.xml file on c:\

Enable HA

After that you should be able to connect with AD users with the old rights.