This post will discuss a new preview recycle bin feature for Azure blob storage called Soft Delete.
Microsoft Azure customers are becoming more aware of the cost-effectiveness of cloud storage, especially blob storage. If they have a means, probably a web app, to upload and access files to the blob service in a storage account, then they can store huge capacities at a very low cost. A file, now referred to as a blob, can be kept in the hot tier (for frequent access), the cold tier (for infrequent access), or the archive tier (for legal/regulator retention).
Now this storage becomes important and things happen. We have the ability to convert blob storage into WORM storage but if the storage account is more interactive, then users will do things like accidentally deleting a file. Backups can be restored, but recycle bins are faster to use for these kinds of regular restores. And now, there is a preview for:
Both of these features are offered by Soft Delete and are easily configured with a simple retention window.
The following graphic, by Microsoft, illustrates a file/blob life cycle with Soft Delete enabled in the storage account.
Soft Delete is disabled by default and must be enabled in the settings of the storage account in question. You can find the Soft Delete settings under Blob Service in the storage account. Set it to Enabled and then define a retention policy of between 1 and 365 days. Click Save to complete the configuration.
Some things to note:
In my test environment, I have set up a storage account with some files kept in a blob storage container.
In the container, I can check the Show Deleted Blobs box to let me see any soft deleted blobs. I can right-click on a deleted checkpoint to either view the snapshots or to restore it.
With a click of “undelete”, the last snapshot is restored to its previous Active state. If I wanted to go back to a previous version of the blob, I can click on the more actions icon (…) for the blob to View Snapshots.
In the above example, you can see that I replaced my original version of the document which was replaced by the later upload of the edited file. I can click the More Actions icon for the snapshot that I want to work with and either download it or promote it (replace the existing active version).
Combined with the preview WORM storage option, the preview for Soft Delete is making Blob storage a very interesting place to keep valuable data. All that remains is protection for the entire storage account using Azure Backup. By the way, you can vote for that feature here.