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-cli.md
+32-7Lines changed: 32 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,16 @@ By the end of this article, you'll learn how to perform the following operations
15
15
* Restore a full Azure file share.
16
16
* Restore individual files or folders.
17
17
18
+
>[!NOTE]
19
+
> Azure Backup now supports restoring multiple files or folders to the original or an alternate location using Azure CLI. Refer to the [Restore multiple files or folders to original or alternate location](#restore-multiple-files-or-folders-to-original-or-alternate-location) section of this document to learn more.
To install and use the CLI locally, you must run Azure CLI version 2.0.18 or later. To find the CLI version, run `az --version`. If you need to install or upgrade, see [Install the Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest).
21
24
22
25
## Prerequisites
23
26
24
-
This article assumes that you already have an Azure file share that's backed up by Azure Backup. If you don’t have one, see [Back up Azure file shares with the CLI](backup-afs-cli.md) to configure backup for your file share. For this article, you use the following resources:
27
+
This article assumes that you already have an Azure file share that's backed up by Azure Backup. If you don't have one, see [Back up Azure file shares with the CLI](backup-afs-cli.md) to configure backup for your file share. For this article, you use the following resources:
@@ -37,7 +40,7 @@ Use the [az backup recoverypoint list](https://docs.microsoft.com/cli/azure/back
37
40
The following example fetches the list of recovery points for the *azurefiles* file share in the *afsaccount* storage account.
38
41
39
42
```azurecli-interactive
40
-
az backup recoverypoint list --vault-name azurefilesvault --resource-group azurefiles --container-name "StorageContainer;Storage;AzureFiles;afsaccount” --backup-management-type azurestorage --item-name “AzureFileShare;azurefiles” --workload-type azurefileshare --out table
43
+
az backup recoverypoint list --vault-name azurefilesvault --resource-group azurefiles --container-name "StorageContainer;Storage;AzureFiles;afsaccount" --backup-management-type azurestorage --item-name "AzureFileShare;azurefiles" --workload-type azurefileshare --out table
41
44
```
42
45
43
46
You can also run the previous cmdlet by using the friendly name for the container and the item by providing the following two additional parameters:
@@ -77,7 +80,7 @@ When you restore to an original location, you don't need to specify target-relat
77
80
The following example uses the [az backup restore restore-azurefileshare](https://docs.microsoft.com/cli/azure/backup/restore?view=azure-cli-latest#az-backup-restore-restore-azurefileshare) cmdlet with restore mode set to *originallocation* to restore the *azurefiles* file share in the original location. You use the recovery point 932883129628959823, which you obtained in [Fetch recovery points for the Azure file share](#fetch-recovery-points-for-the-azure-file-share):
@@ -97,10 +100,10 @@ You can use this option to restore a file share to an alternate location and kee
97
100
***--target-folder**: The folder under the file share to which data is restored. If the backed-up content is to be restored to a root folder, give the target folder values as an empty string.
98
101
***--resolve-conflict**: Instruction if there's a conflict with the restored data. Accepts **Overwrite** or **Skip**.
99
102
100
-
The following example uses [az backup restore restore-azurefileshare](https://docs.microsoft.com/cli/azure/backup/restore?view=azure-cli-latest#az-backup-restore-restore-azurefileshare) with restore mode as *alternatelocation* to restore the *azurefiles* file share in the *afsaccount* storage account to the *azurefiles1”* file share in the *afaccount1* storage account.
103
+
The following example uses [az backup restore restore-azurefileshare](https://docs.microsoft.com/cli/azure/backup/restore?view=azure-cli-latest#az-backup-restore-restore-azurefileshare) with restore mode as *alternatelocation* to restore the *azurefiles* file share in the *afsaccount* storage account to the *azurefiles1"* file share in the *afaccount1* storage account.
@@ -155,7 +158,7 @@ To restore specific files or folders to an alternate location, use the [az backu
155
158
The following example restores the *RestoreTest.txt* file originally present in the *azurefiles* file share to an alternate location: the *restoredata* folder in the *azurefiles1* file share hosted in the *afaccount1* storage account.
The **Name** attribute in the output corresponds to the name of the job that's created by the backup service for your restore operation. To track the status of the job, use the [az backup job show](https://docs.microsoft.com/cli/azure/backup/job?view=azure-cli-latest#az-backup-job-show) cmdlet.
168
171
172
+
## Restore multiple files or folders to original or alternate location
173
+
174
+
To perform restore for multiple items, pass the value for the **source-file-path** parameter as **space separated** paths of all files or folders you want to restore.
175
+
176
+
The following example restores the *Restore.txt* and *AFS testing Report.docx* files in their original location.
The **Name** attribute in the output corresponds to the name of the job that's created by the backup service for your restore operation. To track the status of the job, use the [az backup job show](https://docs.microsoft.com/cli/azure/backup/job?view=azure-cli-latest#az-backup-job-show) cmdlet.
191
+
192
+
If you want to restore multiple items to an alternate location, use the command above by specifying target-related parameters as explained in the [Restore individual files or folders to an alternate location](#restore-individual-files-or-folders-to-an-alternate-location) section.
193
+
169
194
## Next steps
170
195
171
196
Learn how to [Manage Azure file share backups with the Azure CLI](manage-afs-backup-cli.md).
Copy file name to clipboardExpand all lines: articles/backup/restore-afs-powershell.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ You can restore an entire file share or specific files on the share. You can res
15
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
16
17
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.
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)of the document to learn how.
0 commit comments