Create a Restore

post

/backupservice/v1/restore

This endpoint is not available on Oracle Cloud Machine.

Restores a storage volume from a previously completed backup. Before sending a request to restore, verify that the backup to be restored is in the completed state by retrieving details of the backup and checking the state field. You can only restore backups that are in the Completed state.

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Body ()
Restore to execute
Root Schema : RestoreInput
Type: object
Show Source
  • Pattern: (^/$|^(/[\w@\.-]+)+$)
    Multi-part name of the backup that you want to restore. The backup must be in the completed state.
  • Description of the Restore
  • Pattern: (^/$|^(/[\w@\.-]+)+$)
    The multi-part name of the object. Object names can contain only alphanumeric characters, hyphens, underscores, @ and periods. Object names are case-sensitive.
  • The entire URI of the storage volume that should be created when the backup is restored. Ensure that another volume with the same URI does not exist.
Back to Top

Response

Supported Media Types

201 Response

Successfully triggered restore.
Body ()
Root Schema : Restore
Type: object
Show Source

400 Response

Backup does not exist or is not completed. Not authorized to access or use backup referenced by the restore.

401 Response

Not authorized to create the restore.

500 Response

The server encountered an error handling this request.
Back to Top

Examples

cURL Command

The following example shows how to restore a storage volume from a previously completed backup by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X POST
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@requestbody.json"
        https://api-z999.compute.us0.oraclecloud.com/backupservice/v1/restore/
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file to restore a storage volume from backup /Compute-acme/jack.jones@example.com/BACKUP-A and create a new storage volume by the name /Compute-acme/jack.jones@example.com/restored-example-volume.

{
  "name": "/Compute-acme/jack.jones@example.com/RESTORE-A",
  "backupName": "/Compute-acme/jack.jones@example.com/BACKUP-A",
  "volumeUri": "http://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/jack.jones@example.com/restored-example-volume",
  "description": null
}

Example of Response Body

The following example shows the response body in JSON format.

{
  "uri": "https://api-z999.compute.us0.oraclecloud.com/backupservice/v1/restore/Compute-acme/jack.jones@example.com/RESTORE-A",
  "runAsUser": "/Compute-acme/jack.jones@example.com",
  "name": "/Compute-acme/jack.jones@example.com/RESTORE-A",
  "backupName": "/Compute-acme/jack.jones@example.com/BACKUP-A",
  "backupConfigurationName": "Compute-acme/jack.jones@example.com/backupConfigVol1",
  "volumeUri": "http://api-z999.compute.us0.oraclecloud.com/storage/volume/Compute-acme/jack.jones@example.com/restored-example-volume",
  "errorMessage": "",
  "detailedErrorMessage": "",
  "state": "SUBMITTED",
  "bootable": false,
  "description": null
}
Back to Top