Restore Backups (v2)

You can restore an available backup snapshot archived by Oracle in Oracle Object Storage (that is, copy it to the environment).

To view available backup snapshots, see List Backups. If a backup snapshot is available, you can copy it to the current environment using the Restore Backup API.

After copying the backup, you can archive it or use it to restore the current environment by yourself. With the List Backups and Restore Backup APIs, you do no have to create a service request to request a backup from an environment.

Required Roles

Service Administrator

Any predefined role and Migrations – Administer granular role

REST Resource

POST /interop/rest/v2/backups/restore

Request

Supported Media Types: application/json

Table 9-118 Parameters

Name Description Type Required Default
backupName The name of the backup snapshot, as listed in the response for List Backups Payload Yes None
targetName The name of the backup snapshot, without an extension, in the target environment Payload No If you do not specify this parameter, the backup snapshot is restored to the target environment pre-pended with the current timestamp, for example, 2022-03-10T06:37:48_Artifact_Snapshot.zip or 2022-03-30T06:22:35_EPRCS_Backup.tar.gz.

Sample Request Payload

{
	"backupName": "<BACKUP-NAME>",
	"parameters": {
		"targetName": "<TARGET-NAME>"
	}
}

Response

Supported Media Types: application/json

Table 9-119 Parameters

Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can use the href to get the status of the copy snapshot
intermittentStatus Status of each step performed; can be polled regularly from the job status URL

Example of Response Body

{  
  "links": [  
    {  
      "rel": "self",  
      "href": "https://<BASE-URL>/interop/rest/v2/backups/restore",  
      "data": null,  
      "action": "POST"  
    },  
    {  
      "rel": "Job Status",  
      "href": "https://<BASE-URL>/interop/rest/v2/status/jobs/<JOB_ID>",  
      "data": null,  
      "action": "GET"  
    }  
  ],  
  "details": null,  
  "status": -1,  
  "items": null  
}

Sample cURL Command

curl -s -u <USERNAME>:<PASSWORD> -H 'Content-Type: application/json' --request POST https://<BASE-URL>/interop/rest/v2/backups/restore -d {"backupName": "<BACKUP-NAME>","parameters": {"targetName": "<TARGET_NAME>"}}