Latest Posts


Total Pageviews

Friday, 29 January 2016

Restore the vCenter Server 6.0 Appliance vPostgres Database

Backing up and restoring your database protects the data stored in your database. When you install vCenter Server, if you want to use the embedded vPostgres database and later have to uninstall vCenter Server, all data is lost, because the embedded vPostgres database is also uninstalled.
To minimize the risk of data loss, you must regularly back up and restore the vPostgres database in both vCenter Server and the vCenter Server Appliance.

Note: This article is only supported for backup and restore of the vPostgres database to the same vCenter Server or vCenter Server Appliance. Use of image-based backup and restore is the only solution supported for performing a full, secondary appliance restore.

• Visit the KB article and download the file.  Extract script to the desktop
• SSH to the vCenter 6.0 appliance and login as root
• To enable the bash shell
Type shell.set --enabled true
• To access the bash shell
Type shell
• To change the default shell to bash
Type chsh -s /bin/bash root
• Using WinSCP, connect to vCenter 6.0 appliance and transfer the file and the backup_VCDB.bak database file from the desktop backup folder.  Make a note of where you transfer the files (/root is a good place).
• Return to the ssh session and change directory to where you placed the restore file and database
• To make it executable
Enter chmod 700 ./
• Stop the vmware-vpxd and vmware-vdcs services:
service vmware-vpxd stop
service vmware-vdcs stop

• Enter python ./ -f backup_VCDB.bak and wait for the restore to complete (You should see "Restore completed successfully.")
• Start the vmware-vpxd and vmware-vdcs services:
service vmware-vpxd start    
service vmware-vdcs start