DR and Migration Backup and Restore #
You can generate a new backup for each VMware Cloud Director Availability appliances in their own UI or do it directly from the Cloud Replication Manager appliance, where backups for all appliances will be generated.
The backup archive contains the following information from each appliance in the cloud site:
- Configuration files
- Public certificate
- Keystore
- Database dump
The backup does not contain:
- The appliance root user password.
- Any previous backup archives.
- Any support bundles.
- The NTP time server configuration.
- Enable SSH state.
- The network configuration provided in the OVF wizard during appliance deployment.
- Static routes configured on appliances with multiple network interface cards (NICs).
The backups are encrypted and password protected. They can be downloaded from the VMware Cloud Director Availability UI or API and stored outside of the VMware Cloud Director Availability appliances.
Automated Backup Generation #
Follow these steps from the Cloud Replication Manager appliance to schedule the backups of all the VMware Cloud Director Availability appliances:
- Log in to the VMware Cloud Director Availability UI at https://Appliance-IP-Address/ui/admin.
- Navigate to the Backup Archives menu.
- Select Scheduled backup archives.
- Click CONFIGURE SCHEDULE.
- Enter the remote server details and select the authentication.
- Click TEST CONNECTION.
- Accept the thumbprint and you will see a message that the connection is successful.
- Configure the backup interval, retention settings, and optionally a delayed start. Enter the password that will be used to encrypt the archive.
- Finalize the wizard. You will start seeing the archives being generated according to the schedule. It can be always modified or stopped.
Manual Backup Generation #
Follow these steps from the Cloud Replication Manager appliance to back up all appliances:
- Log in to the VMware Cloud Director Availability UI at https://Appliance-IP-Address/ui/admin.
- Navigate to the Backup Archives menu.
- Select Manual backup archives.
- Click GENERATE NEW.
- The backup window pops-up. There you need to enter a password and click the GENERATE button.
- Shortly, the backup archive will be ready and can be downloaded by clicking the download button.
Note: If you perform backups per appliance, you can follow the same steps in the UI of each VMware Cloud Director Availability appliance.
Restore a Backup #
VMware Cloud Director Availability support in-place restore of backups. It also does not require powering off of the appliance before the in-place restore.
Restoring always requires an appliance with exactly the same version as the remaining cloud appliances in the site and with exactly the same version as the downloaded backup archive.
Unlike the backup generation, the restore operation has to be performed on each appliance through its UI.
Note: If you need to restore all the appliances, this is the correct order:
- Tunnel service
- Replicator service(s)
- Cloud service
These are the steps to perform a restore operation:
- Extract the backup archive. As a result, you will have a .enc file for each registered appliance. Since you might have multiple replicators, the file name of each one ends with its IP address.
- Log in to the VMware Cloud Director Availability UI at https://Appliance-IP-Address/ui/admin.
- Navigate to the Backup Archives menu.
- Click RESTORE.
- Select the correct .enc file for the component that is being restored, enter the password specified during the backup archive creation, and click RESTORE. If you have selected a wrong backup for another component, you will see the The appliance role does not match the one in the backup archive. error message.
- When the process is completed, you will be able to access the VMware Cloud Director Availability appliance that you have just restored.
Generate a Backup through the API #
As an addition to the UI backup generation, there is an option for the administrator to generate one directly through the API, which is a convenient option for automating the backup process.
To generate and download the archive for each appliance through the API, you will need to perform the following steps:
- Open a terminal and execute this command:
curl 'https://Appliance-IP-Address:8046/sessions' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-d '{
"type" : "localUser",
"localUser" : "root",
"localPassword" : "root_password"
}'
Please note this is for local user authentication. For more authentication options, please refer to the API programming guide.
- If the command is executed successfully, in the output you will find a parameter called X-VCAV-Auth. For example:
Copy its value as this is the authentication token that will be used in the next steps.
- To generate a new backup, execute the following command:
curl 'https://Appliance-IP-Address:8046/backups' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: <<token>>' \
-d '{
"password" : "<<password>>"
}'
<<token» should be the value collected in the previous step and <<password» is the password that you would like to define for the backup archive.
This is the expected result.
- To download the archive, you need to execute:
curl 'https://Appliance-IP-Address:8046/backups/<<backup_id>>' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+octet-stream;charset=UTF-8' \
-H 'X-VCAV-Auth: <<token>>' --output <<destination/file.tar.bz2>>
The <<backup_id» is the ID parameter (the first one) in the response of the previous step, <<token» is the value collected in step 1 results and <<destination/file.tar.bz2» is the destination file.
If you would like to download another backup archive, you can list all available archives with the following:
curl 'https://Appliance-IP-Address:8046/backups' -i -X GET \
-H 'Accept: application/vnd.vmware.h4-v4.1+json;charset=UTF-8' \
-H 'X-VCAV-Auth: <<token>>'
<<token» is the value collected in step 1 results.
In case of a problem with the certificates, you can use -k as a curl parameter like this:
curl -k ‘https://Appliance-IP-Address:8046/backups’ …