Skip to content

Commit b9918fa

Browse files
more updates
1 parent 54cccc0 commit b9918fa

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

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

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ This article describes how to restore [blobs](blob-backup-overview.md) to any po
1919

2020
This article assumes that you have an operational blob backup configured for one or more of your storage accounts. [Learn how to configure a backup for block blob data](backup-azure-dataprotection-use-rest-api-backup-blobs.md), if not done.
2121

22-
We will refer to an existing backup vault _TestBkpVault_, under the resource group _testBkpVaultRG_, where blobs in a storage account named "msblobbackup-f2df34eb-5628-4570-87b2-0331d797c67d" in the examples.
22+
To illustrate the restoration steps in this article, we will refer to blobs in a storage account named `"msblobbackup-f2df34eb-5628-4570-87b2-0331d797c67d"` protected with an existing Backup vault `TestBkpVault`, under the resource group `testBkpVaultRG`.
2323

24-
## Restoring Azure blobs within a storage account
25-
26-
### Fetching the valid time range for restore
24+
## Fetching the valid time range for restore
2725

2826
As the operational backup for blobs is continuous, there are no distinct points to restore from. Instead, we need to fetch the valid time-range under which blobs can be restored to any point-in-time. In this example, let's check for valid time-ranges to restore within the last 30 days.
2927

@@ -39,7 +37,7 @@ For our example, this translates to
3937
POST https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/testBkpVault/backupInstances/msblobbackup-f2df34eb-5628-4570-87b2-0331d797c67d/findRestorableTimeRanges?api-version=2021-01-01
4038
```
4139

42-
#### Create the request body to fetch valid time ranges for restore
40+
### Create the request body to fetch valid time ranges for restore
4341

4442
To trigger an operation to calculate valid time ranges, following are the components of a request body
4543

@@ -49,7 +47,7 @@ To trigger an operation to calculate valid time ranges, following are the compon
4947
|startTime | String | Start time for the List Restore Ranges request. ISO 8601 format. |
5048
|endTime | String | End time for the List Restore Ranges request. ISO 8601 format. |
5149

52-
##### Example request body to fetch valid time range
50+
#### Example request body to fetch valid time range
5351

5452
The following request body defines properties required to fetch the time ranges of the continuous data which can be restored. Since blob backups reside in the storage account, the datastore is 'Operational'. You can give start and end time that helps to narrow the search process and return the available time range.
5553

@@ -105,15 +103,13 @@ X-Powered-By: ASP.NET
105103
}
106104
```
107105

108-
### Preparing the restore request
109-
110106
Once the point-in-time to restore to the same storage account is fixed, there are multiple options to restore.
111107

112-
#### Restoring all the blobs to a point-in-time
108+
## Option 1: Restore all the blobs to a point-in-time
113109

114110
Using this option restores all block blobs in the storage account by rolling them back to the selected point in time. Storage accounts containing large amounts of data or witnessing a high churn may take longer times to restore.
115111

116-
##### Constructing the request body for point-in-time restore of all blobs
112+
### Constructing the request body for point-in-time restore of all blobs
117113

118114
The key points to remember in this scenario are:
119115

@@ -146,7 +142,7 @@ The key points to remember in this scenario are:
146142
}
147143
```
148144

149-
#### Restoring few containers to a point-in-time
145+
## Option 2: Restore few containers to a point-in-time
150146

151147
Using this option allows you to select up to 10 containers to restore or restore a subset of blobs using a prefix match. You can specify up to 10 lexicographical ranges of blobs within a single container or across multiple containers to return those blobs to their previous state at a given point in time. In case of using prefixes, here are a few things to keep in mind:
152148

@@ -155,7 +151,7 @@ Using this option allows you to select up to 10 containers to restore or restore
155151

156152
[Learn more](blob-restore.md#use-prefix-match-for-restoring-blobs) about using prefixes to restore blob ranges.
157153

158-
##### Constructing the request body for point-in-time restore of selected containers or few blobs
154+
### Constructing the request body for point-in-time restore of selected containers or few blobs
159155

160156
The key points to remember in this scenario are:
161157

@@ -195,7 +191,7 @@ The key points to remember in this scenario are:
195191
}
196192
```
197193

