Migrating Using the REST API
Refer to the following steps to perform migration using the REST API.
- GET DR protection group details. Endpoint:
GET /drProtectionGroups/{drProtectionGroupId}
Response:
{
"id": "ocid1.drprotectiongroup.oc1.iad.xxxxxxxx",
"compartmentId": "ocid1.compartment.oc1..xxxxxxx",
"displayName": "IAD-DRPG-1234",
"role": "PRIMARY",
"peerId": "ocid1.drprotectiongroup.oc1.phx.xxxxxxx",
"peerRegion": "us-phoenix-1",
"logLocation": {
"namespace": "xyz1234",
"bucket": "bucket-1234",
"object": null
},
"members": [
{
"memberId": "ocid1.instance.oc1. iad.xxxxxxxx1",
"memberType": "COMPUTE_INSTANCE",
"isMovable": true,
"vnicMapping": [
{
"sourceVnicId": "ocid1.vnic.oc1.iad.xxxxxxxx",
"destinationSubnetId": "ocid1.subnet.oc1.phx.xxxxxx"
}
]
},
{
"memberId": "ocid1.instance.oc1.iad.xxxxxxxx2",
"memberType": "COMPUTE_INSTANCE",
"isMovable": false
},
{
"memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx",
"memberType": "VOLUME_GROUP"
}
],
"timeCreated": "2023-10-17T00:14:28.860Z",
"timeUpdated": "2023-10-17T00:14:44.544Z",
"lifecycleState": "ACTIVE",
"lifeCycleDetails": null,
"lifecycleSubState": null,
"freeformTags": null,
"definedTags": null,
"systemTags": null
}
- Update the DRPG deleting legacy compute members with
memberType:COMPUTE_INSTANCEby invoking an update DRPG API (PUT). Use the response of the GET request to build the update request payload by removing the legacy members.
Endpoint :GET /drProtectionGroups/{drProtectionGroupId}
Request:
{
"members": [
{
"memberType": "VOLUME_GROUP",
"memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx"
}
]
}
- Update the DRPG adding new compute members replacing the legacy compute members having
isMovable:falsewithmemberType:COMPUTE_INSTANCE_NON_MOVABLEand which are havingisMovable:truewithmemberType:COMPUTE_INSTANCE_MOVABLE.
Note:
The vnicMapping attribute in the legacy compute member object is changed to vnicMappings in new object.
Endpoint :PUT /drProtectionGroups/{drProtectionGroupId}
Request:
{
"members": [
{
"memberId": "ocid1.instance.oc1. iad.xxxxxxxx1",
"memberType": "COMPUTE_INSTANCE_MOVABLE",
"vnicMappings": [
{
"sourceVnicId": "ocid1.vnic.oc1.iad.xxxxxxxx",
"destinationSubnetId": "ocid1.subnet.oc1.phx.xxxxxx"
}
]
},
{
"memberId": "ocid1.instance.oc1.iad.xxxxxxxx2",
"memberType": "COMPUTE_INSTANCE_NON_MOVABLE"
},
{
"memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx",
"memberType": "VOLUME_GROUP"
}
]
}