API Explorer
API Explorer
Introduction
What's New
Appliance Management
Application Data Management
Asset Management
Asset Metadata
Authentication and Authorization
Cloud Disaster Recovery
Compliance
Copy Management
Credentials Management
Discovery
File Level Restore
Installation
Inventory Source Management
Kubernetes Data Management
Licenses Management
Location Management
Log Management
Monitoring
Protection Policies
Recovery and Reuse Management
Remote Service
Search Clusters
Secrets Manager
Server Disaster Recovery
Storage Management
Telemetry Setting
Upgrade
User Security Management
Virtual Machine Data Management
Whitelist Management

Restore Cloud Disaster Recovery

This tutorial describes how to use Cloud DR in PowerPower Data Manager. It covers:

Add Cloud DR to protection policy

Basic Flow (Login → Get policies → Get policy properties → Get data targets → Add Cloud DR stage to policy)

Protection policy creation is not covered here. See the tutorial entitled Create Policy.

1. Login

Use the login API to retrieve the access token. See the tutorial for authentication and authorization.

2. Get policies

Retrieves a list of existing policies by using this call:

GET /api/v2/protection-policies

Sample request body: Empty

The response of the API call:

OK (200)

...
"content": [{
	"id": "922f4c74-7503-4e73-a561-783a1dc9b836",
	"name": "my_policy_name",
	...
	"stages": [
			{
					"id": "c7988034-3342-473f-6bbc-8df963d08048",
					"type": "PROTECTION",
					...
			}
	],
	"filterIds": [],
	"createdAt": "2019-11-28T11:52:33.382Z",
	"updatedAt": "2019-11-28T11:52:49.073Z",
	"slaId": ""
}]
  • The ID that is used as policy_id is 922f4c74-7503-4e73-a561-783a1dc9b836 from the example above. From stages, the PROTECTION stage ID that is used as source_stage_id is c7988034-3342-473f-6bbc-8df963d08048 from the example above. These two IDs are used in subsequent calls.

3. Get policy properties

Retrieves the policy properties by using this call:

GET /api/v2/protection-policies/{{policy_id}}

Sample request body: Empty

The response of the API call:

OK (200)

{
    "id": "922f4c74-7503-4e73-a561-783a1dc9b836",
    "name": "my_policy_name",
    ...
}

The JSON body is used in subsequent calls.

4. Get data targets

Retrieves the data target properties by using this call:

GET api/v2/data-targets?filter=type eq "CDR_STORAGE" and subtype eq "CDR_CONTAINER" and lastDiscoveryStatus ne "NOT_DETECTED"

Sample request body: Empty

The response of the API call:

OK (200)

...
"content" : [ {
	"id" : "73658a03-e5a6-5841-a34d-778a90f4d9b6",
	"name" : "env33-canada",
	"type" : "CDR_STORAGE",
	"subtype" : "CDR_CONTAINER",
	"vendor" : "AWS",
	"storageArrayId" : "22bd072c-4f68-4aaf-ba60-d06b0abc4d2c",
	"details" : { },
	"lastDiscoveryStatus" : "NEW",
	"lastDiscovered" : "2019-11-28T11:11:00Z",
	"externalId" : "ffb9e45c-63cf-4ad1-8a66-2df555212870"
} ]
  • The data_target_id is 73658a03-e5a6-5841-a34d-778a90f4d9b6 from the example above. The cdr_storage_system_id (22bd072c-4f68-4aaf-ba60-d06b0abc4d2c) is storageArrayId in the example above). These IDs are used in subsequent calls.

5. Add Cloud DR stage to policy

Adds Cloud DR stage to the protection policy by using this call:

PUT api/v2/protection-policies/{{policy_id}}

The request body updates the policy JSON to add a new Cloud DR stage:

{
    "id": "{{random_uuid}}",
    "type": "CDR",
    "passive": false,
    "attributes": {},
    "target": {
        "storageSystemId": "{{cdr_storage_system_id}}",
        "dataTargetId": "{{data_target_id}}"
    },
    "slaId": null,
    "sourceStageId": "{{source_stage_id}}",
    "operations": [
        {
            "type": "AUTO_FULL",
            "schedule": null
        }
    ],
    "retention": {
        "interval": 12,
        "unit": "DAY"
    }
}
  • policy_id : The policy ID from previous call.
  • source_stage_id : The source PROTECTION stage ID from previous call.
  • cdr_storage_system_id : The Cloud D storage ID from previous call.
  • data_target_id : The Cloud DR data target in storage from previous call.

Sample request body:

