Configuring Automated Backups for a Service Instance

You can configure automated backups for an Oracle SOA Cloud Service instance using the REST API.

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.

Specifically, you can customize the default retention time for backups, when the service instance is automatically backed up, and where the backups are stored, as described in the following procedure.

To configure automated backups for an Oracle SOA Cloud Service instance:

  1. Before configuring automated backups, view the current configuration.
    curl -i -X GET -u username:userPassword1! -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/domainName/services/soa/instances/ExampleInstance/backupconfig
    

    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.

    In the example, the following backup schedules are in effect:

    • Full backups are performed at 11:50:00 PM UTC on Tuesday

    • Incremental backups are performed at 11:50:00 PM UTC daily, excluding Tuesday

    • Retention time for incremental and on-demand backups is set to 30 days; full scheduled backups are retained until their last related incremental backup is no longer available, if any

    The following example shows the response body in JSON format.

    {
        "state":"ENABLED",
        "defaultRetention":"30 days",
        "fullBackupSchedule":
        {
            "second":"0",
            "minute":"50",
            "hour":"23",
            "dayOfMonth":"*",
            "month":"*",
            "dayOfWeek":"Tue",
            "year":"*"
        },
        "incrementalBackupSchedule":
        {
            "second":"0",
            "minute":"50",
            "hour":"23",
            "dayOfMonth":"*",
            "month":"*",
            "dayOfWeek":"Sun,Mon,Wed,Thu,Fri,Sat",
            "year":"*"
        },
        "scheduledBackups":"ALL",
        "extendedRestoreTypes":"NONE",
        "lastBackupDate":"Thu Dec 03 23:50:00 GMT 2019",
        "lastSuccessfulCleanupDate":"Fri Dec 04 01:01:59 GMT 2019",
        "nextFullBackupDate":"Tue Dec 08 23:50:00 GMT 2019",
        "nextIncrementalBackupDate":"Fri Dec 04 23:50:00 GMT 2019",
        "backupDestination":"BOTH",
        "cloudStorageContainer":"Storage-ExampleIdentityDomain\/mybackupcontainer",
        "cloudStorageUser":"username",
        "totalCloudStorageContainerUsed":"1.8GB",
        "totalCloudStorageContainerUsedInBytes":1934445222,
        "totalBackupVolumeUsed":"1.8GB",
        "totalBackupVolumeUsedInBytes":1934445222,
        "percentBackupVolumeUsed":0.9007961750030518
    }
  2. Create a JSON document, backup.json, that defines the details of the backup configuration. Include only those parameters that you want changed.

    Note that you cannot change the backup configuration when the backup service for the specified service instance is in a DISABLED state.

    The following shows an example of the request document in JSON format. In this example, the full backup schedule is set to 5AM UTC on Sunday. The incremental backup schedule is set to 3AM UTC.

    {
       "fullBackupSchedule":
       {
          "hour":"5",
          "dayOfWeek":"Sun"
       },
       "incrementalBackupSchedule":
       {
          "hour":"3"
       }
    }
    
  3. Configure automated backups for an Oracle SOA Cloud Service instance, passing the JSON document defined in step 2.
    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/backupconfig
    

    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.

    The following example shows the response.

    HTTP/1.1 202 Accepted
    Date: Sat, 22 Apr 2019 19:38:50 GMT
    Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/1882092
    Content-Type: application/json
    
    {
        "operationName":"backup-config-update",
        "target_uri":"https:\/\/rest_server_url\/paas\/api\/v1.1\/instancemgmt\/domainName\/services\/soa\/instances\/ExampleInstance\/backupconfig",
        "job_id":"1882092"
    }
  4. After a while, view the backup configuration as described in step 1.

    The following example shows the response body in JSON format. The new values are in effect. Because dayOfWeek was not specified for incrementalBackupSchedule in the update request, the value defaults to all days excluding the day of the full backup (in this example, every day excluding Sunday). The default retention time is not changed.

    {
        "state":"ENABLED",
        "defaultRetention":"30 days",
        "fullBackupSchedule":
        {
            "second":"0",
            "minute":"0",
            "hour":"5",
            "dayOfMonth":"*",
            "month":"*",
            "dayOfWeek":"Sun",
            "year":"*"
        },
        "incrementalBackupSchedule":
        {
            "second":"0",
            "minute":"0",
            "hour":"3",
            "dayOfMonth":"*",
            "month":"*",
            "dayOfWeek":"Mon,Tue,Wed,Thu,Fri,Sat",
            "year":"*"
        },
        "scheduledBackups":"ALL",
        "extendedRestoreTypes":"NONE",
        "lastBackupDate":"Thu Dec 03 23:50:00 GMT 2019",
        "lastSuccessfulCleanupDate":"Fri Dec 04 01:01:59 GMT 2019",
        "nextFullBackupDate":"Sun Dec 06 05:00:00 GMT 2019",
        "nextIncrementalBackupDate":"Fri Dec 04 03:00:00 GMT 2019",
        "backupDestination":"BOTH",
        "cloudStorageContainer":"Storage-ExampleIdentityDomain\/mybackupcontainer",
        "cloudStorageUser":"username",
        "totalCloudStorageContainerUsed":"1.8GB",
        "totalCloudStorageContainerUsedInBytes":1934445222,
        "totalBackupVolumeUsed":"1.8GB",
        "totalBackupVolumeUsedInBytes":1934445222,
        "percentBackupVolumeUsed":0.9007961750030518
    }