Deleted Blobs in Azure Storage Explorer

P, John 200 Reputation points
2024-07-25T20:35:53.1666667+00:00

I run the Azure Storage Explorer's Folder statistics on one of my container, and get the following result:

Finished calculating statistics for 'devtest/xxx/'. Completed 7/25/24, 12:08 PM.

Active blobs: 415,386 blobs, 48.85 GiB (52,450,011,606 bytes).

Snapshots: 0 blobs, 0 B (0 bytes).

Deleted blobs: 209,282 blobs, 98.69 GiB (105,967,108,214 bytes, does not include blobs in deleted folders).

Total: 624,668 items, 147.54 GiB (158,417,119,820 bytes).

I configure the lifecycle management to be 30 days and soft delete retention to 7 days. The questions are:

  1. I have 48.85GiB data in Active blobs, Is this the data for the last 30 days? or last 37 (active + soft deleted)?
  2. In the meantime, I had 98.69GiB data in Deleted Blobs, are these permanently deleted data or soft deleted data (for 7 days) or both?
  3. I had total of 147.54 GiB data, will Azure charge me based on this total amount of data, or just the amount of data in active blobs?
  4. what is the Snapshots?
Azure Storage Explorer
Azure Storage Explorer
An Azure tool that is used to manage cloud storage resources on Windows, macOS, and Linux.
252 questions
{count} votes

Accepted answer
  1. Nehruji R 7,306 Reputation points Microsoft Vendor
    2024-07-26T06:14:13.59+00:00

    Hello P, John,

    Greetings! Welcome to Microsoft Q&A Platform.

    If the soft delete was enabled during the time when the deletion was performed, then the blobs will go into soft deleted state and will remain in that state until their retention period expires. If not, an you enabled it to post the deletion, then it will not have any effect on the blobs deleted.

    The same is with versioning, if you have enabled versioning then the deleted blobs become the older version and then have to be removed. If not enabled then even this will not be affecting the same.

    Lastly, considering this is a bulk deletion, it might take some time for garbage collection to happen at the backend. Post that the capacity aggregation will take place and you shall then see the actual capacity.

    Did you try the azure power shell commands mentioned in the below article?

    https://video2.skills-academy.com/en-us/powershell/module/az.storage/get-AzStorageblob?view=azps-5.9.0

    Get-AzStorageContainer -Name container* | Get-AzStorageBlob -IncludeDeleted

    You can also use az cli command https://video2.skills-academy.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az_storage_blob_list

    az storage blob list -c mycontainer --prefix foo --include deleted

    Note: Use --include v instead of d If versioning is enabled for the blobs to see previous version/deleted blobs.

    refer - https://video2.skills-academy.com/en-us/azure/storage/blobs/blob-containers-cli

    Customize the above commands accordingly to list only deleted ones and verify where the delated blob present.

    To permanently delete soft-deleted blobs in your Azure Storage account and free up capacity, you have a few options:

    1.Using Azure CLI: If you have permanent delete enabled for your storage account, you can use the deletetype=permanent query parameter to permanently delete a soft-deleted snapshot or deleted blob version.

    Here’s an example of how to do it using Azure CLI:

    az storage blob delete --container-name <container-name> --name <blob-name> --deletetype permanent

    Replace <container-name> with the actual container name and <blob-name> with the blob you want to permanently delete

    2.PowerShell Script:You can use the PowerShell script provided in the Microsoft Community Hub to permanently delete soft-deleted objects.

    The script allows you to specify parameters such as container name, blob prefix, tier, and last modified date. It’s essential to understand the script’s limitations and permissions before running it.

    refer - https://techcommunity.microsoft.com/t5/azure-paas-blog/azure-storage-permanent-delete-soft-deleted-objects/ba-p/3600967

    Disable soft delete feature on your storage account before running the script. Otherwise, the soft-deleted snapshots remain in a soft-deleted state.

    After running the script, you can re-enable the Soft Delete feature if needed.

    Active Blobs Data:

    The 48.85 GiB of data in Active blobs represents the data that has been active for the last 30 days. This does not include the soft-deleted data.

    Deleted Blobs Data:

    The 98.69 GiB of data in Deleted Blobs refers to the data that has been soft-deleted and is retained for 7 days. After the 7-day retention period, this data will be permanently deleted.

    Total Data for Billing:

    Azure charges you based on the total amount of data stored, which includes both active and soft-deleted data. So, in your case, you will be charged for the total of 147.54 GiB (48.85 GiB active + 98.69 GiB soft-deleted) until the soft-deleted data is permanently deleted.

    Snapshots:

    Snapshots are read-only versions of a blob that capture the blob’s state at a specific point in time. They are useful for backup and recovery purposes. Snapshots are billed as separate data, so they can also contribute to your storage costs.

    references- https://video2.skills-academy.com/en-us/azure/storage/blobs/lifecycle-management-policy-configure?tabs=azure-portal,https://video2.skills-academy.com/en-us/azure/storage/blobs/soft-delete-blob-enable?tabs=azure-portal,https://video2.skills-academy.com/en-us/azure/storage/blobs/soft-delete-blob-overview,https://video2.skills-academy.com/en-us/azure/storage/blobs/soft-delete-container-overview

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.