Skip to content

Commit 4d84fc6

Browse files
Merge pull request #276432 from AbhishekMallick-MS/May-27-2024-1Freshness
Freshness - Restore disk using REST
2 parents c604312 + a5dfbc9 commit 4d84fc6

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

articles/backup/backup-azure-dataprotection-use-rest-api-restore-disks.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
title: Restore Azure Disks using Azure Data Protection REST API
33
description: In this article, learn how to restore Azure Disks using Azure Data protection REST API.
44
ms.topic: how-to
5-
ms.date: 05/25/2023
5+
ms.date: 05/27/2024
66
ms.assetid: 30f4e7ff-2a55-4a85-be44-55feedc24607
7-
ms.custom: engagement-fy23
7+
ms.custom: engagement-fy24
88
author: AbhishekMallick-MS
99
ms.author: v-abhmallick
1010
---
1111

1212
# Restore Azure Disks using Azure Data Protection REST API
1313

14-
This article describes how to restore [disks](disk-backup-overview.md) using Azure Backup.
14+
This article describes how to restore and create a new [Azure Disks](disk-backup-overview.md) using Azure Backup.
1515

1616
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.
1717

@@ -29,17 +29,15 @@ Azure Disk Backup offers a turnkey solution that provides snapshot lifecycle man
2929

3030
In the example, we'll refer to an existing backup vault _TestBkpVault_, under the resource group _testBkpVaultRG_, where an Azure Disk is named _msdiskbackup-2dc6eb5b-d008-4d68-9e49-7132d99da0ed_.
3131

32-
## Restore to create a new Azure Disk
33-
34-
### Set up permissions
32+
## Set up permissions
3533

3634
Backup vault uses managed identity to access other Azure resources. To restore from backup, Backup vault’s managed identity requires a set of permissions on the resource group where the disk needs to be restored.
3735

3836
Backup vault uses a system-assigned managed identity, which is restricted to one per resource and is tied to the lifecycle of this resource. To grant permissions to the managed identity, use the Azure role-based access control (Azure RBAC). Managed identity is a specific service principal that you may only use with Azure resources. Learn more about [Managed Identities](../active-directory/managed-identities-azure-resources/overview.md).
3937

4038
Assign the relevant permissions for vault's system-assigned managed identity on the target resource group where the disks will be restored/created. [Learn more](restore-managed-disks.md#restore-to-create-a-new-disk).
4139

42-
### Fetch the list of recovery points
40+
## Fetch the list of recovery points
4341

4442
To list all the available recovery points for a backup instance, use the [list recovery points](/rest/api/dataprotection/recovery-points/list) API.
4543

@@ -53,7 +51,7 @@ For example, this API translates to:
5351
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/testBkpVault/backupInstances/msdiskbackup-2dc6eb5b-d008-4d68-9e49-7132d99da0ed/recoveryPoints?api-version=2021-01-01
5452
```
5553

56-
#### Responses for list of recovery points
54+
### Responses for list of recovery points
5755

5856
Once you submit the *GET* request, this returns response as 200 (OK) and the list of all discrete recovery points with all the relevant details.
5957

@@ -150,13 +148,13 @@ X-Powered-By: ASP.NET
150148

151149
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.
152150

153-
### Prepare the restore request
151+
## Prepare the restore request
154152

155153
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.
156154

157155
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.
158156

159-
#### Construct the request body for restore request
157+
### Construct the request body for restore request
160158

161159
The following request body contains the recovery point ID and the restore target details.
162160

@@ -200,7 +198,7 @@ POST "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBk
200198

201199
[Learn more](/rest/api/dataprotection/backup-instances/validate-for-restore#request-body) about the request body for this POST API.
202200

203-
##### Request body to validate restore request
201+
#### Request body to validate restore request
204202

205203
We have constructed a section of the same in the [above section](#construct-the-request-body-for-restore-request). Now, we'll add object type and use it to trigger a validate operation.
206204

@@ -278,7 +276,7 @@ Track the _Azure-AsyncOperation_ header with a *GET* request. When the request i
278276
}
279277
```
280278

281-
#### Trigger restore requests
279+
## Trigger the restore requests
282280

283281
The trigger restore operation is a ***POST*** API. [Learn more](/rest/api/dataprotection/backup-instances/trigger-restore) about the trigger restore operation.
284282

