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/restore-azure-file-share-rest-api.md
+19-25Lines changed: 19 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,19 @@
1
1
---
2
-
title: Restore Azure file shares with REST API
3
-
description: Learn how to use REST API to restore Azure file shares or specific files from a restore point created by Azure Backup
2
+
title: Restore Azure Files with REST API
3
+
description: Learn how to use REST API to restore Azure Files or specific files from a restore point created by Azure Backup
4
4
ms.topic: how-to
5
-
ms.date: 02/09/2025
5
+
ms.date: 03/05/2025
6
6
author: jyothisuri
7
7
ms.author: jsuri
8
8
---
9
9
10
-
# Restore Azure File Shares using REST API
10
+
# Restore Azure Files using REST API
11
11
12
-
This article explains how to restore an entire file share or specific files from a restore point created by [Azure Backup](./backup-overview.md) by using the REST API.
13
-
14
-
By the end of this article, you learn how to perform the following operations using REST API:
15
-
16
-
* View restore points for a backed-up Azure file share.
17
-
* Restore a full Azure file share.
18
-
* Restore individual files or folders.
12
+
This article explains how to restore an entire File Share or specific files from a restore point created by [Azure Backup](./backup-overview.md) by using the REST API.
19
13
20
14
## Prerequisites
21
15
22
-
We assume that you already have a backed-up file share you want to restore. If you don’t, check [Backup Azure file share using REST API](backup-azure-file-share-rest-api.md) to learn how to create one.
16
+
We assume that you already have a backed-up File Share you want to restore. If you don’t, check [Backup Azure Files using REST API](backup-azure-file-share-rest-api.md) to learn how to create one.
23
17
24
18
For this article, we use the following resources:
25
19
@@ -30,7 +24,7 @@ For this article, we use the following resources:
30
24
31
25
## Fetch ContainerName and ProtectedItemName
32
26
33
-
For most of the restore related API calls, you need to pass values for the {containerName} and {protectedItemName} URI parameters. Use the ID attribute in the response body of the [GET backupprotectableitems](/rest/api/backup/protected-items/get) operation to retrieve values for these parameters. In our example, the ID of the file share we want to protect is:
27
+
For most of the restore related API calls, you need to pass values for the {containerName} and {protectedItemName} URI parameters. Use the ID attribute in the response body of the [GET backupprotectableitems](/rest/api/backup/protected-items/get) operation to retrieve values for these parameters. In our example, the ID of the File Share we want to protect is:
## Fetch recovery points for backed up Azure file share
36
+
## Fetch recovery points for backed up Azure Files
43
37
44
-
To restore any backed-up file share or files, first select a recovery point to perform the restore operation. The available recovery points of a backed-up item can be listed using the [Recovery Point-List](/rest/api/site-recovery/recoverypoints/listbyreplicationprotecteditems) REST API call. It's a GET operation with all the relevant values.
38
+
To restore any backed-up File Share or files, first select a recovery point to perform the restore operation. The available recovery points of a backed-up item can be listed using the [Recovery Point-List](/rest/api/site-recovery/recoverypoints/listbyreplicationprotecteditems) REST API call. It's a GET operation with all the relevant values.
45
39
46
40
```http
47
41
GET https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints?api-version=2019-05-13&$filter={$filter}
@@ -140,7 +134,7 @@ The recovery point is identified with the {name} field in the response above.
140
134
141
135
## Full share recovery using REST API
142
136
143
-
Use this restore option to restore the complete file share in the original or an alternate location.
137
+
Use this restore option to restore the complete File Share in the original or an alternate location.
144
138
Triggering restore is a POST request and you can perform this operation using the [trigger restore](/rest/api/backup/restores/trigger) REST API.
145
139
146
140
```http
@@ -155,7 +149,7 @@ POST https://management.azure.com/Subscriptions/ef4ab5a7-c2c0-4304-af80-af49f48a
155
149
156
150
### Create request body
157
151
158
-
To trigger a restore for an Azure file share, the following are the components of the request body:
152
+
To trigger a restore for an Azure Files, the following are the components of the request body:
159
153
160
154
Name | Type | Description
161
155
--- | ---- | ----
@@ -167,7 +161,7 @@ For the complete list of definitions of the request body and other details, refe
167
161
168
162
#### Request body example for restore to original location
169
163
170
-
The following request body defines properties required to trigger an Azure file share restore:
164
+
The following request body defines properties required to trigger an Azure Files restore:
171
165
172
166
```json
173
167
{
@@ -186,12 +180,12 @@ The following request body defines properties required to trigger an Azure file
186
180
Specify the following parameters for alternate location recovery:
187
181
188
182
***targetResourceId**: The storage account to which the backed-up content is restored. The target storage account must be in the same location as the vault.
189
-
***name**: The file share within the target storage account to which the backed-up content is restored.
190
-
***targetFolderPath**: The folder under the file share to which data is restored.
183
+
***name**: The File Share within the target storage account to which the backed-up content is restored.
184
+
***targetFolderPath**: The folder under the File Share to which data is restored.
191
185
192
186
#### Request body example for restore to alternate location
193
187
194
-
The following request body restores the *azurefiles*file share in the *afsaccount* storage account to the *azurefiles1*file share in the *afaccount1* storage account.
188
+
The following request body restores the *azurefiles*File Share in the *afsaccount* storage account to the *azurefiles1*File Share in the *afaccount1* storage account.
195
189
196
190
```json
197
191
{
@@ -365,7 +359,7 @@ POST https://management.azure.com/Subscriptions/ef4ab5a7-c2c0-4304-af80-af49f48a
365
359
366
360
### Create request body for item-level recovery using REST API
367
361
368
-
To trigger a restore for an Azure file share, the following are the components of the request body:
362
+
To trigger a restore for an Azure Files, the following are the components of the request body:
369
363
370
364
Name | Type | Description
371
365
--- | ---- | ----
@@ -375,7 +369,7 @@ For the complete list of definitions of the request body and other details, refe
375
369
376
370
### Restore to original location for item-level recovery using REST API
377
371
378
-
The following request body is to restore the *Restoretest.txt* file in the *azurefiles*file share in the *afsaccount* storage account.
372
+
The following request body is to restore the *Restoretest.txt* file in the *azurefiles*File Share in the *afsaccount* storage account.
379
373
380
374
Create Request Body
381
375
@@ -401,7 +395,7 @@ Create Request Body
401
395
402
396
### Restore to alternate location for item-level recovery using REST API
403
397
404
-
The following request body is to restore the *Restoretest.txt* file in the *azurefiles*file share in the *afsaccount* storage account to the *restoredata* folder of the *azurefiles1*file share in the *afaccount1* storage account.
398
+
The following request body is to restore the *Restoretest.txt* file in the *azurefiles*File Share in the *afsaccount* storage account to the *restoredata* folder of the *azurefiles1*File Share in the *afaccount1* storage account.
405
399
406
400
Create request body
407
401
@@ -432,4 +426,4 @@ The response should be handled in the same way as explained above for [full shar
432
426
433
427
## Next steps
434
428
435
-
* Learn how to [manage Azure file shares backup using REST API](manage-azure-file-share-rest-api.md).
429
+
* Learn how to [manage Azure Files backup using REST API](manage-azure-file-share-rest-api.md).
0 commit comments