Initiating an On-Demand Backup for a Service Instance

You can initiate an on-demand backup for an Oracle SOA Cloud Service instance using REST resources, as described in the following procedure.

Note:

  • On accounts that are integrated with Oracle Identity Cloud Service, the identity domain ID is the Identity Cloud Service tenant name. This tenant name begins with the characters idcs- followed by a string of number and letters (for example, idcs-98888f7964454b658ac6d2f625b29030).

  • The cURL command examples use the URL structure https://rest_server_url/resource_path, where rest_server_url is the REST server to contact for your identity domain. See Send Requests.

To initiate an on-demand backup for an Oracle SOA Cloud Service instance:

  1. Create a JSON document, backup.json, that defines the details of the backup.

    The following shows an example of the request document in JSON format. In this example:

    • keepForever is set to true. This indicates the backup will be retained forever, or until you manually delete it. By default, backups are retained for the default retention period defined in the backup configuration, as described in Configuring Automated Backups for a Service Instance.

    • notes includes additional notes about the backup.

    For more information about the request attributes, see Initiate an On-Demand Backup.

    {
        "keepForever": true,
        "notes": "This full backup has no expiration date."
    }
    

    A database backup can be included as part of this on-demand backup operation by adding "databaseIncluded": true. However, if the associated Oracle Database Cloud Service database deployment is hosting an Oracle Real Application Clusters (Oracle RAC) database, a database backup cannot be performed as part of the service instance on-demand backup when keepForever is true.

  2. Initiate an on-demand backup, passing the JSON document created in step 1.
    curl -i -X POST -u username:userPassword1! -d @backup.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/domainName/services/soa/instances/ExampleInstance/backups
    

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (POST).

    • -u option to specify the user name and password for the Oracle SOA Cloud Service account for authentication.

    • -d option to identify the request document, in JSON format, on the local machine (backup.json).

    • -H to identify the content type as application/json and define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    Note: You cannot initiate an on-demand backup when the backup service for the specified service instance is in a DISABLED state.

    For more information, see Initiate an On-Demand Backup.

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

    {
        "operationName":"start-backup",
        "target_uri":"https:\/\/rest_server_url\/paas\/service\/soa\/api\/v1.1\/instances\/domainName\/ExampleInstance\/backups\/1449345407188",
        "job_id":"8218"
    }
  3. View detailed information about the backup using the backup ID returned in the response body.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/soa/instances/ExampleInstance/backups/1449345407188
    

    Specify the following options on the cURL command line:

    • -i option to include the HTTP header in the output. This option is optional.

    • -X option to indicate the type of request (GET).

    • -u option to specify the user name and password for the Oracle SOA Cloud Service account for authentication.

    • -H to define a custom header, X-ID-TENANT-NAME, to identify the identity domain ID.

    The following example shows the response body in JSON format.

    {
        "backupId":"1449345407188",
        "jobId":"8218",
        "backupStartDate":"Sat Dec 05 19:56:47 GMT 2019",
        "backupCompleteDate":"Sat Dec 05 19:59:21 GMT 2019",
        "expirationDate":null,
        "initiatedBy":"username",
        "full":true,
        "local":false,
        "localCopy":true,
        "databaseIncluded":false,
        "size":"23MB",
        "sizeInBytes":24165234,
        "status":"Completed",
        "storageContainer":"Storage-ExampleIdentityDomain\/SOABackups",
        "href":"https:\/\/rest_server_url\/paas\/api\/v1.1\/instancemgmt\/ExampleIdentityDomain\/services\/soa\/instances\/ExampleInstance\/backups\/1449345407188",
        "serviceComponents":[
        {
            "type":"OTD",
            "version":"11.1.1.9.x"
        },
        {
            "type":"OTD_JDK",
            "version":"1.7.0_xx"
        },
        {
            "type":"JDK",
            "version":"1.7.0_xx"
        },
        {
            "type":"WLS",
            "version":"12.1.3.0.x"
        }
        ],
        "jobHistory":[
        {
            "operation":"backup",
            "jobId":"8218",
            "status":"Completed",
            "startDate":"Sat Dec 05 19:56:47 GMT 2019",
            "completeDate":"Sat Dec 05 19:59:21 GMT 2019",
            "statusDetails":"Backup health check passed...Locked the WebLogic Server domain configuration..
              Started the backup of configuration data for WebLogic administration server and managed servers...
              Completed the backup of configuration data for WebLogic administration server and managed servers...Capturing the service metadata...
              Completed the backup of service metadata...Unlocked the WebLogic Server domain configuration...
              Uploading the backup archive to the Oracle Storage Cloud Service container...Uploaded the object to the Oracle Storage Cloud Service container..."
        }],
        "notes":"This full backup has no expiration date."
    }