Migrate Metadata from the Primary Instance
Export the metadata from the primary instance to the standby instance.
- Use REST APIs to export the metadata and import the same.
- Use the Oracle Integration UI to export and import the metadata. For details, see Export and Import Design-Time Metadata Between Instances in Provisioning and Administering Oracle Integration Generation 2.
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 hostnames 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 Generation 2 for the same.
To synchronize the metadata between the instances using REST APIs:
-
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 "archive_Local_Suite_Instance-<jobId>.zip", "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.
-
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. -
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 theimportActivateMode
variable toImportOnly
, 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.
-
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.