Skip to content

Commit 2f7bf33

Browse files
author
AbhishekMallick01
committed
Incubation <50 visitors - VM restore using REST
1 parent 5c41a58 commit 2f7bf33

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

articles/backup/backup-azure-arm-userestapi-restoreazurevms.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ title: Restore Azure VMs using REST API
33
description: In this article, learn how to manage to restore operations of Azure Virtual Machine Backup using REST API.
44
ms.topic: how-to
55
ms.service: azure-backup
6-
ms.date: 04/24/2024
6+
ms.date: 01/30/2025
77
ms.assetid: b8487516-7ac5-4435-9680-674d9ecf5642
88
author: jyothisuri
99
ms.author: jsuri
1010
---
1111

1212
# Restore Azure Virtual machines using REST API
1313

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.
1515

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.
1719

1820
## Select Recovery point
1921

@@ -111,7 +113,7 @@ X-Powered-By: ASP.NET
111113
......
112114
```
113115

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.
115117

116118
## Restore operations
117119

@@ -122,15 +124,15 @@ After selecting the [relevant restore point](#select-recovery-point), proceed to
122124
> [!IMPORTANT]
123125
> 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.
124126
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).
126128

127129
```http
128130
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
129131
```
130132

131133
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).
132134

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:
134136

135137
- [Restore disks](#restore-disks)
136138
- [Replace disks](#replace-disks-in-a-backed-up-virtual-machine)
@@ -208,21 +210,21 @@ Since the restore job is a long running operation, it should be tracked as expla
208210

209211
### Restore disks
210212

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.
212214

213215
#### Create request body
214216

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:
216218

217219
|Name |Type |Description |
218220
|---------|---------|---------|
219221
|properties | [IaaSVMRestoreRequest](/rest/api/backup/restores/trigger#iaasvmrestorerequest) | RestoreRequestResourceProperties |
220222

221-
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).
222224

223225
##### Example request
224226

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:
226228

227229
```json
228230
{
@@ -266,11 +268,11 @@ If you're [selectively backing up disks](backup-azure-arm-userestapi-backupazure
266268

267269
```
268270

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.
270272

271273
### Replace disks in a backed-up virtual machine
272274

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.
274276

275277
#### Create request body
276278

@@ -446,7 +448,7 @@ The recovery point is identified with the `{name}` field in the above response.
446448

447449
### Get access token
448450

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:
450452

451453
#### Step 1:
452454

0 commit comments

Comments
 (0)