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
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).
15
16
16
17
## Applies to
18
+
17
19
| File share type | SMB | NFS |
18
20
|-|:-:|:-:|
19
21
| Standard file shares (GPv2), LRS/ZRS |||
20
22
| Standard file shares (GPv2), GRS/GZRS |||
- If you intend to use Azure PowerShell, [install the latest version](/powershell/azure/install-azure-powershell).
25
28
- If you intend to use the Azure CLI, [install the latest version](/cli/azure/install-azure-cli).
26
29
27
30
## Getting started
31
+
28
32
The following sections show how to enable and use soft delete for Azure file shares on an existing storage account:
29
33
30
34
# [Portal](#tab/azure-portal)
31
35
32
36
1. Sign in to the [Azure portal](https://portal.azure.com).
33
37
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.
35
39
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.
37
41
1. Select **Save** to confirm your data retention settings.
38
42
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.":::
40
44
41
45
# [PowerShell](#tab/azure-powershell)
42
46
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:
95
99
96
100
:::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.":::
97
101
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.
99
103
100
104
You can confirm the share is restored since its status switches to **Active**.
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.
143
148
144
149
# [Portal](#tab/azure-portal)
145
150
146
151
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.
148
153
1. Select **Disabled** for **Soft delete for all file shares**.
149
154
1. Select **Save** to confirm your data retention settings.
150
155
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.":::
152
157
153
158
# [PowerShell](#tab/azure-powershell)
154
159
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 \
173
178
---
174
179
175
180
## 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