Restoring a Service Instance

You can restore an Oracle SOA Cloud Service instance from a backup using the REST API, as described in the following procedure. You use a restore operation to undo configuration changes you do not want by returning the service instance to a particular state.

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.

When you restore from a backup, you can also choose to reset the Oracle WebLogic Server and the JDK software to the versions that correspond to the official patch set update (PSU) level of the software that Oracle SOA Cloud Service is currently running, or leave the versions unchanged.

Consider the following before you restore an Oracle SOA Cloud Service instance:

  • If the hosts in the backup and the service instance do not match, how Oracle SOA Cloud Service handles the mismatch depends on the cause of the mismatch. See Back Up and Restore an Oracle SOA Cloud Service Instance in Administering Oracle SOA Cloud Service.

  • If a service instance contains Coherence Managed Servers that are not included the backup, you must scale in the Coherence data tier on the instance before trying to restore the instance.

  • If a database backup was included in the Oracle SOA Cloud Service instance backup, know that restoration of the database files for the Oracle Database Cloud Service database deployment associated with the Oracle SOA Cloud Service instance is not supported through the Oracle SOA Cloud Service instance restore operation. You need to restore the database files separately. Depending on whether the Database Cloud Service database deployment is hosting a single-instance database or an Oracle Real Application Clusters (Oracle RAC) database, you use an RMAN tag or a timestamp of the associated database backup to restore the database files. The RMAN tag or timestamp is the dbTag value that is returned when you perform a GET request on the Oracle SOA Cloud Service instance backup. For more information about restoring the database files for the Database Cloud Service database deployment, see Restoring from a Specific Backup or Restoring to a Specific Point in Time in Administering Oracle Database Classic Cloud Service.

To restore an Oracle SOA Cloud Service instance from a backup:

  1. Before restoring from a backup, review the backups that are currently defined to retrieve the ID of the backup from which you want to restore.
    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/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 (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 in JSON format. There is one completed backup.

    {
        "backups":[
        {
            "backupId":"1449332100032",
            "jobId":"8191",
            "backupStartDate":"Sat Dec 05 16:15:01 GMT 2019",
            "backupCompleteDate":"Sat Dec 05 17:36:18 GMT 2019",
            "expirationDate":"Mon Jan 04 16:15:00 GMT 2019",
            "initiatedBy":"scheduled",
            "full":true,
            "local":false,
            "localCopy":true,
            "databaseIncluded":true,
            "size":"15.8MB",
            "sizeInBytes":16557866,
            "dbTag":"TAG20191205T163004",
            "status":"Completed",
            "href":"https:\/\/rest_server_url\/paas\/service\/soa\/api\/v1.1\/instances\/domainName\/ExampleInstance\/backups\/1449332100032",
            "serviceComponents":[
            {
                "type":"JDK",
                "version":"1.7.0_xx"
            },
            {
                "type":"OTD",
                "version":"11.1.1.9.x"
            },
            {
                "type":"WLS",
                "version":"12.1.3.0.x"
            },
            {
                "type":"OTD_JDK",
                "version":"1.7.0_xx"
            }],
            "notes":"Automated backup"
        }]
    }
  2. Create a JSON document, restore.json, that defines the backup ID from which to restore.

    Using the example shown earlier, the backup ID is:

    {
        "backupId":"1449332100032"
        }

    See Start a Restore Operation for the complete list of request attributes you can use.

  3. Restore the Oracle SOA Cloud Service instance from a backup, passing the JSON document created in step 2.
    curl -i -X POST -u username:userPassword1! -d @restore.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/restoredbackups
    

    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 (restore.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 restore from an existing backup when the backup service for the specified service instance is in a DISABLED state.

    For more information, see Start a Restore Operation.

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

    {
        "operationName":"restore-backup",
        "job_id":"8227",
        "target_uri":"https:\/\/rest_server_url/\/paas\/service\/soa\/api\/v1.1\/instances\/domainName\/ExampleInstance\/restoredbackups\/8227"
    } 
  4. View detailed information about the restoration operation using the restoration operation status URI (target_uri) returned in the response body in step 3.
    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/restoredbackups/8227
    

    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.

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

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

    {
        "backupId":"1449332100032",
        "backupStartDate":"Sat Dec 05 16:15:00 GMT 2019",
        "jobId":"8227",
        "recoveryStartDate":"Thu Dec 10 23:11:55 GMT 2019",
        "recoveryCompleteDate":"Thu Dec 10 23:24:26 GMT 2019"
        "status":"Completed",
        "statusDetails":"Downloading the backup archive from the Oracle Storage Cloud Service container...The backup archive already exists in the block storage and does not need to be downloaded from the Oracle Storage Cloud Service container...
           Submitted the restoration precheck for remote execution...Restoration precheck passed...Submitted the restoration for remote execution...
           Stopping WebLogic Server...Stopped WebLogic Server...Restoring the configuration data for WebLogic Server administration server on host exampleinstance-wls-1...
           Restored the configuration data for WebLogic Server administration server on host exampleinstance-wls-1...Restoring Oracle Traffic Director on host exampleinstance-lb-1...
           Restored Oracle Traffic Director on host exampleinstance-lb-1...Restoring the configuration data for WebLogic Server administration server on host exampleinstance-wls-2...
           Restored the configuration data for WebLogic Server administration server on host exampleinstance-wls-2...
           Starting WebLogic Server...Started WebLogic Server...Unlocked the WebLogic Server domain configuration...
           Completed the restoration...Validated the load balancer",
        "staticDataIncluded":false,
        "configDataIncluded":true,
        "otdIncluded":true,
        "databaseIncluded":false
    }