Start a Restore Operation
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/instances/{serviceId}/restoredbackups
Request
- application/json
-
identityDomainId: string
Name of the identity domain for the MySQL Cloud Service account.
-
serviceId: string
The user-defined name of the Oracle MySQL Cloud Service instance.
-
X-ID-TENANT-NAME: string
Name of the identity domain for the MySQL Cloud Service account.
object
-
backupId(optional):
string
Backup ID of the backup to restore. This is the only required field if restoring by a backup ID instead of a timestamp.
-
notes(optional):
string
Free-form text to provide additional information about the restoration operation. There is a maximum length of 255 characters.
-
restoreId(optional):
string
For a point-in-time restoration, specify the timestamp value here. This PIT timestamp must be a valid UTC date using the
MM/DD/YYYY HH:MM:SS
format. For example,03/12/2016 17:20:55
. -
restoreType(optional):
string
The type of restore to perform. The only supported value is
PIT
(point-in-time). Do not definerestoreType
if using a backup ID instead of a timestamp.
Response
- application/json
202 Response
object
Response Body
-
job_id(optional):
string
Job ID for the operation.
-
operationName(optional):
string
Name of the operation. For example:
start-backup
,restore-backup
, ordelete-backup
. -
target_uri(optional):
string
Target URI. Poll the URI to get the target information or status of the operation.
Examples
The following example shows how to restore a backup to a MySQL Cloud Service instance by submitting a POST request on the REST endpoint using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the Oracle Public Cloud or Oracle Cloud Machine REST server to contact for your identity domain or tenant name. See Send Requests for the appropriate URL structure to use on Oracle Public Cloud or Oracle Cloud Machine.
cURL Command
curl -i -X POST \ -u "username:password" \ -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \ -d '{"backupId":"104148c3-2140-484b-8012-efc1c4907c74","notes":"Restoring backup as discussed on KB-14412"}' \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/restoredbackups
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 202 Accepted
Server: Oracle-Application-Server-11g
Location: https://rest_server_url:443/paas/api/v1.1/activitylog/exampleidentitydomain/job/2223824
Content-Language: en
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
X-ORACLE-DMS-ECID: 050o10H0dLO0VL05603YjWR00gEuYGipFu
X-ORACLE-DMS-ECID: 050o10H0dLO0VL05603YjWR00gEuYGipFu
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Type: application/json
Vary: user-agent
Date: Thu, 15 Dec 2016 01:43:46 GMT
Connection: close
Example of Response Body
The following shows an example of the response body in JSON format.
{ "operationName": "restore-backup", "job_id": "2223824", "target_uri": "https:\/\/rest_server_url:443\/paas\/api\/v1.1\/instancemgmt\/exampleidentitydomain\/services\/MySQLCS\/instances\/MyTestInstance\/restoredbackups\/2223824" }