Azure Blob Storage supports a soft delete function that is particularly useful for scenarios where data needs to be retained for a certain period even after deletion. Using this feature, data protection can be enhanced, risk of accidental data loss can be mitigated, and compliance with data retention policies can be ensured.
Soft Delete Functionality
- Soft delete allows recovery of data that has been accidentally deleted or overwritten within a specified retention period.
- When soft delete is enabled on a storage account or container, blob data is not immediately removed upon deletion but is instead marked for deletion and retained for a specified period.
- During the retention period, deleted blobs can be recovered and restored to their original state.
Enabling Soft Delete
To enable soft delete, navigate to the Azure Storage Account → Select “Data managment“ → Select “Data protection“ → Enable the options: “Enable soft delete for blobs” and “Enable soft delete for containers“
- The retention value of deleted blobs/containers is specified in Days and can be customised, as needed. It determines how long deleted data will be retained before being permanently deleted.

- The duration for soft delete retention can be changed at any time.
- Any change to the retention value only applies to data deleted after the adjustment.
- Data deleted before the change remains unchanged from the retention period in effect at the time of deletion.
Managing Soft Delete Data
- Soft deleted data can be managed directly from Azure Portal.
- Other management options are also available – consult Microsoft documentation for more details.
- Soft deleted blobs can be listed, restored to their original location, or permanently deleted before their retention period expires.
- To list the deleted files, navigate to the Azure Storage Account → Select “Data storage“ → Select “Containers“ → Enable the option: “Show deleted containers”

Recommendations
- Enable soft delete on storage accounts and containers to provide an additional layer of data protection.
- Regularly review and adjust the retention period based on your organization’s data retention policies and compliance requirements.
- Soft deleted data still incurs storage costs until it is permanently deleted. Consider the cost implications of retaining soft deleted data for an extended period and adjust retention policies accordingly.
- If your Blob storage consumption is higher than expected, consider reducing the retention period to lower usage and costs.