Start a Backup Operation

post

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/instances/{serviceId}/backups

Starts an on-demand backup operation on a MySQL Cloud Service instance.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body contains optional options for the on-demand backup request.
Root Schema : backup-ondemand-request
Type: object
The request body contains information about the on-demand backup operation. There are no required attributes.
Show Source
  • Flag that specifies whether to keep the backup forever. Otherwise, full on-demand backups are retained for the default retention period defined in the backup configuration.
  • Free-form text to provide additional information about the backup.

Response

Supported Media Types

202 Response

Accepted. See Status Codes for information about other possible HTTP status codes.
Body ()
Root Schema : Response Body
Type: object
Title: Response Body
The response body contains information about the operation.
Show Source

Examples

The following example shows how to start a backup operation 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.

Note: Backups must be configured (enabled) for this operation to function.

Note: Sending a request body is always required, but it may be empty as demonstrated in this example by passing in an empty JSON object using curl's -d (--data) parameter.

cURL Command

curl -i -X POST \
  -u "username:password" \
  -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/backups 

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/2223717
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: Ggo0RHV050R000u76o0dp503uF6EVi3SU0
X-ORACLE-DMS-ECID: Ggo0RHV050R000u76o0dp503uF6EVi3SU0
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Type: application/json
Vary: user-agent
Date: Thu, 15 Dec 2016 00:51:45 GMT
Connection: close

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "operationName": "start-backup",
    "target_uri": "https:\/\/rest_surver_url:443\/paas\/api\/v1.1\/instancemgmt\/exampleidentitydomain\/services\/MySQLCS\/instances\/MyTestInstance\/backups\/302248b3-1240-474b-8022-bcb1e7907f74",
    "job_id": "2223717"
}