Skip to content

Commit b9e26e6

Browse files
Merge pull request #261800 from khdownie/patch-1
Update storage-files-enable-soft-delete.md
2 parents e15c437 + adae8e4 commit b9e26e6

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

articles/storage/files/storage-files-enable-soft-delete.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,43 @@ description: Learn how to enable soft delete on Azure file shares for data recov
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: how-to
7-
ms.date: 04/05/2021
7+
ms.date: 12/21/2023
88
ms.author: kendownie
99
ms.custom: devx-track-azurepowershell, devx-track-azurecli
1010
services: storage
1111
---
1212

1313
# Enable soft delete on Azure file shares
14-
Azure Files offers soft delete for file shares so that you can more easily recover your data when it's mistakenly deleted by an application or other storage account user. To learn more about soft delete, see [How to prevent accidental deletion of Azure file shares](storage-files-prevent-file-share-deletion.md).
14+
15+
Azure Files offers soft delete for SMB file shares so that you can easily recover your data when it's mistakenly deleted by an application or other storage account user. To learn more about soft delete, see [How to prevent accidental deletion of Azure file shares](storage-files-prevent-file-share-deletion.md).
1516

1617
## Applies to
18+
1719
| File share type | SMB | NFS |
1820
|-|:-:|:-:|
1921
| Standard file shares (GPv2), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
2022
| Standard file shares (GPv2), GRS/GZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
2123
| Premium file shares (FileStorage), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
2224

2325
## Prerequisites
26+
2427
- If you intend to use Azure PowerShell, [install the latest version](/powershell/azure/install-azure-powershell).
2528
- If you intend to use the Azure CLI, [install the latest version](/cli/azure/install-azure-cli).
2629

2730
## Getting started
31+
2832
The following sections show how to enable and use soft delete for Azure file shares on an existing storage account:
2933

3034
# [Portal](#tab/azure-portal)
3135

3236
1. Sign in to the [Azure portal](https://portal.azure.com).
3337
1. Navigate to your storage account and select **File shares** under **Data storage**.
34-
1. Select **Enabled** next to **Soft delete**.
38+
1. Select **Disabled** next to **Soft delete**. The **Soft delete** settings pane will appear.
3539
1. Select **Enabled** for **Soft delete for all file shares**.
36-
1. Select **File share retention period in days** and enter a number of your choosing.
40+
1. Under **File share retention period in days**, use the slider to specify a number between 1 and 365 days.
3741
1. Select **Save** to confirm your data retention settings.
3842

39-
:::image type="content" source="media/storage-how-to-recover-deleted-account/files-enable-soft-delete-new-ui.png" alt-text="Screenshot of the storage account soft delete settings pane. Highlighting the file shares soft delete section, enable toggle, set a retention period, and save. This will enable soft delete for all file shares in your storage account.":::
43+
:::image type="content" source="media/storage-how-to-recover-deleted-account/files-enable-soft-delete-new-ui.png" alt-text="Screenshot of the storage account soft delete settings pane. Highlighting the file shares soft delete section, enable toggle, set a retention period, and save. This will enable soft delete for all file shares in your storage account.":::
4044

4145
# [PowerShell](#tab/azure-powershell)
4246
To enable soft delete, you must update the settings for all Azure file shares, also known as the `FileService` properties. The following example enables soft delete for all file shares in a storage account. Remember to replace `<resource-group>` and `<storage-account>` with the appropriate values for your environment.
@@ -95,7 +99,7 @@ To restore a soft deleted file share:
9599

96100
:::image type="content" source="media/storage-how-to-recover-deleted-account/undelete-file-share.png" alt-text="If the status column, the column next to the name column, is set to Deleted, then your file share is in a soft deleted state. And will be permanently deleted after your specified retention period.":::
97101

98-
1. Select the share and select **undelete**, this will restore the share.
102+
1. Select the share and select **undelete**. This will restore the share.
99103

100104
You can confirm the share is restored since its status switches to **Active**.
101105

@@ -139,16 +143,17 @@ az storage share-rm restore -n deletedshare --deleted-version 01D64EB9886F00C4 -
139143
---
140144

141145
## Disable soft delete
146+
142147
If you wish to stop using soft delete, follow these instructions. To permanently delete a file share that has been soft deleted, you must undelete it, disable soft delete, and then delete it again.
143148

144149
# [Portal](#tab/azure-portal)
145150

146151
1. Navigate to your storage account and select **File shares** under **Data storage**.
147-
1. Select the link next to **Soft delete**.
152+
1. Select **Enabled** next to **Soft delete**. The **Soft delete** settings pane will appear.
148153
1. Select **Disabled** for **Soft delete for all file shares**.
149154
1. Select **Save** to confirm your data retention settings.
150155

151-
:::image type="content" source="media/storage-how-to-recover-deleted-account/files-disable-soft-delete.png" alt-text="Disabling soft delete will allow you to immediately and permanently delete all file shares in your storage account at your leisure.":::
156+
:::image type="content" source="media/storage-how-to-recover-deleted-account/files-disable-soft-delete.png" alt-text="Disabling soft delete will allow you to immediately and permanently delete all file shares in your storage account.":::
152157

153158
# [PowerShell](#tab/azure-powershell)
154159
You can use the following command to disable soft delete on your storage account.
@@ -173,4 +178,4 @@ az storage account file-service-properties update \
173178
---
174179

175180
## Next steps
176-
To learn about another form of data protection and recovery, see our article [Overview of share snapshots for Azure Files](storage-snapshots-files.md).
181+
To learn about another form of data protection and recovery, see [Overview of share snapshots for Azure Files](storage-snapshots-files.md).

0 commit comments

Comments
 (0)