Soft delete for Azure Storage Blobs has now been made generally available!
As of 30th May 2018 Microsoft have made the ability to soft delete Azure Storage Blobs available to the public. They have said that this feature is available in all regions for both public and private. When this feature is turned on it allows users to save and recover data where blobs and blob snapshots have been deleted. The protection of this will extend to blob data that is erased as a result of it being overwritten.
How does this feature work?
When data is deleted it will transition into a ‘soft deleted’ state rather than being removed entirely. As mentioned earlier this also applies for data being over written, if you do in fact over write data then a blob snapshot is taken to save the sate of the data before it got over written. When an object is soft deleted it will be invisible to users unless they explicitly list it. Users have the freedom to be able to configure the amount of time that soft data is recoverable before it gets permanently deleted.
Soft deletion is also completely backwards compatible; you don’t have to make any changes to your applications to take advantage of the protection that the feature offers. Microsoft have added in support for tiered blobs with soft deleted snapshots. When a Set Blob Tier is called on a blob that has soft deleted snapshots, the snapshots will remain in the original storage tier and will expire based on the retention period users have configured. However the base blob will move to the new tier.
When users create new accounts the soft delete feature is turned off by default. Soft delete is also currently off for existing storage accounts so if you would like to use this feature you will need to turn it on manually, this can be turned on and off at any time. Object-level soft deletion is also available for storage account types and all storage tiers. This feature will not however protect against container or account deletion. If you would like to learn more about how to protect storage accounts from accidental deletion then you can click this link.
To enable soft delete simply navigate to your Azure Portal then go to ‘Blob Service’ and then ‘Soft delete’, from here simply click the ‘enable’ button and enter the number of days you would like to keep soft deleted data for.