Initiate an On-demand Backup
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/backups
For complete information about scheduled automated backups, contents of backups, and where backups are stored, see About Backup and Restoration in Administering Oracle Java Cloud Service.
Request
- application/json
-
identityDomainId: string
Identity domain ID for the Oracle Java Cloud Service account.
-
serviceId: string
Name of the Oracle Java Cloud Service instance.
-
Authorization: string
Base64 encoded user name and password separated by a colon or OAuth access token obtained from Oracle Identity Cloud Service. See Authenticate.
-
X-ID-TENANT-NAME: string
Identity domain ID for the Oracle Java Cloud Service account.
object
-
databaseIncluded(optional):
boolean
Flag that specifies whether a database backup is included as part of this on-demand backup operation. The value defaults to
false
, indicating that a database backup is not performed. If the value is set totrue
, a database backup is performed. However, the database files for the associated database deployment are not actually included in the backup; only an RMAN tag or a timestamp is included, depending on whether the database deployment is hosting a single-instance database or an Oracle Real Application Clusters (RAC) database.If the Java Cloud Service instance has
backupDestination
set toBOTH
and the instance is associated with a database deployment that hasbackupDestination
set toNONE
, a backup of the associated database cannot be included as part of an on-demand backup of the Java Cloud Service instance.Note: This attribute cannot be
true
on Java Cloud Service instances that are associated with the following database services for the required infrastructure schema:- Oracle Autonomous Transaction Processing
- Oracle Cloud Infrastructure Database (DB system)
- Oracle Database Exadata Cloud Service
-
full(optional):
boolean
Flag that specifies the type of on-demand backup. Only
true
is a valid option,false
is not supported. Full backups contain all of the service instance configuration data. -
keepForever(optional):
boolean
Flag that specifies whether to keep the backup indefinitely. This attribute replaces the deprecated
expirationDate
.A backup is retained for the default retention period as defined in the service instance's backup configuration; see View the Backup Configuration.
Set this value to
true
to keep the backup indefinitely or until it is deleted manually. Set this value tofalse
to delete the backup at the end of the default retention period for the service instance's backups.Note: If the associated database deployment is hosting an Oracle Real Application Clusters (RAC) database, a database backup cannot be performed as part of the on-demand backup operation when the
keepForever
value is set totrue
. -
notes(optional):
string
Free-form text to provide additional information about the backup.
Response
- application/json
202 Response
The Location
header returns a URI that can be used to view the job status, as described in View the Status of an Operation by Job Id.
object
-
job_id(optional):
string
Job ID for the operation.
-
operationName(optional):
string
Operation performed. For example,
start-backup
,backup-config-update
, and so on. -
target_uri(optional):
string
URI of the resource.
Examples
The following example shows how to initiate an on-demand backup for an Oracle Java Cloud Service instance by submitting a POST request on the REST resource using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.
cURL Command
curl -i -X POST -u username:password -d @backup.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/backups
Note: In the request, set keepForever
to true
to keep the backup indefinitely or until it is deleted manually. (This is the same behavior as expirationDate
set to null
, which is deprecated.)
Example of Request Body
The following shows an example of the request body in JSON format.
{
"keepForever":true,
"full":true,
"notes":"On-demand full backup request."
}
Example of Response Header
The following shows an example of the response header. The Location
header returns the URI that can be used to view the job status. See View the Status of an Operation by Job Id.
HTTP/1.1 202 Accepted
Date: Sat, 22 Apr 2017 19:47:28 GMT
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/1882094
Content-Type: application/json
Example of Response Body
The following shows an example of the response body in JSON format.
{
"operationName":"start-backup",
"target_uri":"https:\/\/rest_server_url\/paas\/service\/jcs\/api\/v1.1\/instances\/ExampleIdentityDomain\/ExampleInstance\/backups\/1449345407188",
"job_id":"1882094"
}