HP Insight Control Server Provisioning 7.2 Administrator Guide

appliance as a user with the role of Infrastructure Administrator. The REST API calls to get restore
status information do not require a session ID.
DescriptionResponse body
Response
headersRequest bodyRequest headersREST call
Upload a
backup to
A backup resource
which contains the
N.A.Multipart form data
containing the
backup file
auth: session ID,
content-type:
multipart/
POST
https://{appl}/rest/backups/
archive the
appliance
upload status, an id for
restoring the backup,form-data,
and other information
about the backup
accept-language:
locale,
accept-content:
application/json,
X-API-Version: 1
Start
restoring an
A restore resource which
contains restore status
N.A.A json object that
contains 2 elements.
auth: session ID,
accept-language:
POST
https://{appl}/rest/restores
uploaded
backup
and a URI for getting
restore progress
information
These elements are
"type" with value
"RESTORE" and
locale,
accept-content:
application/json,
X-API-Version: 1 "backupIdToRestore"
set to the ID
returned by the
upload request
Get restore
progress
information
A restore resource which
contains the current
restore status and
progress information
N.A.N.A.accept-language:
locale,
accept-content:
application/json,
X-API-Version: 1
GET https://{appl}/{uri}
Get
information
A
SimplePaginatedCollection
N.A.N.A.accept-language:
locale,
GET
https://{appl}/rest/restores
about thewhich contains the last
restore resource
accept-content:
application/json,
X-API-Version: 1
last restore
or a restore
under way
3.3.5 Sample restore script
An example PowerShell script is provided for uploading and restoring a backup. This script uses
PowerShell version 3.0. It makes REST calls to upload and restore a backup. HP highly recommends
installing cURL to improve performance.
3.3.5.1 How to use the sample restore script
You can copy and paste the sample script into a file on a Windows system that runs PowerShell
version 3.0.
HP highly recommends you install cURL to improve performance. The sample script works without
cURL, but it might take several hours to download a large backup. You can download cURL at
http://curl.haxx.se/download.html. You might also need to install the Microsoft Visual C++
Redistributable, MSVCR100.dll, which can be downloaded at http://www.microsoft.com/
download/en/details.aspx?id=14632 (64 bit) or http://www.microsoft.com/download/en/
details.aspx?id=5555 (32 bit). Make sure the path environment variable includes the path for
cURL.
You can run this script interactively to upload and restore a backup or to get status about a restore
under way.
To upload and restore a backup, run the script without any parameters. The script will prompt you
to enter the appliance host name, appliance user name and password, and the backup file path.
Then the script will upload the backup, start the restore, and get restore progress information until
the restore completes.
20 Backing up and restoring your appliance