|
1 | 1 | ---
|
2 | 2 | title: Back up Azure Disks using Azure Data Protection REST API.
|
3 | 3 | description: In this article, learn how to configure, initiate, and manage backup operations of Azure Disks using REST API.
|
4 |
| -ms.topic: conceptual |
5 |
| -ms.date: 10/06/2021 |
| 4 | +ms.topic: how-to |
| 5 | +ms.date: 05/30/2023 |
6 | 6 | ms.assetid: 6050a941-89d7-4b27-9976-69898cc34cde
|
7 | 7 | author: jyothisuri
|
8 | 8 | ms.author: jsuri
|
| 9 | +ms.custom: engagement-fy23 |
9 | 10 | ---
|
10 | 11 |
|
11 | 12 | # Back up Azure Disks using Azure Data Protection via REST API
|
12 | 13 |
|
13 | 14 | This article describes how to manage backups for Azure Disks via REST API.
|
14 | 15 |
|
| 16 | +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. |
| 17 | + |
15 | 18 | For information on the Azure Disk backup region availability, supported scenarios and limitations, see the [support matrix](disk-backup-support-matrix.md).
|
16 | 19 |
|
17 | 20 | ## Prerequisites
|
@@ -52,7 +55,7 @@ You need to assign a few permissions via RBAC to the vault (represented by vault
|
52 | 55 |
|
53 | 56 | ### Prepare the request to configure backup
|
54 | 57 |
|
55 |
| -Once the relevant permissions are set to the vault and the disk, and the vault and policy are configured, we can prepare the request to configure backup. The following is the request body to configure backup for an Azure Disk. The Azure Resource Manager ID (ARM ID) of the Azure Disk and its details are mentioned in the _datasourceinfo_ section and the policy information is present in the _policyinfo_ section where the snapshot resource group is provided as one of the policy parameters. |
| 58 | +Once the relevant permissions are set to the vault and the disk, and the vault and policy are configured, we can prepare the request to configure backup. The following is the request body to configure backup for an Azure Disk. The Azure Resource Manager ID (ARM ID) of the Azure Disk and its details are mentioned in the `datasourceinfo` section and the policy information is present in the `policyinfo` section where the snapshot resource group is provided as one of the policy parameters. |
56 | 59 |
|
57 | 60 | ```json
|
58 | 61 | {
|
@@ -101,7 +104,7 @@ POST https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
|
101 | 104 |
|
102 | 105 | The [request body](#prepare-the-request-to-configure-backup) that we prepared earlier will be used to provide details of the Azure Disk to be protected.
|
103 | 106 |
|
104 |
| -#### Example request body |
| 107 | +**Example request body** |
105 | 108 |
|
106 | 109 | ```json
|
107 | 110 | {
|
@@ -136,17 +139,17 @@ The [request body](#prepare-the-request-to-configure-backup) that we prepared ea
|
136 | 139 |
|
137 | 140 | Backup request validation is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). So, this operation creates another operation that needs to be tracked separately.
|
138 | 141 |
|
139 |
| -It returns two responses: 202 (Accepted) when another operation is created and then 200 (OK) when that operation completes. |
| 142 | +It returns two responses: 202 (Accepted) when another operation is created and 200 (OK) when that operation completes. |
140 | 143 |
|
141 | 144 | |Name |Type |Description |
|
142 | 145 | |---------|---------|---------|
|
143 | 146 | |202 Accepted | | The operation will be completed asynchronously |
|
144 | 147 | |200 OK | [OperationJobExtendedInfo](/rest/api/dataprotection/backup-instances/validate-for-backup#operationjobextendedinfo) | Accepted |
|
145 | 148 | | Other Status codes | [CloudError](/rest/api/dataprotection/backup-instances/validate-for-backup#clouderror) | Error response describing why the operation failed |
|
146 | 149 |
|
147 |
| -##### Example responses for validate backup request |
| 150 | +**Example responses for validate backup request** |
148 | 151 |
|
149 |
| -###### Error response |
| 152 | +##### Error response |
150 | 153 |
|
151 | 154 | If the given disk is already protected, it returns the response as HTTP 400 (Bad request) and states that the given disk is protected to a backup vault along with details.
|
152 | 155 |
|
@@ -196,7 +199,7 @@ X-Powered-By: ASP.NET
|
196 | 199 | }
|
197 | 200 | ```
|
198 | 201 |
|
199 |
| -###### Tracking response |
| 202 | +##### Track response |
200 | 203 |
|
201 | 204 | If the datasource is unprotected, then the API proceeds for further validations and creates a tracking operation.
|
202 | 205 |
|
@@ -459,7 +462,7 @@ DELETE "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/Test
|
459 | 462 |
|
460 | 463 | *DELETE* protection is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). So, this operation creates another operation that needs to be tracked separately.
|
461 | 464 |
|
462 |
| -It returns two responses: 202 (Accepted) when another operation is created, and then 200 (OK) when that operation completes. |
| 465 | +It returns two responses: 202 (Accepted) when another operation is created, and 200 (OK) when that operation completes. |
463 | 466 |
|
464 | 467 | |Name |Type |Description |
|
465 | 468 | |---------|---------|---------|
|
|
0 commit comments