You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/backup/backup-azure-dataprotection-use-rest-api-restore-disks.md
+16-20Lines changed: 16 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: Restore Azure Disks using Azure Data Protection REST API
3
3
description: In this article, learn how to restore Azure Disks using Azure Data protection REST API.
4
-
ms.topic: conceptual
5
-
ms.date: 10/06/2021
4
+
ms.topic: how-to
5
+
ms.date: 05/25/2023
6
6
ms.assetid: 30f4e7ff-2a55-4a85-be44-55feedc24607
7
7
author: jyothisuri
8
8
ms.author: jsuri
@@ -12,16 +12,12 @@ ms.author: jsuri
12
12
13
13
This article describes how to restore [disks](disk-backup-overview.md) using Azure Backup.
14
14
15
+
Azure Disk Backup offers a turnkey solution that provides snapshot lifecycle management for managed disks by automating periodic creation of snapshots and retaining it for configured duration using backup policy. You can manage the disk snapshots with zero infrastructure cost and without the need for custom scripting or any management overhead. This is a crash-consistent backup solution that takes point-in-time backup of a managed disk using incremental snapshots with support for multiple backups per day. It's also an agent-less solution and doesn't impact production application performance. It supports backup and restore of both OS and data disks (including shared disks), whether or not they're currently attached to a running Azure virtual machine.
16
+
15
17
>[!Note]
16
18
>- Currently, the Original-Location Recovery (OLR) option to restore by replacing the existing source disk (from where the backups were taken) isn't supported.
17
19
>- You can restore from a recovery point to create a new disk in the same resource group of the source disk or in any other resource group. It's known as Alternate-Location Recovery (ALR).
18
20
19
-
In this article, you'll learn how to:
20
-
21
-
- Restore to create a new disk
22
-
23
-
- Track the restore operation status
24
-
25
21
## Prerequisites
26
22
27
23
-[Create a Backup vault](backup-azure-dataprotection-use-rest-api-create-update-backup-vault.md)
@@ -65,7 +61,7 @@ Once you submit the *GET* request, this returns response as 200 (OK) and the lis
65
61
|200 OK |[AzureBackupRecoveryPointResourceList](/rest/api/dataprotection/recovery-points/list#azurebackuprecoverypointresourcelist)| OK |
66
62
|Other Status codes |[CloudError](/rest/api/dataprotection/recovery-points/list#clouderror)| Error response describes the reason for the operation failure. |
67
63
68
-
##### Example response for list of recovery points
64
+
**Example response for list of recovery points**
69
65
70
66
```http
71
67
HTTP/1.1 200 OK
@@ -151,13 +147,13 @@ X-Powered-By: ASP.NET
151
147
}
152
148
```
153
149
154
-
Select the relevant recovery points from the above list and proceed to prepare the restore request. We'll choose a recovery point named _a3d02fc3ab8a4c3a8cc26688c26d3356_ from the above list to restore.
150
+
Select the relevant recovery points from the above list and proceed to prepare the restore request. We'll choose a recovery point named `a3d02fc3ab8a4c3a8cc26688c26d3356` from the above list to restore.
155
151
156
152
### Prepare the restore request
157
153
158
154
Construct the Azure Resource Manager (ARM) ID of the new disk to be created with the target resource group (to which permissions were assigned as detailed [above](#set-up-permissions)) and the required disk name.
159
155
160
-
For example, we'll use a disk named _APITestDisk2_, under a resource group _targetrg_, present in the same region as the backed-up disk, but under a different subscription.
156
+
For example, we'll use a disk named `APITestDisk2`, under a resource group `targetrg`, present in the same region as the backed-up disk, but under a different subscription.
161
157
162
158
#### Construct the request body for restore request
163
159
@@ -237,16 +233,16 @@ We have constructed a section of the same in the [above section](#construct-the-
237
233
238
234
The _validate restore request_ is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). So, this operation creates another operation that needs to be tracked separately.
239
235
240
-
It returns two responses: 202 (Accepted) when another operation is created, and then 200 (OK) when that operation completes.
236
+
It returns two responses: 202 (Accepted) when another operation is created, and 200 (OK) when that operation completes.
241
237
242
238
|Name |Type |Description |
243
239
|---------|---------|---------|
244
240
|200 OK || Status of validate request |
245
241
|202 Accepted || Accepted |
246
242
247
-
###### Example response to restore validate request
243
+
**Example response to restore validate request**
248
244
249
-
Once the *POST* operation is submitted, it'll return the initial response as 202 (Accepted) with an _Azure-asyncOperation_ header.
245
+
Once the *POST* operation is submitted, it will return the initial response as 202 (Accepted) with an _Azure-asyncOperation_ header.
Track the _Azure-AsyncOperation_ header with a simple *GET* request. When the request is successful, it returns 200 (OK) with a success status response.
266
+
Track the _Azure-AsyncOperation_ header with a *GET* request. When the request is successful, it returns 200 (OK) with a success status response.
271
267
272
268
```http
273
269
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZmMzNDFmYWMtZWJlMS00NGJhLWE4YTgtMDNjYjI4Y2M5OTExOzVlNzMxZDBiLTQ3MDQtNDkzNS1hYmNjLWY4YWEzY2UzNTk1ZQ==?api-version=2021-01-01
@@ -329,16 +325,16 @@ The only change from the validate restore request body is to remove the _restore
329
325
330
326
The _trigger restore request_ is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). So, this operation creates another operation that needs to be tracked separately.
331
327
332
-
It returns two responses: 202 (Accepted) when another operation is created, and then 200 (OK) when that operation completes.
328
+
It returns two responses: 202 (Accepted) when another operation is created, and 200 (OK) when that operation completes.
333
329
334
330
|Name |Type |Description |
335
331
|---------|---------|---------|
336
332
|200 OK || Status of restore request |
337
333
|202 Accepted || Accepted |
338
334
339
-
##### Example response to trigger restore request
335
+
**Example response to trigger restore request**
340
336
341
-
Once the *POST* operation is submitted, it'll return the initial response as 202 (Accepted) with an _Azure-asyncOperation_ header.
337
+
Once the *POST* operation is submitted, it will return the initial response as 202 (Accepted) with an _Azure-asyncOperation_ header.
Track the _Azure-AsyncOperation_ header with a simple *GET* request. When the request is successful, it'll return 200 (OK) with a job ID that should be further tracked for completion of restore request.
358
+
Track the _Azure-AsyncOperation_ header with a *GET* request. When the request is successful, it will return 200 (OK) with a job ID that should be further tracked for completion of restore request.
363
359
364
360
```http
365
361
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZmMzNDFmYWMtZWJlMS00NGJhLWE4YTgtMDNjYjI4Y2M5OTExO2Q1NDIzY2VjLTczYjYtNDY5ZC1hYmRjLTc1N2Q0ZTJmOGM5OQ==?api-version=2021-01-01
@@ -381,7 +377,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
381
377
382
378
The _trigger restore requests_ triggered the restore job. To track the resultant Job ID, use the [GET Jobs API](/rest/api/dataprotection/jobs/get).
383
379
384
-
Use the simple GET command to track the _JobId_ present in the [trigger restore response](#example-response-to-trigger-restore-request) above.
380
+
Use the *GET* command to track the _JobId_ present in the [trigger restore response](#response-to-trigger-restore-requests) above.
385
381
386
382
```http
387
383
GET /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/testBkpVault/backupJobs/c4bd49a1-0645-4eec-b207-feb818962852?api-version=2021-01-01
0 commit comments