@@ -292,11 +290,11 @@ For example, the API translates to:
292290
POST "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/testBkpVault/backupInstances/msdiskbackup-2dc6eb5b-d008-4d68-9e49-7132d99da0ed/restore?api-version=2021-01-01"
293291
```
294292

295-
##### Create a request body for restore operations
293+
### Create a request body for restore operations
296294

297295
Once the requests are validated, use the same request body to trigger the _restore request_ with minor changes.
298296

299-
###### Example request body for restore
297+
### Example request body for restore
300298

301299
The only change from the validate restore request body is to remove the _restoreRequest_ object at the start and change the object type.
302300

@@ -322,7 +320,7 @@ The only change from the validate restore request body is to remove the _restore
322320
}
323321
```
324322

325-
#### Response to trigger restore requests
323+
### Response to trigger restore requests
326324

327325
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.
328326

@@ -374,7 +372,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
374372
}
375373
```
376374

377-
#### Track jobs
375+
## Track the restore job
378376

379377
The _trigger restore requests_ triggered the restore job. To track the resultant Job ID, use the [GET Jobs API](/rest/api/dataprotection/jobs/get).
380378

@@ -446,7 +444,7 @@ Use the *GET* command to track the _JobId_ present in the [trigger restore respo
446444

447445
The job status above indicates that the restore job is completed and the disks have been recovered to the specified subscription and target resource group.
448446

449-
## Next steps
447+
## Next step
450448

451449
[Overview of Azure Disk backup](disk-backup-overview.md)
452450

articles/backup/backup-support-automation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ You can automate most backup related tasks using programmatic methods in Azure
9898
| Backup | Create backup policy and configure backup | Supported <br><br> [See the examples](./backup-managed-disks-ps.md). | Supported <br><br> [See the examples](./backup-managed-disks-cli.md). | Supported <br><br> [See the examples](./backup-azure-dataprotection-use-rest-api-backup-disks.md). | Currently not supported | Supported | Supported <br><br> [See the examples](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.dataprotection/backup-create-disk-enable-protection). | Supported <br><br> [See the examples](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_protection_backup_instance_disk). |
9999
| Backup | Run on-demand backup | Supported <br><br> [See the examples](./backup-managed-disks-ps.md#run-an-on-demand-backup). | Supported <br><br> [See the examples](./backup-managed-disks-cli.md#run-an-on-demand-backup). | N/A | N/A | N/A | N/A | N/A |
100100
| Restore | Restore to new disk | Supported <br><br> [See the examples](./restore-managed-disks-ps.md). | Supported <br><br> [See the examples](./restore-managed-disks-cli.md). | Supported <br><br> [See the examples](./backup-azure-dataprotection-use-rest-api-restore-disks.md). | N/A | N/A | N/A | N/A |
101-
| Manage | Monitor jobs | Supported <br><br> [See the examples](./restore-managed-disks-ps.md#tracking-job). | Supported <br><br> [See the examples](./restore-managed-disks-cli.md#tracking-job). | Supported <br><br> [See the examples](./backup-azure-dataprotection-use-rest-api-restore-disks.md#track-jobs). | N/A | N/A | N/A | N/A |
101+
| Manage | Monitor jobs | Supported <br><br> [See the examples](./restore-managed-disks-ps.md#tracking-job). | Supported <br><br> [See the examples](./restore-managed-disks-cli.md#tracking-job). | Supported <br><br> [See the examples](./backup-azure-dataprotection-use-rest-api-restore-disks.md#track-the-restore-job). | N/A | N/A | N/A | N/A |
102102
| Manage | Modify backup policy | Currently not supported | Currently not supported | Currently not supported | N/A | N/A | N/A | N/A |
103103
| Manage | Stop protection and retain backup data | Supported | Supported | Supported | N/A | N/A | N/A | N/A |
104104
| Manage | Stop protection and delete backup data | Supported | Supported | Supported | N/A | N/A | N/A | N/A |
@@ -136,4 +136,4 @@ You can automate most backup related tasks using programmatic methods in Azure
136136

137137
## Next steps
138138

139-
[Automation in Azure Backup](automation-backup.md)
139+
[Automation in Azure Backup](automation-backup.md)

0 commit comments

Comments
 (0)