Restore Command
Table 3: Command Details
Description
Command Detail
-F restorefile=@"file_path/file_name"
"https://192.168.0.1/restore_upload.html"
Command URL
Restore database file(s) onto the device.
Command Information
POST
HTTP Method
Write
Access Type
User, Admin
Access Level
Options: N/A
Example of issuing the restore command (assuming the filename is D9800.bkp):
Input:
curl -k -i
–
H "X-SESSION-ID: $token" -X POST -F
restorefile=@"C:/projects/d9800/D9800.bkp" "https://192.168.0.1/restore_upload.html"
Expected output:
<html><body></body></html>
The XML response is almost immediate (a few seconds at most) and does not indicate that the restore
command operation is completed.
Prior to initial run of this command after startup (prior to any Backup or Diagnostics operation), the
BKPRSTSTAT table may indicate that the operationStatus="Pass" while detailedStatus="Idle" and
percentCompleted=0".
Upon successful completion of the Restore operation, the BKPRSTSTAT table will indicate that the
operationStatus="Pass" while detailedStatus="Idle" and percentCompleted=100".
In order to successfully start the command from either of these states without receiving a race-logic
condition in which false "Pass" will be indicated, any poll loop that runs after starting the /restore command
must consider that
ALL three items ("Pass" plus "Idle" plus "100") must coincide in order to consider Restore operation to
be Successfully completed.
The progress and results of the Restore command may be determined by calling the BKPRSTSTAT
command every few seconds until it reports that the file restore is completed at 100 percent, or that it was
aborted (operationStatus="Fail") due to errors.
This operation may take over one minute, depending on the amount of data to validate and restore.
Note
Cisco D9800 Network Transport Receiver Version 2.75 RESTful Web Services API Reference Guide
13
API Definitions
Restore Command