How to delete blob with versioning enabled?

daiin9 106 Reputation points
2022-03-11T09:11:41.703+00:00

Hello,
I have very strange behaviour with blob files on Azure storage. Mind you I have soft delete enabled(7 days) and versioning enabled.
I am using a blobfuse connection to my machine.
When i try to delete a blob with no version, be it with rm -rf from VM or from portal. The blob is listed as deleted but not put in the 7 days deletion process. I have to manually go into versions and delete the version the blob somehow created when i deleted it and only then the blob goes into the deletion process and i get the Days until permanent deletion line. Is there anyway i can delete(put into deletion process) a blob without having to manually remove all of it's version first?

Regards.

Azure Storage Explorer
Azure Storage Explorer
An Azure tool that is used to manage cloud storage resources on Windows, macOS, and Linux.
259 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,843 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 37,081 Reputation points Microsoft Employee
    2022-03-11T21:25:52.437+00:00

    @AleksandarKovacevic-8771
    I understand you are trying to delete a blob with versioning and soft delete enabled. This is creating a new version rather than the blob being soft deleted like you want. Please correct me if I misunderstood.

    This is the expected behavior when having both versioning and soft delete enabled. To move a blob to soft deleted you will need to delete the blob and then delete the version that is created. Unfortunately, it is not currently supported to directly move a blob to soft deleted if versioning is enabled. Please see this table for how operation are handled when soft delete and soft delete with versioning are enabled.

    For product feedback and feature requests I will refer you to our feedback forum. This allows the community to add their voice and upvote popular ideas. The forums are monitored and responded to by our product teams.
    https://feedback.azure.com

    -------------------------------

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


1 additional answer

Sort by: Most helpful
  1. Samy Abdul 3,371 Reputation points
    2022-03-11T09:49:17.78+00:00

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.