Blob soft delete is a crucial feature that protects your data from accidental deletions or overwrites. By preserving deleted data for a defined period, it helps maintain data integrity and availability, even in cases of human error. However, restoring soft-deleted data can be time-consuming, as each deleted blob must be individually restored using the undelete API. At present, there is no option to bulk restore all soft-deleted blobs.
In this blog, we present a no-code solution for efficiently restoring soft-deleted data using Azure Storage tasks. This approach is especially useful when dealing with a large number of blobs, eliminating the need for custom scripts. Additionally, it allows you to apply multiple filters to restore only the necessary blobs.
Note: This feature is currently in preview and may not be available in all regions.
Azure Storage Actions offer a more efficient solution for recovering soft-deleted blobs. Below are the steps to use this feature effectively:
- Search for Azure Storage Actions in the Azure Portal
- On the left menu select Storage Tasks
- Click on + Create
- Select the subscription where the impacted Storage Account is located
- Select or create a resource group
- Enter a Storage task name
- Select the same region as the impacted Storage Account
- Click on Next > to continue
- Using the Visual builder in the If section:
- Set the Blob property to Deleted
- Set the Property value to True
- In the Then section, set the Operation to Undelete blob
- Click Next > to continue
- In the Assignments tab, click + Add Assignment
- In the Add Assignment blade:
- Select the Subscription where the impacted Storage Account is located
- Select the impacted Storage Account
- Provide an assignment name
- Select the role to be Storage Blob Data Owner or any role that grants full access to Blobs and tags. NOTE: Full access to Blobs only will throw 403!
- If filtering the blobs to recover, select Blob prefix and enter a prefix that starts from the container name onwards. Otherwise, select Do not filter.
- Select Single run (only once) as the Run frequency
- Select or create a container for the Report export container
- Click Add to finish the assignment creation.
- Back in the Assignments tab, click Next > to continue
- Add tags if needed. Click Next > continue.
- Click Review + create to create the Storage Task.
- This will redirect to the Deployment blade. Wait for deployment to be completed.
- Click on Go to resource to navigate to the Storage Action overview.
- In the left menu, click on Assignments
- Select the assignment that was created and click on Enable to begin recovering blobs
- Once the task runs and completes, the blobs should have been undeleted according to the filters chosen.
You can also access execution reports for the storage task, which provide detailed insights into the operation performed on each targeted object. For more information on execution reports, refer to the following documentation: Analyze storage task runs - Azure Storage Actions Preview | Microsoft Learn
Conclusion
The Azure Storage Actions feature provides a more efficient and streamlined method for recovering large numbers of soft-deleted blobs. By leveraging this tool, You can save time and reduce the complexity associated with traditional recovery methods. As this feature continues to evolve, it is expected to become an essential part of data recovery operations in Azure.
Updated Mar 27, 2025
Version 1.0hqaffesha
Microsoft
Joined March 07, 2023
Azure PaaS Blog
Follow this blog board to get notified when there's new activity