Run Disaster Recovery

Run Disaster Recovery

Run a disaster recovery for a given replication. Operation is available only on recovery site (for incoming replications). The operation requires a valid VMware Live Recovery subscription.

Request
URI
POST
https://{api_host}/pairings/{pairing_id}/replications/{replication_id}/actions/recovery
COPY
Path Parameters
string
pairing_id
Required

The ID of the pairing between this vSphere Replication server and the remote one.

string
replication_id
Required

The ID of a replication


Request Body

Spec containing disaster recovery settings.

RunRecoverySpec of type(s) application/json
Required

Show optional properties

{
    "folder_id": "Folder:folder-19:f26599ec-ff35-4da6-8c4d-72f6761309f3",
    "compute_resource_id": "string",
    "power_on": false,
    "sync_data": false
}
{
    "instance_id": "string",
    "folder_id": "Folder:folder-19:f26599ec-ff35-4da6-8c4d-72f6761309f3",
    "compute_resource_id": "string",
    "excluded_disk_backings": [
        {
            "disk_key": 0,
            "destination_path": "my_vm_folder/my_vm_disk_1.vmdk",
            "destination_datastore_id": "Datastore:datastore-16:ff4a23e7-2fed-4be0-be39-479ae372badd"
        }
    ],
    "power_on": false,
    "sync_data": false
}
string
instance_id
Optional

The instance of the replicated VM to use for recovery. If no instance is set and there is a promoted instance, the promoted instance will be used. If no promoted instance exists, the latest instance will be used. If set, the 'sync_data' parameter must be 'false'.

string
folder_id
Required

The ID of the folder to add the recovered virtual machine to. Could be a folder or a datacenter.

string
compute_resource_id
Required

The compute resource to which the virtual machine should be attached. Could be a resource pool, a cluster or a host system.

array of object
excluded_disk_backings
Optional

File backings for excluded disks. If 'destination_path' and 'destination_datastore_id' properties are not specified then the disk will be detached from the VM.

boolean
power_on
Required

Whether to power on the VM after the recovery completes.

boolean
sync_data
Required

Whether to perform offline sync to replicate the latest changes. If 'true', the protected site must still be available and the VMs powered off, else the recovery will fail. If the protected site is not available, and the user confirms the recovery should run, sync_data must be set to 'false'.

Authentication
This operation uses the following authentication methods.
Responses
202

Task to monitor the operation progress. Once successfully completed, the task result contains the newly registered VM ID.

Returns TaskDrResponseEntity of type(s) application/json
This response body class contains all of the following: InlineTaskDrResponseEntity0 , InlineTaskDrResponseEntity1
"TaskDrResponseEntity Object"

400

Bad request - the server cannot understand the request due to invalid syntax or invalid request body content

Returns ResponseError of type(s) application/json
"ResponseError Object"
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


401

Unauthorized - the client must authenticate itself to get the requested response

Operation doesn't return any data structure

403

Forbidden - not sufficient access rights to fulfill the request

Returns ResponseError of type(s) application/json
"ResponseError Object"
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


404

Not Found - server cannot find the requested in URL resource

Operation doesn't return any data structure

500

Internal server error - unexpected condition prevents fulfilling the request

Returns ResponseError of type(s) application/json
"ResponseError Object"
string
error_code
Optional

The code of the error.

string
message
Optional

The message of the error.

string As uuid As uuid
op_id
Optional

The ID of the operation.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"compute_resource_id:"string","folder_id:"string","power_on:"boolean","sync_data:"boolean"}' https://{api_host}/pairings/{pairing_id}/replications/{replication_id}/actions/recovery