Mit der REST-API migrieren
Führen Sie die Migration mit der REST-API wie folgt aus:
- GET DR-Schutzgruppendetails. Endpunkt:
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 } - Aktualisieren Sie das DRPG, das Legacy-Compute-Member löscht, mit
memberType:COMPUTE_INSTANCE, indem Sie eine Update-DRPG-API (PUT) aufrufen. Verwenden Sie die Antwort der GET-Anforderung, um die Payload der Aktualisierungsanforderung zu erstellen, indem Sie die Legacy-Elemente entfernen.Endpoint :GET /drProtectionGroups/{drProtectionGroupId}Request: { "members": [ { "memberType": "VOLUME_GROUP", "memberId": "ocid1.volumegroup.oc1.iad.xxxxxxx" } ] } - Aktualisieren Sie das DRPG, indem Sie neue Compute-Member hinzufügen, und ersetzen Sie die Legacy-Compute-Member mit
isMovable:falsedurchmemberType:COMPUTE_INSTANCE_NON_MOVABLE, dieisMovable:truedurchmemberType:COMPUTE_INSTANCE_MOVABLEaufweisen.Hinweis
Das AttributvnicMappingim Legacy-Compute-Elementobjekt wird in dem neuen Objekt invnicMappingsgeändert.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" } ] }
Übergeordnetes Thema: Von einer vorhandenen COMPUTE_INSTANCE zu einem neuen Instanztyp migrieren