{
    "id": "922f4c74-7503-4e73-a561-783a1dc9b836",
    "name": "my_policy_name",
     ...refer to the response body of 3. Get policy properties...
    "stages": [
        {
            "id": "c7988034-3342-473f-6bbc-8df963d08048",
            "type": "PROTECTION",
            "passive": false,
           ...refer to the response body of 3. Get policy properties...
        },
        {
            "id": "2f1259f1-de4d-0b76-5b9b-f03c1674fff6",
            "type": "CDR",
            "passive": false,
            "retention": {
                "interval": 12,
                "unit": "DAY",
                "storageSystemRetentionLock": false
            },
            "target": {
                "storageSystemId": "22bd072c-4f68-4aaf-ba60-d06b0abc4d2c",
                "dataTargetId": "73658a03-e5a6-5841-a34d-778a90f4d9b6"
            },
            "sourceStageId": "c7988034-3342-473f-6bbc-8df963d08048",
            "attributes": {},
            "operations": [
                {
                    "type": "AUTO_FULL"
                }
            ]
        }
    ],
    "filterIds": [],
    "createdAt": "2019-11-28T11:52:33.382Z",
    "updatedAt": "2019-11-28T11:52:49.073Z",
    "slaId": ""
}

The response of the API call:

OK (200) 

{
    "id": "922f4c74-7503-4e73-a561-783a1dc9b836",
    "name": "my_policy_name",
    ...
}

Run DR test and failover

Basic Flow (Login → get asset properties → get copy map → get asset copy → get network properties → run DR test or failover)

1. Login

Use the login API to retrieve the access token. See the tutorial for authentication and authorization.

2. Get assets properties

Retrieves a list of all the assets by using this call:

GET /api/v2/assets?filter=lastAvailableCopyTime ne null
  • You can also add filter name, for example: name eq “example-VM-1”.

Sample request body: Empty

The response of the API call (using details of one VM as an example from the response):

OK (200) 

{
    "id": "9494fa21-74d6-5bd1-845c-1e06fffea561",
    "name": "ubuntu-vmTools-Auto-forTests",
    ...
} 
  • From the selected VM details, the first ID and name is used as vm_id and vm_name in subsequent calls.

3. Get copy map

Retrieves a list of copies/backups for the specified asset by using this call:

GET api/v2/assets/{{vm_id}}/copy-map

Sample request body: Empty

The response of the API call:

OK (200) 

...
"content" : [
	{
    "id": "9494fa21-74d6-5bd1-845c-1e06fffea561",
    "nodeId": "9494fa21-74d6-5bd1-845c-1e06fffea561",
    "name": "ubuntu-vmTools-Auto-forTests",
    "storageSystemName": null,
    "assetType": "VMWARE_VIRTUAL_MACHINE",
    "totalCopyCount": "2",
    "totalSizeBytes": "809218046",
    "details": {
        "vm": {
            ...
        }
    },
    "storageLocations": [
        {
            "id": "506eb9a9-fc52-4cdc-8ef2-fa33a4538adc",
            "nodeId": "9494fa21-74d6-5bd1-845c-1e06fffea561 506eb9a9-fc52-4cdc-8ef2-fa33a4538adc",
            "replication": false,
            "storageSystemType": "DATA_DOMAIN_SYSTEM",
            "name": "cdrenv33-ddve1-ip1.cdr.ilcoe.lab.emc.com",
            ...
            "replicationLocations": [
                {
                    "id": "2f70ac56-2fc7-4206-b254-b38efc311fe1",
                    "nodeId": "9494fa21-74d6-5bd1-845c-1e06fffea561 2f70ac56-2fc7-4206-b254-b38efc311fe1",
                    "replication": true,
                    "storageSystemType": "CDR_REGION_SYSTEM",
                    "name": "ca-central-1",
                    ...
                }
            ]
        }
    ]
	}, ...
]
  • The cdr_storage_system_id is 2f70ac56-2fc7-4206-b254-b38efc311fe1 in the example above from storageLocations.replicationLocations.id in which storageSystemType is CDR_REGION_SYSTEM.
  • The cdr_storage_system_name is ca-central-1 in the example above from storageLocations.replicationLocations.name in which storageSystemType is CDR_REGION_SYSTEM.

4. Get asset copy

Retrieves a list of copies/backups for the specified asset by using this call:

GET api/v2/assets/{{vm_id}}/copies?filter=location in ("LOCAL", "LOCAL_RECALLED") and storageSystemId eq "{{cdr_storage_system_id}}" and replicatedCopy eq true

Sample request body: Empty

The response of the API call (uses details of one VM as an example from the response):

OK (200)

...
"content" : [
	{
    "id": "7e050c5c-dabd-5f51-bca7-414bf789162f",
    "createTime": "2019-11-26T10:40:42.734Z",
    "storageSystemId": "6ec639f3-0443-4817-85d1-3ef42dc6d454",
    ...
	}, ...
]
  • The first ID is used as copy_id (7e050c5c-dabd-5f51-bca7-414bf789162f) in subsequent calls.

5. Get network properties

Retrieves network details by using this call:

GET api/v2/cloud-dr-regions/{{cdr_storage_system_name}}/networks

Sample request body: Empty

The response of the API call (using one subnet as an example from the response):

OK (200) 

