Add the Backup Service

post

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/backupconfig/create

Adds the backup service to the Oracle Java Cloud Service instance. The specified service instance must have initially been provisioned:
  • 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

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body defines the details of the add backup service request.
Root Schema : backupadd-postrequest
Type: object
Show Source
  • 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 in cloudStorageContainer.
  • 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>
    The format to use to specify the container name depends on the URL of your Oracle Cloud Infrastructure Object Storage Classic account. To identify the URL of your account, see Finding the REST Endpoint URL for Your Cloud Account in Using Oracle Cloud Infrastructure Object Storage Classic.

    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.

  • 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 in cloudStorageContainer does not exist. The default is false.

  • 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.

  • 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.

  • 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 of true 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 to BOTH and the instance is associated with a database deployment that has backupDestination set to NONE, 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.

Back to Top

Response

Supported Media Types

202 Response

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

409 Response

Conflict. Returned if the backup service is already added to the service instance (regardless of whether the backup service is enabled or disabled).
Back to Top

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"
}
Back to Top