Add the Backup Service
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/backupconfig/create
- With the
PAAS
level, and - Without the backup service (in other words, a backup configuration file does not yet exist for the service instance)
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
-
backupDestination:
string
Location of the service instance backups. Must be set to
BOTH
. This means backups are stored on disk (in a volume attached to the nodes) and in the object storage container or bucket that is specified incloudStorageContainer
. -
cloudStorageContainer:
string
URI of the object storage container or bucket where service instance backups are to be stored.
On Oracle Cloud Infrastructure Classic and Oracle Cloud at Customer, the object storage container can be an existing container name or a new one that has not yet been created.
To specify the container (existing or new), use one of the following formats:
Storage-<identitydomainid>/<containername>
<storageservicename>-<identitydomainid>/<containername>
<restEndPointURL>/<containerName>
On Oracle Cloud Infrastructure, you must use an existing object storage bucket name. The object storage bucket must be created ahead of performing the add backup operation. Certain prerequisites must also be satisfied when you create a new bucket. See Prerequisites for Oracle Platform Services on Oracle Cloud Infrastructure in Oracle Cloud Infrastructure Services.
Enter the bucket URL in the following format:
https://swiftobjectstorage.<region>.oraclecloud.com/v1/<namespace>/<bucket>
.To find out your namespace, sign in to the Oracle Cloud Infrastructure web console, click the tenancy name, and look for the Object Storage Namespace field.
Example:
https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/acme/mybucket
See Object Storage Service API in Oracle API Documentation for Oracle Cloud Infrastructure Services.
-
cloudStorageContainerAutoGenerate(optional):
boolean
This attribute is not applicable when adding the backup service to an Oracle Java Cloud Service instance created in Oracle Cloud Infrastructure.
Flag that specifies whether to create (
true
) or not create (false
) the object storage container if the name specified incloudStorageContainer
does not exist. The default isfalse
. -
cloudStoragePassword:
string
Password for the object storage user.
On Oracle Cloud Infrastructure Classic and Oracle Cloud at Customer, this is the password for the Oracle Cloud Infrastructure Object Storage Classic user who has read and write access to the container that is specified in
cloudStorageContainer
.If a service instance on Oracle Cloud Infrastructure Classic is using Oracle Identity Cloud Service, this attribute is not required if the current cloud user is entitled to use Oracle Cloud Infrastructure Object Storage Classic.
On Oracle Cloud Infrastructure, this is the Auth token generated in Oracle Cloud Infrastructure for the user specified in
cloudStorageUser
. -
cloudStorageUser:
string
User name for the object storage user.
On Oracle Cloud Infrastructure Classic and Oracle Cloud at Customer, this is the user name for the Oracle Cloud Infrastructure Object Storage Classic user who has read and write access to the container that is specified in
cloudStorageContainer
.If a service instance on Oracle Cloud Infrastructure Classic is using Oracle Identity Cloud Service, this attribute is not required if the current cloud user is entitled to use Oracle Cloud Infrastructure Object Storage Classic.
On Oracle Cloud Infrastructure, this is the user name for the Oracle Cloud Infrastructure Object Storage user.
-
disabledScheduledCoordinatedBackups(optional):
boolean
Flag that specifies whether a scheduled Oracle Java Cloud Service instance backup will include a backup of the associated database deployment.
A value of
false
means a backup of the associated database deployment is coordinated and enabled. A value oftrue
means a coordinated database deployment backup is not performed (disabled) during a scheduled backup of this service instance.Default is
true
.If the Oracle Java Cloud Service instance has
backupDestination
set toBOTH
and the instance is associated with a database deployment that hasbackupDestination
set toNONE
, a scheduled Oracle Java Cloud Service instance backup does not include a backup of the associated database.Note: This attribute is not applicable to an Oracle Java Cloud Service instance that uses Oracle Database Exadata Cloud Service for the required infrastructure schema; the attribute is ignored if it is specified. This attribute is also not applicable to service instances that use an Oracle Autonomous Transaction Processing database or Oracle Cloud Infrastructure Database (DB system) to host the infrastructure schema. Coordinated backups are not available for such service instances.
Response
- application/json
202 Response
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.
409 Response
Examples
The following example shows how to add the backup service configuration 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 @addbackupconfig.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/backupconfig/create
Example of Request Body
The following shows an example of the request document in JSON format to add the backup service to a service instance, which was originally provisioned without a backup configuration.
In the example, it also shows how to create the object storage container instead of supplying an existing container name. The cloudStorageContainerAutoGenerate
attribute, however, is not applicable when provisioning an Oracle Java Cloud Service instance in Oracle Cloud Infrastructure.
{
"backupDestination":"BOTH",
"cloudStorageContainer":"Storage-ExampleIdentityDomain/JCSBackup",
"cloudStorageContainerAutoGenerate":true,
"cloudStorageUser":"username",
"cloudStoragePassword":"userPassword1!"
}
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:33:59 GMT
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/1882090
Content-Type: application/json
Example of Response Body
The following example shows the response returned in JSON format.
{
"operationName":"backup-config-update",
"target_uri":"https:\/\/rest_server_url\/paas\/api\/v1.1\/instancemgmt\/ExampleIdentityDomainID\/services\/jaas\/instances\/ExampleInstance\/backupconfig",
"job_id":"1882090"
}