198-
#### Validating restore requests
194+
## Validate restore requests
199195

200196
Once request body is prepared, it can be validated using the [validate for restore API](/rest/api/dataprotection/backup-instances/validate-for-restore). Like the validate for backup API, this is a *POST* operation.
201197

@@ -211,7 +207,7 @@ POST "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBk
211207

212208
The request body for this POST API is detailed [here](/rest/api/dataprotection/backup-instances/validate-for-restore#request-body). We have constructed the same in the above section for [all blobs restore](#constructing-the-request-body-for-point-in-time-restore-of-all-blobs) and [few items restore](#constructing-the-request-body-for-point-in-time-restore-of-selected-containers-or-few-blobs) scenarios. We will use the same to trigger a validate operation.
213209

214-
##### Response to validate restore requests
210+
### Response to validate restore requests
215211

216212
The validate restore request is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). It means this operation creates another operation that needs to be tracked separately.
217213

@@ -222,7 +218,7 @@ It returns two responses: 202 (Accepted) when another operation is created and t
222218
|200 OK | | Status of validate request |
223219
|202 Accepted | | Accepted |
224220

225-
###### Example response to restore validate request
221+
#### Example response to restore validate request
226222

227223
Once the *POST* operation is submitted, the initial response will be 202 Accepted along with an Azure-asyncOperation header.
228224

@@ -259,7 +255,7 @@ Track the Azure-AsyncOperation header with a simple *GET* request. When the requ
259255
}
260256
```
261257

262-
#### Triggering restore requests
258+
## Trigger restore requests
263259

264260
The triggering restore operation is a ***POST*** API. All details about the trigger restore operation are documented [here](/rest/api/dataprotection/backup-instances/trigger-restore).
265261

@@ -273,11 +269,11 @@ For our example, this translates to:
273269
POST "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/testBkpVault/backupInstances/msblobbackup-f2df34eb-5628-4570-87b2-0331d797c67d/restore?api-version=2021-01-01"
274270
```
275271

276-
##### Creating a request body for restore operations
272+
### Create a request body for restore operations
277273

278274
Once the requests are validated, the same request body can be used to trigger the restore request with minor changes.
279275

280-
###### Example request body for all blobs restore
276+
#### Example request body for all blobs restore
281277

282278
The only change from the validate restore request body is to remove the "restoreRequest" object at the start.
283279

@@ -303,7 +299,7 @@ The only change from the validate restore request body is to remove the "restore
303299
}
304300
```
305301

306-
###### Example request body for items or few blobs restore
302+
#### Example request body for items or few blobs restore
307303

308304
The only change from the validate restore request body is to remove the "restoreRequest" object at the start.
309305

@@ -336,7 +332,7 @@ The only change from the validate restore request body is to remove the "restore
336332
}
337333
```
338334

339-
#### Response to trigger restore requests
335+
### Response to trigger restore requests
340336

341337
The trigger restore request is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). It means this operation creates another operation that needs to be tracked separately.
342338

@@ -347,7 +343,7 @@ It returns two responses: 202 (Accepted) when another operation is created and t
347343
|200 OK | | Status of restore request |
348344
|202 Accepted | | Accepted |
349345

350-
##### Example response to trigger restore request
346+
#### Example response to trigger restore request
351347

352348
Once the *POST* operation is submitted, the initial response will be 202 Accepted along with an Azure-asyncOperation header.
353349

@@ -388,7 +384,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
388384
}
389385
```
390386

391-
#### Tracking jobs
387+
## Track jobs
392388

393389
The trigger restore requests triggered the restore job and the resultant Job ID should be tracking using the [GET Jobs API](/rest/api/dataprotection/jobs/get).
394390

0 commit comments

Comments
 (0)