"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/backup"

5.Get the checksum to verify the backup file has not been corrupted. The REST command to get the checksum is as follows:

curl --noproxy <controller_ip> --header "X-Auth-Token:<auth_token>" --fail -ksS --request GET --url "https://<controller_ip>:8443/sdn/v2.0/backup/checksum"

6.Check on the status of a backup.

curl --noproxy controller_ip

--header "X-Auth-Token:auth_token" --fail -ksSfL --request GET --url "https://controller_ip:8443/sdn/v2.0/backup/status"

9.1.3Downloading a backup from the controller to another location

The backup file should be downloaded to a 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 it for a restore.

NOTE: The file name must begin with sdn_controller_backup.

Download the Backup.zip File:

curl --noproxy controller_ip

--header "X-Auth-Token:auth_token" --fail -ksSfL --request GET

--url "https://system_ip:8443/sdn/v2.0/backup>path-and-file-name.zip

9.1.4Recommended backup practices

Do not run backup while making configuration changes. Instead, run the backup after completing configuration changes. Otherwise, an inconsistent system state could result with a subsequent restore.

Always back up all of the controllers in a team after a configuration change. Just backing up a subset of the controllers is not sufficient.

Back up all of controllers in a team at approximately the same time. (Team backups can be in sequence or in parallel). Do not allow days to pass in-between backups of different controllers in the same team.

A completed backup should be downloaded from the controller to another location for safekeeping. Include the IP address in the backup filename, so you can easily determine which backup belongs to which controller in a team. Recommended file naming is:

sdn_controller_backup_ip-address.zip

Store the backup files you take off each controller in the team together, so they can easily be retrieved for a future restore.

NOTE: If any controller in a team fails to complete the backup, start the backup over for all members of the controller team.

Examples of cURL commands in this guide use the --noproxyoption, which is appropriate where execution of cURL commands do not need a proxy to access controllers. If your network is set up such that a proxy is needed to access controllers, use the --proxyoption. For details on cURL proxy options, visit http://curl.haxx.se/docs/manpage.html.

94 Backing up and restoring