Migrate Metadata from the Primary Instance

Export the metadata from the primary instance to the standby instance.

The Oracle Integration metadata consists of connections, integrations, lookups, libraries, projects, and packages. After you’ve configured the primary instance with all your integration deployments, you can export the metadata from the instance and import it into the standby instance. This as an initial, one-time task. You can export the metadata using any one of the following methods:

Note:

Before you use either of the preceding methods, you require an OCI Object Storage bucket to store the artifacts.

Subsequently, you can employ continuous integration continuous deployment (CICD) to have the metadata synchronized between instances. See Automate Metadata Synchronization.

Note:

  • You must use the original instance host names for all administrative tasks, including metadata migration.
  • It’s recommended that you import the artifacts without activating them so that the connections created in the secondary instance will not be in the Activated state. Once you have imported the artifacts, you can manually test the connections and activate them. Else, you can also use Connections REST Endpoints in REST API for Oracle Integration 3 for the same.

To synchronize the metadata between the instances using REST APIs:

  1. Export the metadata from the primary instance. Invoke the REST API using the following postman or curl command. This action uploads the metadata to the OCI Object Storage Cloud Service bucket instance.

    POST

    http:/host:port/ic/api/common/v1/exportServiceInstanceArchive

    Request Headers:

    Content-Type →application/json

    Request Payload:

    {     
              "jobName":"Pod1_Metadata"   -  If jobName is omitted filename will default to
              "Service_Instance_Data-<jobId>",     "overwrite":false,      - defaults to false, will return error if
              archive file already exists     "exportSecurityArtifacts":true,    
              "exportAppRoleMembers":true,     "description":"Export description",
                  "storageName",   - name of storage configuration, this can be used instead of
              storageInfo, if both are defined storageInfo will take precedence    
              "storageInfo":{        
              "storageUrl":"https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/paasdevoic/<bucket
              name>",
              "storageUser":"<OCI user name>",        
              "storagePassword":"<Auth Password>”     }
          }

    Response Headers:

    Location →http://host:port/ic/api/common/v1/exportServiceInstanceArchive/483

    Response Payload:

    {
              “jobId”: “483”, “location”:
              “https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/paasdevoic/<bucket
              name>”, “status”: “NOT_STARTED”
             }     

    Response Status:

    • 202 Accepted – Export job was accepted.
    • 409 Conflict – Import or export job is already running or storage details are incorrect/missing, or the file already exists (if overwrite is set to false).
    • 500 Internal Server Error – Error communicating to the registry or storage.
  2. Check the status of the export operation using the following command:

    GET

    http://host:port/ic/api/common/v1/exportServiceInstanceArchive/{jobId}

    If the status is Completed, the metadata has been successfully exported to the object storage bucket.

  3. Now, import the metadata into the standby instance. Invoke the REST API using the following postman or curl command.

    This action retrieves the archive from the OCI Object Storage Cloud Service bucket instance where the archive was initially created.

    POST

    http://host:port/ic/api/common/v1/importServiceInstanceArchive

    Request Headers:

    Content-Type →application/json

    Request Payload:

    {    
              "archiveFile":"archive_Local_Suite_Instance-483.zip",    
              "importActivateMode":"importOnly",      // ImportOnly | ImportActivate |
              ActivateOnly | StartSchedulesOnly
              "importSecurityArtifacts":true,  
              "importAppRoleMembers":true,
              "importScheduleParams":true,    
              "startSchedules":false,
              "description":"Import to standby",    
              "storageName",   - name of storage configuration, this can be used instead of
               storageInfo, if both are defined storageInfo will take precedence    
              "storageInfo":{        
                "storageUrl":"https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/paasdevoic/<bucket
              name>",         
                "storageUser":"OCI cloud user name",        
                "storagePassword":”Auth password"     
                  } 
              }

    Note:

    Set the importActivateMode variable to ImportOnly, so that the integration flows are imported but aren't activated.

    Response Payload:

    { 
             "jobId": "457", "status": "NOT_STARTED"
             }

    Response Status:

    • 202 Accepted – Export job was accepted.
    • 409 Conflict – Import or export job is already running or storage details are incorrect/missing, or the file already exists (if overwrite is set to false).
    • 500 Internal Server Error – Error communicating to the registry or storage.
  4. Verify the import status.

    GET

    https://host:port/ic/api/common/v1/importServiceInstanceArchive/457

    Where 457 is the Job ID from the import response payload.

    Note:

    In this example, the integrations imported are not activated, conforming to the best practice. However, if you have many integrations, you can activate the stateless integrations while importing, but do not activate scheduled, publish-subscribe, polling, or business events integrations.