Note: Before uninstalling vCenter Server 6.0 with the embedded VMware Postgres database, ensure to take a backup of the embedded VMware Postgres database before proceeding to recreate the database after you reinstall vCenter Server.
Attached to this article is the
Windows_Backup_Restore.zip to streamline the backup and restore procedure for a Windows installed vCenter Server.
If you have installed vCenter Server in the default location, use these commands. If vCenter Server is installed in a non-default location, adjust these commands accordingly.
Perform these steps on the Host Operating System (Host OS) on which you installed vCenter Server.
- Download and unzip one of the *_Backup_Restore.zip files attached to this article .
Note: For this article, we are extracting to c:\backup_restore
- Collect a vCenter server support log bundle.
- Locate and open the %VMWARE_CFG_DIR%\vmware-vpx\ vcdb.properties file.
- Copy the Postgres vCenter user password string from the vcdb.properties file.
For example:
driver = org.postgresql.Driver
dbtype = PostgreSQL
url = jdbc:postgresql://localhost:5432/VCDB
username = vc
> password = password1
password.encrypted = false
- Open an elevated command prompt. For more information, see Opening a command or shell prompt (1003892).
- Stop the VMware VirtualCenter service by navigating to Start > Control Panel > Administrative Tools > Services.
- Right-click VMware VirtualCenter service and click Stop and wait for the service to stop.
- UseRun these commands to execute the backup script:
cd %VMWARE_CIS_HOME%\Python\
C:\Program Files\VMware\vCenter Server\python> python c:\backup_restore\backup_win.py -p "<Password from Step 4>" -f <backup directory>\backup_VCDB.bak
For example:
C:\Program Files\VMware\vCenter Server\python> python c:\backup_restore\backup_win.py -p "password1" -f c:\backup_restore\backup_VCDB.bak
Notes:
- Ensure that quotes are used in the -p switch
- Ensure that the drive you are backing up to has enough space to hold the *.bak file being generated
- If you have performed a backup previously, this operation will overwrite the previous backup. Adjust the name of the *.bak file to ensure that you do not overwrite your database backup
- When the backup is completed,you will see this message:
Backup completed successfully.
- Uninstall vCenter Server.
- Reinstall vCenter Server on the same host machine.
- Stop the VMware VirtualCenter service by navigating to Start > Control Panel > Administrative Tools > Services. Right-click VMware VirtualCenter service and click Stop and wait for the service to stop.
- Locate and open the vcdb.properties under %VMWARE_CFG_DIR%\vmware-vpx\ . This password will be regenerated and will not be the same as Step 4.
- Copy the Postgres VC user's password string from the vcdb.properties file.
For example:
driver = org.postgresql.Driver
dbtype = PostgreSQL
url = jdbc:postgresql://localhost:5432/VCDB
username = vc
> password = password
password.encrypted = false
- Open an elevated command prompt. For more information, see Opening a command or shell prompt (1003892).
- Run these commands to execute the restore script:
cd %VMWARE_CIS_HOME%\Python\
C:\Program Files\VMware\vCenter Server\python> python c:\backup_restore\restore_win.py -p "<Password from Step 13>" -f <backup directory>\backup_VCDB.bak
For example:
C:\Program Files\VMware\vCenter Server\python> python c:\backup_restore\restore_win.py -p "password " -f c:\backup_restore\backup_VCDB.bak
Note: Ensure quotes are used in the -p switch.
- When the restore is completed, you will see this message:
Restore completed successfully.
- Start the VMware VirtualCenter service by navigating to Start > Control Panel > Administrative Tools > Services.
- Right-click VMware VirtualCenter service and click Start and wait for the service to start.