How to Back Up vCenter Appliance
Starting with vCenter Server Appliance (VCSA) 6.5, a VMware native backup ability was added in the appliance VAMI interface to create backups of vCenter database, events, configuration, etc. The native backup mechanism allows for quick and easy vCenter backup to be used to restore a configuration when needed.
Let’s take a look at what we need to configure to be able to create a vCenter appliance backup and the process to set up the backup itself.
Server Configuration for vCenter Appliance Backup
The first step to be able to create a backup of a vCenter Server Appliance is setting up a server that can be used as the target for an SMB, HTTPS, HTTP, SCP, FTPS, or FTP backup connection from the VCSA appliance. For the purposes of this walkthrough, we are using a Filezilla FTP server loaded on a Windows server to provide the target connectivity to our backup process from our VMware VCSA appliance. We will be running a vCenter FTP backup.
While configuring a specific application may be different from vendor to vendor, the basic steps are similar. We set up a listening service on the server side along with the credentials to authenticate and a target directory where our backups of the VMware VCSA appliance will be placed.
Configuring an FTP server
Below you can see the general settings for configuring the Filezilla FTP server, which we have loaded. We need to add a user account, which will be used to authenticate to the Filezilla server from our VCSA appliance.
In the main window of FileZilla Server, click Server > Configure.
The window with the settings opens:
- In the left pane of the settings window, click Rights management > Users. Note that even though we can use groups here, we don’t have to, as we simply need a user with permissions to connect to the server and write the files in the directory.
- Click Add to add a new user.
- Click the added user in the Available users field and set the user name to be used with the vCenter Server Appliance backup. In our case, the user name we set is user2.
- Ensure that the option requiring a password to log in is selected and set a password for the user.
- Click Add in the Mount points section to add a directory to be shared by using the FTP server.
- Click the added new mount point/directory and enter the path to the directory located on the machine where FileZilla is installed. You can set a directory as the home directory. We use / as a virtual path, and our directory to store vCenter backups is E:\backups\vcenterbak\
Note that we will need to just use the ftp://192.168.101.217/ address to access the home directory configured for the FTP server (which is E:\backups\vcenterbak\).
- Select the access mode that is sufficient for writing vCenter server backups to the selected directory. We select the Read+Write mode. Select the Create native directory if it does not exist to avoid errors if you have not created a directory on the machine used as the FTP server earlier.
- Click OK to save settings and close the settings window.
Note: If you want to configure an SMB share and use it to store your vCenter backups, you must configure an SMB share first. You can create an SMB share on a Windows server, Linux machine, or a NAS device.
Configuring a vCenter backup job
- Open the vCenter Server Management interface of vCenter Server Appliance. You can access this web interface by going to https://vCenter_IP_address_or_hostname:5480 in a web browser. In our case, the address is https://192.168.101.103 :5480. You must enter the credentials to log in to the vCenter Server management web interface.
Note: Make sure to keep an eye on the expiration date of your vCenter Server management password. If the password expires, you may not be able to log in.
- Once you open the vCenter Server Management page, click Backup in the left pane and click Configure in the Backup Schedule section.
- Enter the needed parameters in the Create Backup Schedule window:
- Backup location: ftp://192.168.101.217/
- Enter the backup server credentials that you set on the FTP server:
- User name: user2
- Password: *********
- Configure vCenter backup scheduling parameters, for example, run a backup job daily at 11:59 PM.
- Set an encryption password for stronger security. This is especially important if you are using an unencrypted network protocol such as FTP for data transfers.
- You can enable a database health check when you back up vCenter database, configure the number of vCenter backups to retain, and select what data to back up (Stats, Events, and Tasks; Inventory and configuration). The estimated backup size will be displayed.
Click Create to save your vCenter backup configuration.
Note: If you want to back up vCenter to an SMB share (run vCenter backup to Windows share), enter the path like smb://192.168.101.217/share and enter the user credentials. You should enter credentials in the username@domainname format instead of the domainname\username format. You may need to enable SMB 1 on the file server to establish an SMB connection and avoid errors like:
Error in method invocation module ‘util.Messages’ has no attribute ‘ScheduleLocationDoesNotExist’.
- You are back to the Backup page. Click Status in the Backup Schedule section to check the vCenter backup configuration and click Backup Now to start the backup process.
- You can select the Use backup location and user name from backup schedule checkbox to use the existing vCenter backup configuration you have created before. Then click Start.
- You can click the backup job in the Activity status of the Backup page to check vCenter backup progress.
- Once the vCenter appliance backup job is completed, you can see a subdirectory with files on your backup server (which can be an SMB server or an FTP server in our case). You can see the vCenter configuration backup files in the screenshot below.
If you open files on a local server, VMware vCenter backup is stored in a directory like:
If you access the backup via SMB, the path looks like this:
Let’s go over what each path element means.
- Protocol used (SMB in this string)
- Backup location
- vCenter server name or IP address
- Job type: M – Manual, S – Scheduled
- Version – vCenter Server version, for example, 7.0.1
- The date and time when the backup was created
- A comment, which is base64 encoded and is not human-readable
To restore the vCenter Server configuration from a vCenter backup, you need to run the vCenter installer and click the Restore option. Follow the wizard steps, select your vCenter server backup file, and select the destination server.
VMware vCenter backup can be done by using native tools. This method is used to back up vCenter Server appliance (VCSA), which is the only installation method for vCenter 7 and later versions. The backup configuration process is not difficult – you need to configure a destination server by using one of the supported protocols, access the web interface of VCSA, and configure a backup job.
Remember that you should back up vCenter Server Appliance and other virtual machines residing on your ESXi hosts. To make this process simpler and avoid configuring a separate application for backup and recovery, consider having a standalone backup solution that fits all VM backup use cases, including vCenter backup.
NAKIVO Backup & Replication can simplify backup and recovery processes for vCenter Server Appliance running as a VMware vSphere VM. The process of a vCenter VM backup is similar to the backup process for VMware VMs. You just need to perform certain steps in the Inventory when recovering a vCenter from a NAKIVO solution vCenter backup.