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/backup-afs-cli.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
1
---
2
-
title: Back up Azure file shares with Azure CLI
3
-
description: Learn how to use Azure CLI to back up Azure file shares in the Recovery Services vault
2
+
title: Back up Azure Files with Azure CLI
3
+
description: Learn how to use Azure CLI to back up Azure Files in the Recovery Services vault
4
4
ms.topic: how-to
5
5
ms.custom: devx-track-azurecli, engagement-fy24
6
-
ms.date: 03/20/2024
6
+
ms.date: 03/05/2025
7
7
author: jyothisuri
8
8
ms.author: jsuri
9
9
---
10
10
11
-
# Back up Azure file shares with Azure CLI
11
+
# Back up Azure Files with Azure CLI
12
12
13
-
The Azure CLI provides a command-line experience for managing Azure resources. It's a great tool for building custom automation to use Azure resources. This article details how to back up Azure file shares with Azure CLI. You can also perform these steps via [Azure PowerShell](./backup-azure-afs-automation.md) or the [Azure portal](backup-afs.md).
13
+
The Azure CLI provides a command-line experience for managing Azure resources. It's a great tool for building custom automation to use Azure resources. This article details how to back up Azure Files with Azure CLI. You can also perform these steps via [Azure PowerShell](./backup-azure-afs-automation.md) or the [Azure portal](backup-afs.md).
14
14
15
15
By the end of this tutorial, you'll learn how to perform the operations below with Azure CLI:
@@ -54,13 +54,13 @@ Follow these steps to create a Recovery Services vault:
54
54
eastus azurefilesvault azurefiles
55
55
```
56
56
57
-
## Enable backup for Azure file shares
57
+
## Enable backup for Azure Files
58
58
59
-
This section assumes that you already have an Azure file share for which you want to configure backup. If you don't have one, create an Azure file share using the [az storage share create](/cli/azure/storage/share#az-storage-share-create) command.
59
+
This section assumes that you already have an Azure Files for which you want to configure backup. If you don't have one, create an Azure Files using the [az storage share create](/cli/azure/storage/share#az-storage-share-create) command.
60
60
61
-
To enable backup for file shares, you need to create a protection policy that defines when a backup job runs and how long recovery points are stored. You can create a backup policy using the [az backup policy create](/cli/azure/backup/policy#az-backup-policy-create) cmdlet.
61
+
To enable backup for File Shares, you need to create a protection policy that defines when a backup job runs and how long recovery points are stored. You can create a backup policy using the [az backup policy create](/cli/azure/backup/policy#az-backup-policy-create) cmdlet.
62
62
63
-
The following example uses the [az backup protection enable-for-azurefileshare](/cli/azure/backup/protection#az-backup-protection-enable-for-azurefileshare) cmdlet to enable backup for the *azurefiles* file share in the *afsaccount* storage account using the *schedule 1* backup policy:
63
+
The following example uses the [az backup protection enable-for-azurefileshare](/cli/azure/backup/protection#az-backup-protection-enable-for-azurefileshare) cmdlet to enable backup for the *azurefiles* File Share in the *afsaccount* storage account using the *schedule 1* backup policy:
The **Name** attribute in the output corresponds to the name of the job that's created by the backup service for your **enable backup** operation. To track status of the job, use the [az backup job show](/cli/azure/backup/job#az-backup-job-show) cmdlet.
76
76
77
-
## Trigger an on-demand backup for file share
77
+
## Trigger an on-demand backup for File Share
78
78
79
-
If you want to trigger an on-demand backup for your file share instead of waiting for the backup policy to run the job at the scheduled time, use the [az backup protection backup-now](/cli/azure/backup/protection#az-backup-protection-backup-now) cmdlet.
79
+
If you want to trigger an on-demand backup for your File Share instead of waiting for the backup policy to run the job at the scheduled time, use the [az backup protection backup-now](/cli/azure/backup/protection#az-backup-protection-backup-now) cmdlet.
80
80
81
81
You need to define the following parameters to trigger an on-demand backup:
82
82
83
-
***--container-name** is the name of the storage account hosting the file share. To retrieve the **name** or **friendly name** of your container, use the [az backup container list](/cli/azure/backup/container#az-backup-container-list) command.
84
-
***--item-name** is the name of the file share for which you want to trigger an on-demand backup. To retrieve the **name** or **friendly name** of your backed-up item, use the [az backup item list](/cli/azure/backup/item#az-backup-item-list) command.
83
+
***--container-name** is the name of the storage account hosting the File Share. To retrieve the **name** or **friendly name** of your container, use the [az backup container list](/cli/azure/backup/container#az-backup-container-list) command.
84
+
***--item-name** is the name of the File Share for which you want to trigger an on-demand backup. To retrieve the **name** or **friendly name** of your backed-up item, use the [az backup item list](/cli/azure/backup/item#az-backup-item-list) command.
85
85
***--retain-until** specifies the date until when you want to retain the recovery point. The value should be set in UTC time format (dd-mm-yyyy).
86
86
87
87
The following example triggers an on-demand backup for the *azurefiles* fileshare in the *afsaccount* storage account with retention until *20-01-2020*.
@@ -100,5 +100,5 @@ The **Name** attribute in the output corresponds to the name of the job that's c
100
100
101
101
## Next steps
102
102
103
-
* Learn how to [Restore Azure file shares with CLI](restore-afs-cli.md)
104
-
* Learn how to [Manage Azure file share backups with CLI](manage-afs-backup-cli.md)
103
+
* Learn how to [Restore Azure Files with CLI](restore-afs-cli.md)
104
+
* Learn how to [Manage Azure Files backups with CLI](manage-afs-backup-cli.md)
0 commit comments