HP VAN SDN Controller Administrator Guide

69
To Back Up a Controller
1. Acquire the authentication token for the controller backup:
curl --noproxy <controller_ip> -X POST --fail -ksSfL --url
"https://<controller_ip>:8443/sdn/v2.0/auth" -H "Content-Type: application/json" --
data-binary '{"login": {"domain": "<domain>","user": "<user>","password":
"<password>"}}'
Caution
Credential information (user name, password, domain, and authentication tokens)
used in cURL commands may be saved in the command history. For security
reasons, HP recommends that you disable command history prior to executing
commands containing credential information.
2. Acquire the controller uid for the controller backup:
curl --noproxy <controller_ip> --header "X-Auth-Token:<auth_token>" --fail -ksSfL --
request GET --url "https://<controller_ip>:8443/sdn/v2.0/systems"
3. Set the IP address of the controller using the following cURL command:
curl --noproxy <controller_ip> --header "X-Auth-Token:<auth_token>" --fail -ksSfL --
request PUT "https://<controller_ip>:8443/sdn/v2.0/systems/<controller_uid>" --data-
binary '{"system":{"ip":"<controller_ip>"}}'
4. Perform the actual backup using the following cURL command:
curl --noproxy <controller_ip> --header "X-Auth-Token:<auth_token>" --fail -ksS --
request POST --url
"https://<controller_ip>:8443/sdn/v2.0/systems/<controller_uid>/action" --data-binary
"backup"
The controller then creates a second file containing an encrypted CRC checksum.
5. Check on the status of a backup using the backup session token returned by the
backup request.
curl --noproxy <controller_ip> --header "X-Auth-Token:<auth_token>" --fail -ksSfL --
request GET --url https://<controller_ip>:8443/sdn/v2.0/backups/<backup_session_token>
Download a Backup From the Controller to Another Location
Both the .zip file and the .MD5 (checksum) file should be downloaded to the same,
secure location. Choose the correct name now; you cannot rename the files later or you
will get a file corruption error when you attempt to upload them for a restore.
Note
The file names for the .zip and .MD5 file must begin with ‘sdn_controller_backup’.
1. Download the Backup .zip File:
curl --noproxy <controller_ip> --header "X-Auth-Token:<auth_token>" --fail -ksSfL --
request GET --url