Note:
Appliance
6.7 and 6.5
service-control --stop vmware-vpxd
service-control --stop vmware-content-library
6.0 (Appliance):
service-control --stop vmware-vpxd
service-control --stop vmware-vdcs
Windows
Open a command prompt, navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and run the following commands:
6.7 and 6.5:
service-control --stop vpxd
service-control --stop content-library
6.0:
service-control --stop vpxd
service-control --stop vdcs
Backing Up and Restoring the Embedded vCenter Server Database (Windows)
Backing Up and Restoring the Embedded vCenter Server (Appliance) Database
Caution: This procedure cannot be stopped. Stopping the script will cause inconsistencies in the vCenter Server database and can prevent vCenter Server from starting.
Log in as an administrator to the Windows host machine on which vCenter Server is installed.
Open vcdb.properties in the %VMWARE_CFG_DIR%\vmware-vpx\ folder.
In the vcdb.properties file, record the password for the vCenter Server database user.
Download the attached Windows back up and restore package windows_backup_restore.zip attached to this KB article and extract is on the vCenter Server.
From the command prompt run the command using the password from step 3: python.exe c:\path_to_script\backup_win.py -p "password" -f c:\path_to_backup_folder\backup_VCDB.bak
For example:
python.exe c:\backup_win.py -p "s_PJmbGzC83QRYlp" -f c:\backup_VCDB.bak
Once the backup completes, you see a message that the backup completed successfully.
Caution: This procedure cannot be stopped. Stopping the script will cause inconsistencies in the vCenter Server database and can prevent vCenter Server from starting.
Log in as an administrator to the Windows host machine.
Stop the vCenter Server and VMware Content Library services.
From a windows command prompt navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and run the following commands depending on vCenter Server version:
6.7 and 6.5:
.\service-control --stop vpxd
.\service-control --stop content-library
6.0:
.\service-control --stop vpxd
.\service-control --stop vdcs
Open vcdb.properties in the %VMWARE_CFG_DIR%\vmware-vpx\ folder.
In the vcdb.properties file, record the password for the vCenter Server database user.
If not previously downloaded, download the Windows back up and restore package windows_backup_restore.zip attached to this KB article.
From the command prompt, run this command using the password from step 3: python.exe c:\path_to_script/restore_win.py -p "password" -f c:\path_to_backup\backup_VCDB.bak
For example:
python.exe c:\restore_win.py -p "s_PJmbGzC83QRYlp" -f c:\backup_VCDB.bak
Once the restore completes, you see a message that the restore completed successfully.
Start the vCenter Server and VMware Content Library services.
From windows command prompt navigate to C:\"Program Files"\VMware\"vCenter Server"\bin and then run the following commands:
6.7 and 6.5:
.\service-control --start vpxd
.\service-control --start content-library
6.0:
.\service-control --start vpxd
.\service-control --start vdcs
Caution: This procedure cannot be stopped. Stopping the script will cause inconsistencies in the vCenter Server appliance database and can prevent vCenter Server appliance from starting.
Log in to the vCenter Server Appliance Linux console as root.
Download the Linux backup and restore package 2091961_linux_backup_restore.zip attached to this Knowledge Base article.
Make a backup_lin.py executable with this command: chmod 700 /path_to_script/backup_lin.py
For example:
chmod 700 /tmp/backup_lin.py
Run this command: python /path_to_script/backup_lin.py -f /path_to_backup/backup_VCDB.bak
For example:
python /tmp/backup_lin.py -f /tmp/backup_VCDB.bak
When the backup completes, you see a message that the backup completed successfully.
It may be required to move the database to a different vCenter Server Appliance VM or Windows installed vCenter Server provided it is the same vCenter Server instance as the backup source (e.g. a VM restored from backup or a clone of the existing VM). After you back up the embedded vPostgres database, you can restore it from the backup file.
Note: Using WinSCP on the vCenter Server Appliance may fail. For more information, see Connecting to vCenter Server Virtual Appliance using WinSCP fails with the error: Received too large (1433299822 B) SFTP packet. Max supported packet size is 1024000 B
Caution: This procedure cannot be stopped. Stopping the script will cause inconsistencies in the vCenter Server appliance database and can prevent vCenter Server appliance from starting.
Log in to the vCenter Server Appliance Linux console as root.
Download the Linux backup and restore package 2091961_linux_backup_restore.zip attached to this Knowledge Base article and extract it on the Linux machine.
Make restore_lin.py executable by running this command: chmod 700 /path_to_script/restore_lin.py
SFor example:
chmod 700 /tmp/restore_lin.py
Stop the vmware-vpxd and vmware-vdcs services, by running these commands depending on vCenter Server version:
6.7 and 6.5:
service-control --stop vmware-vpxd
service-control --stop vmware-content-library
6.0:
service-control --stop vmware-vpxd
service-control --stop vmware-vdcs
Run the restore_lin.py file and provide the location for the backup file.
For example, if the backup file is saved to /tmp/backup_VCDB.bak, run this command:
python /tmp/restore_lin.py -f /tmp/backup_VCDB.bak
When the restore completes, you see a message that the restore completed successfully.
Start the vmware-vpxd and vmware-vdcs services by running:
6.7 and 6.5:
service-control --start vmware-vpxd
service-control --start vmware-content-library
For 6.0:
service-control --start vmware-vpxd
service-control --start vmware-vdcs