VMware vSphere 6 release brought more robust vPostgres Database which gets installed by default when installing on Windows Server. For users willing to install the Windows version of vCenter Server 6 VMware has prepared a script which can be used to backup/restore the vPostgres Database. So in this post I'll walk you through: vSphere 6 – How To Backup vCenter 6 vPostgress Database ( On Windows)
So unless you specify external DB during the installation process,the installer will install this vPostgres database by default. The ESXi host and virtual machine limits have been increased in vCenter Server 6.0 with the vPostgres database to 20 hosts and 200 virtual machines. Previous release had this limit fixed to 5 hosts and 50 virtual machines supported with the embedded Microsoft SQL database. With 20 hosts you can do quite a lot… So in today's post I'll walk you through the process.
In one of my earlier posts I have walked you through (with a video) an installation (and some gotchas) of vCenter Server 6 on Windows server with an external SQL server Database, which can obviously can be backed up or protected with other backup tools, but in this post we will focus on smaller to middle size installations.
vSphere 6 – How To Backup vCenter 6 vPostgres Database ( On Windows)
Step 1. Connect to your vCenter server with admin rights and download the script from this VMware KB (at the bottom, file called windows_backup_restore.zip ) > put both file to the root of the c: drive to keep things simple
Step 2. Go to the %VMWARE_CFG_DIR%vmware-vpx directory and open a file called vcdb.properties > Open the file in notepad and copy the password into clipboard.
Step 3. Open command prompt and navigate to %vmware_cis_home%python and run the backup_win.py script and use the password you have copied in previous step.
python.exe c:backup_win.py -p “Nw}IO4Wgm)1P$!C” -f c:backup_of_my_vPosgressDB.bak
If you need to restore vCenter vPostgres Database then similar steps has to be taken, but in addition before the restore starts, you must stop some VMware services:
- Stop the vCenter Server and VMware Content Library services.
- From the Windows Start menu, navigate to Start > Administrative Tools > Services.
- Right-click VMware VirtualCenter Server and select Stop.
- Right-click VMware Content Library Service and select Stop
Step 1. Go to the %VMWARE_CFG_DIR%vmware-vpx directory and open a file called vcdb.properties > Open the file in notepad and copy the password into clipboard.
Step 2. Open command prompt and navigate to %vmware_cis_home%python and run the restore_win.py script and use the password you have copied in previous step.
python.exe c:restore_win.py -p “Nw}IO4Wgm)1P$!C” -f c:backup_of_my_vPosgressDB.bak
Step 3. Start those 2 VMware services that you have stopped in step 0
Even if the vast majority of backup products out there isn't supported on vSphere 6, it's just of question of the time when this compatibility will be announced. However a granular backup/restore for vCenter DB is good backup strategy as well.
As concerning the automating and different specifications on where to send those backups you can obviously you specify different destination and (or) create a daily task which would automate the backups on Windows server, but I believe that you're mastering those tasks by yourself… -:).
This VMware KB also provides backup steps for VCSA based installations.
Source: VMware KB 2091961