azure storage: lifecycle management is not working

Arif Usman 496 Reputation points
2025-12-02T20:27:52.5+00:00

I have storage account with following configuration.

Account kind : StorageV2

Performance : Standard

Replication : Locally-redundant storage (LRS)

blob access tier : Hot

Secure transfer required : Enabled

Allow Blob anonymous access : Disabled

Allow storage account key access : Enabled

Allow upper limit for shared access signature (SAS) expiry interval : Disabled

Default to Microsoft Entra authorization in the Azure portal : Disabled

I have container (backup), have lots of blobs dated from January 2025.

I have created Lifecycle management to automatically delete blobs older than 30 days. here is the code and it is been over week and never work.

 {
  "rules": [
    {
      "enabled": true,
      "name": "delete-after-30-days",
      "type": "Lifecycle",
      "definition": {
        "actions": {
          "baseBlob": {
            "delete": {
              "daysAfterModificationGreaterThan": 30
            }
          }
        },
        "filters": {
          "blobTypes": [
            "blockBlob"
          ]
        }
      }
    }
  ]
}

not sure what is going on or if i am doing wrong..

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jeevan Shanigarapu 3,275 Reputation points Microsoft External Staff Moderator
    2025-12-02T20:53:54.3833333+00:00

    Hello @Arif,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand your question about some trouble with the lifecycle management policy for your Azure Storage account.

    From the details you’ve shared, the lifecycle policy you've set up looks like it should work; however, there are a few things you might want to double-check:

    1. Time for Policy to Take Effect**: It usually takes up to 24 hours for a new or updated lifecycle management policy to start executing. Since you mentioned it’s been over a week, this may not be the issue, but it's good to keep in mind for future changes.
    2. Blob Age**: You mentioned that the blobs are dated from January 2025. Ensure that the blobs indeed meet the criteria you set (i.e., older than 30 days as per your policy). If they are dated in the future, they will not be eligible for deletion.
    3. Supported Blob Types**: Make sure that all blobs in your backup container are block blobs since your policy only targets them. If there are other types of blobs present, those will be ignored.
    4. Immutable Policies or Locks**: Check if any blobs have immutable policies or legal holds that might prevent them from being deleted.
    5. Storage Account Configuration**: If your storage account has any data protection features enabled (like soft delete or versioning), it might affect how deletions are perceived. Blobs might still exist in a soft deleted state even if they're marked for deletion.
    6. Check Diagnostics**: Use the lifecycle management diagnostic tool in Azure to see if there are any insights or issues detected with your policy.
    7. Follow Azure Event Logs**: To monitor the actions taken by your lifecycle management policies, check the LifecyclePolicyCompleted event to see if any deletions are being logged.

    Relevant Documentation:

    https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview

    https://docs.microsoft.com/azure/storage/blobs/lifecycle-management-policy-configure

    https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview#faq

    https://docs.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names

    https://docs.microsoft.com/azure/storage/common/storage-network-security#manage-exceptions

    https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview#policy-execution

    Kindly let us know if the above helps or you need further assistance on this issue.


Your answer

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