Today you’ll learn how to enable soft deletes within your storage accounts for blobs and file shares. This means that if you delete a file accidentally, you’ll still have options to recover it. Good news! Configuring this option doesn’t require writing any code.
Just like Azure Data Factory Alerts, enabling soft deletes doesn’t require writing any code and there are PowerShell and CLI libraries available if it is required.
This becomes extremely useful when you give access to final users to a file share or access to shared blob containers and, as we all know, they sometimes accidentally delete files.
Note: The following features are currently not available for Azure Data Lake.
If you are creating a new Azure Storage Account, you can enable the soft delete option.
In the following sections, we’ll look at how to enable soft deletes if you’ve already created an account.
Table of Contents
Enable soft deletes within the data protection section. There is an option to recover deleted containers as well (not only files) that has been rolled out recently. It is currently in public preview and only available in a few select regions at this stage.
View deleted files in the storage explorer before a hard deletion.
To restore a file, you can do it easily using a no-code experience.
In the case of file shares, you can enable soft deletes at the file share level, not the file level. To enable soft deletes for your file shares, you need to enable the following option and configure the retention period.
Recover File Share
As in the blob containers, you can restore file shares.
Again, it’s a no-code experience to restore the file share.
The file share becomes available again.
We’ve seen a fantastic hidden feature within Azure Storage Accounts that helps you recover data assets that have been deleted accidentally. Fortunately, setting up soft deletion doesn’t require any coding.
During the past few years, the number of new features that Microsoft has released within storage accounts has rapidly increased. I’m looking forward to learning more about upcoming features that can help you configure your solutions.
During the next few weeks, we will explore more features and services within the Azure offering.
Please follow me on Twitter at TechTalkCorner for more articles, insights and tech talk!