{
    "virtualNetworkName": "DefaultVPC",
    "virtualNetworkId": "vpc-f6ac2c9e",
    "subnets": [
        {
            "subnetName": "MySubnet",
            "subnetId": "subnet-450fc73f",
            "subnetZone": "ca-central-1b",
            "addressSpace": "172.31.0.0/20",
            "occupiedIPs": [
                ...
            ]
        },
        ...
    ],
    "securityGroups": [
        {
            "id": "sg-00732d6b",
            "name": "rds-launch-wizard"
        },
        ...
    ]
},
  • From the selected subnet, the subnetId is used as subnet_id (subnet-304df158 from the example above). From securityGroups, any ID can be used as security_group_id (for example: sg-8b7912e0 from the example above) in subsequent calls.

6. Run DR test or failover

Run DR test or failover by using this call:

POST api/v2/restored-copies
DR Type Description
Test Restore the VM to the specified cloud.
Failover Restore the VM to the specified cloud, including network configuration.
  • Body for DR test:
{
    "description": "Restore copy to cloud - {{vm_name}}",
    "restoreType": "TO_CLOUD",
    "copyId": "{{copy_id}}",
    "restoredCopiesDetails": {
        "targetCloudInfo": {
            "drType": "Test",
            "networkId": "{{subnet_id}}",
            "securityGroupIds": [
                "{{security_group_id}}"
            ]
        }
    }
}
  • Body for failover:
{
    "description": "Restore copy to cloud - {{vm_name}}",
    "restoreType": "TO_CLOUD",
    "copyId": "{{copy_id}}",
    "restoredCopiesDetails": {
        "targetCloudInfo": {
            "drType": "Failover",
            "networkId": "{{subnet_id}}",
            "securityGroupIds": [
                "{{security_group_id}}"
            ]
        }
    }
}
  • copy_id (7e050c5c-dabd-5f51-bca7-414bf789162f for this call)
  • subnet_id (subnet-304df158 for this call)
  • security_group_id (sg-8b7912e0 for this call)

Sample request body for DR test:

{
  "id": "da9eb72f-35e5-4f4a-8c33-cf584118aaa5",
  "description": "Restore copy to cloud - ubuntu-vmTools-Auto-forTests",
  "state": "WAITING",
  "status": "UNKNOWN",
  "restoreType": "TO_CLOUD",
  "copyId": "e0fc27b9-b2c6-514e-8803-006f29c398f9",
  "startTime": "2020-02-18T10:49:14.939Z",
  "completionTime": null,
  "expirationTime": null,
  "activityId": "3d868969-e216-4a51-9227-b3d8f3a4920b",
  "restoredCopiesDetails": {
    "targetCloudInfo": {
      "drType": "Test",
      "networkId": "subnet-450fc73f",
      "securityGroupIds": [
        "sg-8b7912e0"
      ]
    }
  },
  "restoreEntireBackupTransaction": null
}

Sample request body for failover:

{
    "id": "84260147-bb13-45c6-b5d5-a3d721cf882c",
    "description": "Restore copy to cloud - ubuntu-vmTools-Auto-forTests",
    "state": "WAITING",
    "status": "UNKNOWN",
    "restoreType": "TO_CLOUD",
    "copyId": "e0fc27b9-b2c6-514e-8803-006f29c398f9",
    "startTime": "2020-02-18T10:49:14.939Z",
    "completionTime": null,
    "expirationTime": null,
    "activityId": "cdd90d64-faa9-4040-8025-58b9000e5864",
    "restoredCopiesDetails": {
        "targetCloudInfo": {
            "drType": "Failover",
            "networkId": "subnet-450fc73f",
            "securityGroupIds": [
                "sg-8b7912e0"
            ]
        }
    }
}
  • Get the activityId for any activity that you require with this test or failover. You can monitor it with this call: GET api/v2/activities/{{activityId}}. When finished, you can find the sessions with GET api/v2/cloud-dr-sessions.

Delete DR test and failover

Basic Flow (Login → get Cloud DR sessions → delete DR test or failover)

1. Login

Uses the login API to retrieve the access token. See the tutorial for authentication and authorization.

2. Get Cloud DR sessions

Retrieves a list of Cloud DR running sesions by using this call:

GET api/v2/cloud-dr-sessions

Sample request body: Empty

The response of the API call:

OK (200) 

...
	"content": [
			{
					"assetName": "ubuntu-vmTools-Auto-forTests",
					"drType": "Failover",
					"region": "ca-central-1",
					"status": "READY",
					"instanceId": "i-07b09ff88adf256d4",
					"copyTime": "2019-11-26T10:40:43Z",
					"id": "d27a6e65-f98d-4333-8fc5-9b5ebf8643ea"
			}
	]
  • The ID is dr_id in subsequent calls.

3. Delete DR test or failover

Deletes DR test or failover by using this call:

Delete api/v2/cloud-dr-sessions/{{dr_id}}

Sample request body: Empty

No response exists for this API call. There are three response codes:

  • 204 No Content
  • 404 Not Found
  • 401 Not Authorized