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-arm-userestapi-restoreazurevms.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,19 @@ title: Restore Azure VMs using REST API
3
3
description: In this article, learn how to manage to restore operations of Azure Virtual Machine Backup using REST API.
4
4
ms.topic: how-to
5
5
ms.service: azure-backup
6
-
ms.date: 04/24/2024
6
+
ms.date: 01/30/2025
7
7
ms.assetid: b8487516-7ac5-4435-9680-674d9ecf5642
8
8
author: jyothisuri
9
9
ms.author: jsuri
10
10
---
11
11
12
12
# Restore Azure Virtual machines using REST API
13
13
14
-
Once the backup of an Azure virtual machine using Azure Backup is completed, one can restore entire Azure Virtual machines or disks or files from the same backup copy. This article describes how to restore an Azure VM or disks using REST API.
14
+
This article describes how to restore an Azure VM or disks using the REST API.
15
15
16
-
For any restore operation, one has to identify the relevant recovery point first.
16
+
## Prerequisites
17
+
18
+
After completing an Azure VM backup with Azure Backup, you can restore entire VMs, disks, or files from the same backup copy. For any restore operation, you have to first identify the relevant recovery point.
17
19
18
20
## Select Recovery point
19
21
@@ -111,7 +113,7 @@ X-Powered-By: ASP.NET
111
113
......
112
114
```
113
115
114
-
The recovery point is identified with the `{name}` field in the above response.
116
+
The recovery point is identified with the `{name}` field in the given response.
115
117
116
118
## Restore operations
117
119
@@ -122,15 +124,15 @@ After selecting the [relevant restore point](#select-recovery-point), proceed to
122
124
> [!IMPORTANT]
123
125
> All details about various restore options and their dependencies are mentioned [here](./backup-azure-arm-restore-vms.md#restore-options). Please review before proceeding to triggering these operations.
124
126
125
-
Triggering restore operations is a *POST* request. To know more about the API, refer to the["trigger restore" REST API](/rest/api/backup/restores/trigger).
127
+
Triggering restore operations is a *POST* request. Learn more about the ["trigger restore" REST API](/rest/api/backup/restores/trigger).
126
128
127
129
```http
128
130
POST https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore?api-version=2019-05-13
129
131
```
130
132
131
133
The `{containerName}` and `{protectedItemName}` are as constructed [here](backup-azure-arm-userestapi-backupazurevms.md#responses-to-get-operation). `{fabricName}` is "Azure" and the `{recoveryPointId}` is the `{name}` field of the recovery point mentioned [above](#example-response).
132
134
133
-
Once the recovery point is obtained, we need to construct the request body for the relevant restore scenario. The following sections outline the request body for each scenario.
135
+
Once the recovery point is obtained, construct the request body for the relevant restore scenario. The following sections outline the request body for each scenario:
@@ -208,21 +210,21 @@ Since the restore job is a long running operation, it should be tracked as expla
208
210
209
211
### Restore disks
210
212
211
-
If there's a need to customize the creation of a VM from the backup data, you can just restore disks into a chosen storage account and create a VM from those disks according to their requirements. The storage account should be in the same region as the Recovery Services vault and shouldn't be zone redundant. The disks, as well as the configuration of the backed-up VM ("vmconfig.json"), will be stored in the given storage account. As explained [above](#restore-operations), the relevant request body for restore disks is provided below.
213
+
If there's a need to customize the creation of a VM from the backup data, restore the disks into a chosen storage account and create a VM from those disks according to their requirements. The storage account should be in the same region as the Recovery Services vault and shouldn't be zone redundant. The disks, as well as the configuration of the backed-up VM ("vmconfig.json"), is stored in the given storage account. As explained [here](#restore-operations), the relevant request body for restore disks is provided below.
212
214
213
215
#### Create request body
214
216
215
-
To trigger a disk restore from an Azure VM backup, following are the components of the request body.
217
+
To trigger a disk restore from an Azure VM backup, following are the components of the request body:
For the complete list of definitions of the request body and other details, refer to[trigger Restore REST API document](/rest/api/backup/restores/trigger#request-body).
223
+
For the complete list of definitions of the request body and other details, see the[trigger Restore REST API article](/rest/api/backup/restores/trigger#request-body).
222
224
223
225
##### Example request
224
226
225
-
The following request body defines properties required to trigger a disk restore.
227
+
The following request body defines properties required to trigger a disk restore:
226
228
227
229
```json
228
230
{
@@ -266,11 +268,11 @@ If you're [selectively backing up disks](backup-azure-arm-userestapi-backupazure
266
268
267
269
```
268
270
269
-
Once you track the response as explained [above](#responses), and the long running job is complete, the disks and the configuration of the backed up virtual machine ("VMConfig.json") will be present in the given storage account.
271
+
Once you track the response as explained [here](#responses), and the long running job is complete, the disks and the configuration of the backed up virtual machine ("VMConfig.json") appears in the given storage account.
270
272
271
273
### Replace disks in a backed-up virtual machine
272
274
273
-
While restore disks creates disks from the recovery point, replace disks replaces the current disks of the backed-up VM with the disks from the recovery point. As explained [above](#restore-operations), the relevant request body for replacing disks is provided below.
275
+
While restore disks creates disks from the recovery point, replace disks replaces the current disks of the backed-up VM with the disks from the recovery point. As explained [here](#restore-operations), the relevant request body for replacing disks is provided below.
274
276
275
277
#### Create request body
276
278
@@ -446,7 +448,7 @@ The recovery point is identified with the `{name}` field in the above response.
446
448
447
449
### Get access token
448
450
449
-
To perform cross-region restore, you'll require an access token to authorize your request to access replicated restore points in the secondary region. To get an access token, follow these steps:
451
+
To perform cross-region restore, you require an access token to authorize your request to access replicated restore points in the secondary region. To get an access token, follow these steps:
0 commit comments