In a vRealize Automation (vRA) formerly known as vCloud Automation Center (vCAC) there are quite a few components to keep in sync so you can successfully restore the environment in case of a disaster. I mentioned backup and restore as a critical piece of a vRA implementation during the podcast i joined the other week. Click here to view the podcast blog post.
For a standard vRA deployment including provisioning virtual machines (VMs) to vCenter Server you got a minimum of three (most likely four) databases to keep track of apart from the VMs delivering the management components:
- vRA VA database
- vRA IaaS database
- vCenter Server database for management systems
- vCenter Server database for workload systems
In many of the deployments i have implemented the customer database of choice has been Microsoft SQL (MSSQL) where possible and that covers three of the above mentioned databases. However, MSSQL is not supported for the vRA virtual appliance so in that case you need to use the internal PostgreSQL database or use an external PostgreSQL database.
Below is a script that you can run in the vRA VA to perform a PostgreSQL database dump that can be used for restore if necessary. The script has been verified for vRA version 6..1.0.0 Build 2077124.
The backups are created in the directory /root/postgresql_backup, which you have to create manually, and for the below example i save 7 daily copies of the dump.
#/bin/bash
- /Storage/db
- /Storage/log
- minute (from 0 to 59)
- hour (from 0 to 23)
- day of month (from 1 to 31)
- month (from 1 to 12)
- day of week (from 0 to 6) (0=Sunday)
I used the following crontab entry to schedule the backup to take place every day at 10:30 PM for my most recent implementation.
2 pings