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
description: Learn about soft delete for Azure file shares and how you can use it to for data recovery and preventing accidental deletion.
2
+
title: Prevent accidental deletion of Azure file shares
3
+
description: Learn about soft delete for Azure Files and how you can use it for data recovery and preventing accidental deletion of SMB file shares.
4
4
author: khdownie
5
5
ms.service: azure-file-storage
6
6
ms.topic: conceptual
7
-
ms.date: 03/29/2021
7
+
ms.date: 05/08/2024
8
8
ms.author: kendownie
9
9
services: storage
10
10
---
11
11
12
-
# Prevent accidental deletion of Azure file shares
13
-
Azure Files offers soft delete for SMB file shares. Soft delete allows you to recover your file share when it is mistakenly deleted by an application or other storage account user.
12
+
# Use soft delete to prevent accidental deletion of Azure file shares
13
+
14
+
Azure Files offers soft delete for SMB file shares. Soft delete allows you to recover your file share when it's mistakenly deleted by an application or other storage account user.
14
15
15
16
## Applies to
17
+
16
18
| File share type | SMB | NFS |
17
19
|-|:-:|:-:|
18
20
| Standard file shares (GPv2), LRS/ZRS |||
19
21
| Standard file shares (GPv2), GRS/GZRS |||
When soft delete for Azure file shares is enabled on a storage account, if a file share is deleted, it transitions to a soft deleted state instead of being permanently erased. You can configure the amount of time soft deleted data is recoverable before it's permanently deleted, and undelete the share anytime during this retention period. After being undeleted, the share and all of contents, including snapshots, will be restored to the state it was in prior to deletion. Soft delete only works on a file share level - individual files that are deleted will still be permanently erased.
25
+
26
+
When soft delete for Azure file shares is enabled on a storage account, if a file share is deleted, it transitions to a soft deleted state instead of being permanently erased. You can configure the amount of time soft deleted data is recoverable before it's permanently deleted, and undelete the share anytime during this retention period. After being undeleted, the share and all of contents, including snapshots, will be restored to the state it was in prior to deletion. Soft delete only works on a file share level. Individual files that are deleted will still be permanently erased.
24
27
25
28
Soft delete can be enabled on either new or existing file shares. Soft delete is also backwards compatible, so you don't have to make any changes to your applications to take advantage of the protections of soft delete. Soft delete doesn't work for NFS shares, even if it's enabled for the storage account.
26
29
@@ -32,19 +35,19 @@ For soft-deleted premium file shares, the file share quota (the provisioned size
32
35
33
36
### Enabling or disabling soft delete
34
37
35
-
Soft delete for file shares is enabled at the storage account level, because of this, the soft delete settings apply to all file shares within a storage account. Soft delete is enabled by default for new storage accounts and can be disabled or enabled at any time. Soft delete is not automatically enabled for existing storage accounts unless [Azure file share backup](../../backup/azure-file-share-backup-overview.md)was configured for a Azure file share in that storage account. If Azure file share backup was configured, then soft delete for Azure file shares are automatically enabled on that share's storage account.
38
+
Soft delete for file shares is enabled at the storage account level. Because of this, the soft delete settings apply to all file shares within a storage account. Soft delete is enabled by default for new storage accounts and can be disabled or enabled at any time. Soft delete isn't automatically enabled for existing storage accounts unless [Azure file share backup](../../backup/azure-file-share-backup-overview.md)is configured for a Azure file share in that storage account. If Azure file share backup is configured, then soft delete for Azure file shares are automatically enabled on that share's storage account.
36
39
37
-
If you enable soft delete for file shares, delete some file shares, and then disable soft delete, if the shares were saved in that period you can still access and recover those file shares. When you enable soft delete, you also need to configure the retention period.
40
+
If you delete some file shares with soft delete enabled and then disable soft delete, you can still access and recover those file shares as long as they were saved during the period when soft delete was enabled.
38
41
39
42
### Retention period
40
43
41
-
The retention period is the amount of time that soft deleted file shares are stored and available for recovery. For file shares that are explicitly deleted, the retention period clock starts when the data is deleted. Currently you can specify a retention period between 1 and 365 days. You can change the soft delete retention period at any time. An updated retention period will only apply to shares deleted after the retention period has been updated. Shares deleted before the retention period update will expire based on the retention period that was configured when that data was deleted.
44
+
When you enable soft delete, you also need to configure the retention period. The retention period is the amount of time that soft deleted file shares are stored and available for recovery. For file shares that are explicitly deleted, the retention period clock starts when the data is deleted. You can specify a retention period between 1 and 365 days. You can change the soft delete retention period at any time. An updated retention period will only apply to shares deleted after the retention period has been updated. Shares deleted before the retention period update will expire based on the retention period that was configured when that data was deleted.
42
45
43
46
## Pricing and billing
44
47
45
-
Both standard and premium file shares are billed on the used capacity when soft deleted, rather than provisioned capacity. Additionally, premium file shares are billed at the snapshot rate while in the soft delete state. Standard file shares are billed at the regular rate while in the soft delete state. You won't be charged for data that is permanently deleted after the configured retention period.
48
+
Both standard and premium file shares are billed on the used capacity when soft deleted, rather than provisioned capacity. Additionally, premium file shares are billed at the snapshot rate while in the soft delete state. Standard file shares are billed at the regular rate while in the soft delete state. You won't be charged for data that's permanently deleted after the configured retention period.
46
49
47
-
For more information on prices for Azure Files in general, see the [Azure Files Pricing Page](https://azure.microsoft.com/pricing/details/storage/files/).
50
+
For more information on prices for Azure Files, see the [Azure Files Pricing Page](https://azure.microsoft.com/pricing/details/storage/files/).
48
51
49
52
When you initially enable soft delete, we recommend using a small retention period to better understand how the feature affects your bill.
50
53
@@ -54,4 +57,4 @@ To learn how to enable and use soft delete, continue to [Enable soft delete](sto
54
57
55
58
To learn how to prevent a storage account from being deleted or modified, see [Apply an Azure Resource Manager lock to a storage account](../common/lock-account-resource.md).
56
59
57
-
To learn how to apply locks to resources and resource groups, see [Lock resources to prevent unexpected changes](../../azure-resource-manager/management/lock-resources.md).
60
+
To learn how to apply locks to resources and resource groups, see [Lock resources to prevent unexpected changes](../../azure-resource-manager/management/lock-resources.md).
0 commit comments