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-afs-powershell.md
+57-4Lines changed: 57 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,15 @@ ms.date: 1/27/2020
7
7
8
8
# Restore Azure Files with PowerShell
9
9
10
-
This article explains how to restore an entire file share, or specific files, from a restore point created by the [Azure Backup](backup-overview.md) service using Azure Powershell.
10
+
This article explains how to restore an entire file share, or specific files, from a restore point created by the [Azure Backup](backup-overview.md) service using Azure PowerShell.
11
11
12
12
You can restore an entire file share or specific files on the share. You can restore to the original location, or to an alternate location.
13
13
14
14
> [!WARNING]
15
-
> Make sure the PS version is upgraded to the minimum version for 'Az.RecoveryServices 2.6.0' for AFS backups. For more details, refer to [the section](backup-azure-afs-automation.md#important-notice---backup-item-identification-for-afs-backups) outlining the requirement for this change.
15
+
> Make sure the PS version is upgraded to the minimum version for 'Az.RecoveryServices 2.6.0' for AFS backups. For more information, see [the section](backup-azure-afs-automation.md#important-notice---backup-item-identification-for-afs-backups) outlining the requirement for this change.
16
+
17
+
>[!NOTE]
18
+
>Azure Backup now supports restoring multiple files or folders to the original or alternate Location using PowerShell. Refer to [this section](#restore-multiple-files-or-folders-to-original-or-alternate-location) the document to learn how.
16
19
17
20
## Fetch recovery points
18
21
@@ -97,18 +100,68 @@ This command returns a job with an ID to be tracked, as shown in the previous se
97
100
98
101
When you restore to an original location, you don't need to specify destination- and target-related parameters. Only **ResolveConflict** must be provided.
## Restore multiple files or folders to original or alternate location
116
+
117
+
Use the [Restore-AzRecoveryServicesBackupItem](https://docs.microsoft.com/powershell/module/az.recoveryservices/restore-azrecoveryservicesbackupitem?view=azps-1.4.0) command by passing the path of all files or folders you want to restore as a value for the **MultipleSourceFilePath** parameter.
118
+
119
+
### Restore multiple files
120
+
121
+
In the following script, we're trying to restore the *FileSharePage.png* and *MyTestFile.txt* files.
azurefiles Restore InProgress 4/5/2020 8:01:24 AM cd36abc3-0242-44b1-9964-0a9102b74d57
161
+
```
162
+
163
+
If you want to restore multiple files or folders to alternate location, use the scripts above by specifying the target location-related parameter values, as explained above in [Restore an Azure file to an alternate location](#restore-an-azure-file-to-an-alternate-location).
164
+
112
165
## Next steps
113
166
114
167
[Learn about](restore-afs.md) restoring Azure Files in the Azure portal.
0 commit comments