vCenter Server (be it the appliance or not) is the critical management component of every vSphere environment. Therefore it is critical to backup it at regular basis to have the possibility to restore configuration prior to failure. With the vSphere 6.5 release, vCenter Server Appliance (vCSA) received the possibility to perform the backup of its configuration from appliance management interface (not only but I will describe this later on).
The vCenter Server Appliance backup and restore feature supports a number of communication protocols:
- FTP
- FTPS
- SCP
- HTTP
- HTTPS
Today I am going to show you how to backup vCenter Server Appliance 6.5 using FTP/FTPS protocol and from the command line.
Backup vCenter Server Appliance 6.5 (vCSA) using FTP/FTPS
- Log in to vCenter Server Appliance IP/FQDN VAMI URL - **https://IP_OR_FQDN:5480 **and type username and password used during installation.
- Once logged in go to **Summary **and click Backup.
- Click Backup and provide FTP/FTPS server details.
- On the next page choose if you wish to backup inventory and configuration or if you wish to include SEAT Database (Statistics, Events, and Tasks).
- On the last screen, we see the summary of FTP/FTPS backup.
- Backup process starts.
- After few minutes vCenter Server Appliance (vCSA) is successfully backed up.
Automated backup of vCenter Server Appliance 6.5 (vCSA)
As you saw the manual process of vCSA 6.5 backup is easy. The only problem with it that there is no possibility to schedule it from the appliance management interface. I hope this feature will be incorporated in future releases.
Fortunately for us, VMware created a BASH script which can be executed from cron and automated.
|
|
On the VMware page, there is a small error which won’t allow you to run the script (I already informed internal resources to correct it).
Simply in line 31 remove space before **EOF.
As you see script executed successfully.
Source of the script: http://pubs.vmware.com/vsphere-65/topic/com.vmware.vsphere.vcsapg-rest.doc/GUID-222400F3-678E-4028-874F-1F83036D2E85.html
Schedule automated vCenter Server Appliance (vCSA) backup using cron
I’ve created a shell script named **vcsa_backup.sh **which I will add to cron. In case you are new to cron I recommend this website http://crontab-generator.org/ to easily schedule backup.
From a vCSA shell type **crontab -e ** and we will enter edit mode where we simply specify when and what shall be executed.
In my case, I scheduled it for every day at 9 PM.
|
|
Other resources
There are as well different ways to backup vCenter Server Appliance 6.5. Please take a look at Brian Graf’s PowerCLI script which allows automating vCSA Backup.
Summary
I hope this post will help you to easily backup of vCenter Server Appliance (vCSA) 6.5 and to protect your environment in case of a failure or issue.