This article provides guidance on backing up and restoring the embedded vPostgres database (VCDB) used by vCenter Server. This method can help prevent data loss when uninstalling vCenter Server, as the embedded database is removed during the uninstallation process.
Important Notes:
For details on supported backup and restore options, refer to:
VMware vCenter Server
service-control --stop vmware-vpxdservice-control --stop vmware-content-libraryWindows
Open a command prompt, navigate to C:\"Program Files"\VMware\"vCenter Server"\bin
6.5 or laterservice-control --stop vpxdservice-control --stop content-library
2091961_linux_backup_restore.zip attached to this Knowledge Base article.backup_lin.py executable.chmod 700 /path_to_script/backup_lin.pychmod 700 /tmp/backup_lin.pypython /path_to_script/backup_lin.py -f /path_to_backup/backup_VCDB.bakpython /tmp/backup_lin.py -f /tmp/backup_VCDB.bak2091961_linux_backup_restore.zip attached to this Knowledge Base article and extract it on the destination vCSA.restore_lin.py executable.chmod 700 /path_to_script/restore_lin.pychmod 700 /tmp/restore_lin.pyservice-control --stop vmware-vpxdservice-control --stop vmware-content-libraryrestore_lin.py file and provide the location for the backup file.python /path_to_script/restore_lin.py -f /path_to_backup/backup_VCDB.bakpython /tmp/restore_lin.py -f /tmp/backup_VCDB.bakservice-control --start vmware-vpxdservice-control --start vmware-content-libraryvcdb.properties in the %VMWARE_CFG_DIR%\vmware-vpx\ folder.windows_backup_restore.zip attached to this KB article and extract it on the vCenter Server.python.exe c:\path_to_script\backup_win.py -p "password" -f c:\path_to_backup_folder\backup_VCDB.bakpython.exe c:\backup_win.py -p "example_password" -f c:\backup_VCDB.bak
C:\"Program Files"\VMware\"vCenter Server"\bin and run the following commands:\service-control --stop vpxd
.\service-control --stop content-library%VMWARE_CFG_DIR%\vmware-vpx\ folder.windows_backup_restore.zip attached to this KB article.Restore the VCDBpython.exe c:\path_to_script/restore_win.py -p "password" -f c:\path_to_backup\backup_VCDB.bak
Examplepython.exe c:estore_win.py -p "example_password" -f c:\backup_VCDB.bak
Start the vCenter Server and VMware Content Library services.
From the Windows command prompt, navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and then run the following commands:
.\service-control --start vpxd.\service-control --start content-library
VMware Skyline Health Diagnostics for vSphere - FAQ
Enabling secure backup and restore in the vCenter Server Appliance
For vCenter 6.0, below are the steps to be followed :
service-control --stop vmware-vpxdservice-control --stop vmware-vdcsWindows
Open a command prompt, navigate to C:\"Program Files"\VMware\"vCenter Server"\binservice-control --stop vpxdservice-control --stop vdcs
2091961_linux_backup_restore.zip attached to this Knowledge Base article.backup_lin.py executable.chmod 700 /path_to_script/backup_lin.pychmod 700 /tmp/backup_lin.pypython /path_to_script/backup_lin.py -f /path_to_backup/backup_VCDB.bakpython /tmp/backup_lin.py -f /tmp/backup_VCDB.bak2091961_linux_backup_restore.zip attached to this Knowledge Base article and extract it on the destination vCSA.restore_lin.py executable.chmod 700 /path_to_script/restore_lin.pychmod 700 /tmp/restore_lin.pyservice-control --stop vmware-vpxdservice-control --stop vmware-vdcsrestore_lin.py file and provide the location for the backup file.python /path_to_script/restore_lin.py -f /path_to_backup/backup_VCDB.bakpython /tmp/restore_lin.py -f /tmp/backup_VCDB.bakservice-control --start vmware-vpxdvcdb.properties in the %VMWARE_CFG_DIR%\vmware-vpx\ folder.windows_backup_restore.zip attached to this KB article and extract it on the vCenter Server.python.exe c:\path_to_script\backup_win.py -p "password" -f c:\path_to_backup_folder\backup_VCDB.bakpython.exe c:\backup_win.py -p "example_password" -f c:\backup_VCDB.bak
C:\"Program Files"\VMware\"vCenter Server"\bin and run the following commands:.\service-control --stop vpxd.\service-control --stop vdcs%VMWARE_CFG_DIR%\vmware-vpx\ folder.windows_backup_restore.zip attached to this KB article.Restore the VCDBpython.exe c:\path_to_script/restore_win.py -p "password" -f c:\path_to_backup\backup_VCDB.bak
Examplepython.exe c:estore_win.py -p "example_password" -f c:\backup_VCDB.bak
Start the vCenter Server and VMware Content Library services.
From the Windows command prompt, navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and then run the following commands:.\service-control --start vpxd.\service-control --start vdcs