The vCenter Server Appliance got a bunch of extra features in vSphere 6.5. One of which is native backup and restore functionality utilising the vCenter Server Management API. The vCenter Server database, configuration files, and alarms can be backed up to minimise the time required to restore data centre operations. There is also the option of including statistics, events, and tasks. The backup process compresses key files into a tar bundle, which can be encrypted if desired.
In this post we will walk through configuring a backup of the vCenter Server Appliance and then restoring it. For more information see the vSphere 6.5 Documentation Centre. A backup job can also be invoked as a cron job from a bash script, for an example click here.
The backup procedure is done through the VCSA appliance management page. Browse to https://VCSA:5480, where VCSA is the IP address or FQDN of your vCenter. Log in using the root password.
You will see the vCenter Server Appliance dashboard. Locate the Backup button in the top right of the screen.
Select the protocol, location, and credentials to use for the backup, and then click Next. Supported protocols are FTP SFTP, HTTP, HTTPS, and SCP. The location must be an empty folder. In this example I will be backing up the VCSA to an FTP server.
Should you require backups to be encrypted select the Encrypt Backup Data tickbox and supply a password.
Select the data to backup and click Next.
Review the summary page and click Finish.
The backup will now proceed and a status bar will be displayed.
Once the backup is complete click Ok.
Should we ever need to restore the VCSA from a backup the procedure involves deploying a new appliance, and importing all data and settings from the backup. Before beginning the restore process ensure the old VCSA is not powered on, as this would cause an IP address conflict.
If your virtual appliance still exists in vCenter consider deleting or renaming the old appliance. During the restore process you can configure the network settings and host name of the old appliance; however you will not be able to give the the new appliance the same name as the old one since duplicate names cannot exist in the vSphere inventory.
Download the VMware vCenter Server Appliance 6.5 ISO from VMware downloads. Mount the ISO on your computer. The VCSA 6.5 installer is compatible with Mac, Linux, and Windows. Browse to the corresponding directory for your operating system, e.g. \vcsa-ui-installer\win32. Right click Installer and select Run as administrator. As we are restoring from an existing backup click Restore.
The installation is split into 2 stages, we begin with deploying the appliance. Click Next.
Accept the EULA and click Next.
Enter the details of the backup, this includes the protocol, location, credentials, and encryption password if applicable. Click Next.
Review details of the backup and confirm by clicking Next.
Enter the FQDN or IP address of the host, or vCenter upon which you wish to deploy the appliance. Enter the credentials of an administrator or root user and click Next. The installer will validate access, if prompted with an untrusted SSL certificate message click Yes to continue. Tip – connect to the vCenter for visibility of any networks using a distributed switch, connecting to the host direct will only pull back networks using a standard switch.
Enter the VM name and root password, click Next. Remember that this is the inventory name for the appliance as mentioned above.
Configure the deployment size for the vCenter, and click Next.
Select the datastore to locate the virtual appliance and click Next. Configure the network settings for the appliance and click Next.
Review the summary page and click Finish.
The new vCenter Server Appliance will now be deployed.
Once complete click Continue to move on to stage 2.
Stage 2 imports the data from the backup into the newly deployed appliance, click Next.
The backup is retrieved from the data we entered during stage 1. Click Finish to begin the restore. Note the warning about shutting down your original appliance, if it is still online, to avoid network conflicts.
Click Ok to the message that the restore cannot be paused or stopped.
The VCSA will now be restored.
When the restore is complete click Close. Log into the vSphere web client. The restored vCenter Server is ready to use.