Put the vCenter Appliance embedded database in a consistent state

One of my customers asked me to backup and replicate their VMware vCenter 5.5 Appliance using the embedded database with Veeam Backup & Replication. To achieve this the vCenter embedded database, which is a vPostgres database, must in a consistent state before it can be backed up and replicated properly.


There is a KB article from VMware about Backing up and restoring the vCenter Server Appliance vPostgres database. But the downside on this is that every time the backup runs the vPostgres database is dumped on the disk and the database is not consistent when it replicated. So when the replicated vCenter on the DR side is started bad things will happen…

To put the vCenter Appliance embedded database in a consistent state we need to tell the vPostgres database before the Backup / Replication job starts to prepare for performing an on-line backup. This can be done by creating 2 scripts which put the vPostgres database in a on-line backup mode and afterwards exits this state. These two scripts are triggered by the VMware tools when the Backup and Replicate job runs when the “Guest Quiescence” option is enabled.

For the VMware vCenter 6.0 Appliance this is not necessary because these scripts are already in place by default!

Let’s get started!

Fist enable SSH on the vCenter (if you’ve not done that already).

Login the VAMI of the vCenter Appliance and go to the Admin tab and change “Administrator SSH login enabled” to Yes.

Now start your favourite SSH client and login the SSH session of the vCenter Appliance.
And create the first script for “freezing” the vPostgres database.

And and the following content :

Make the script executable.

Then create the second script for “releasing” the vPostgres database.
Read More

Monitor Veeam Backup Jobs with PRTG

Last weekend I was playing around with Paessler PRTG Network Monitor and asked myself how hard can it be to monitor a Veeam Backup Job status. Well this proved to be a bit more difficult than I thought… The reason why is because I also need to see the date of the Backup Job somewhere in the message of the sensor, otherwise you can’t see when the last time was that the backup job has run. And this part was a little bit tricky to get to work, but after some PowerShell voodoo I got the result I was looking for :


And when there is a Backup Job warning the status changes and the Backup Job date remains visible :



Prerequisites :

  • Veeam Backup and Replication PowerShell installed on the Veeam Backup Server.
  • Veeam Backup server is already being monitored.
  • Windows Remote Management enabled on the Veeam Backup Server.
  • PRTG probe service account has access to the Veeam Backup Server.


    PowerShell Script with DB on the same host as the Veeam Backup Server :

    Save the following script to the file backup_status.ps1 in the directory : C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE

    Read More