Azure blob Storage Life Cycle Management not working

Christopher Reffner 1 Reputation point
2021-10-28T14:31:43.573+00:00

I have setup a StorageV2 (general purpose v2) storage account for my companies backups. I then configured Lifecycle management to delete any files where the last modified date is > 8 days old. However, when I look at the account I am seeing files with last modified dates older than 8 days.

I have also verified that the account has the "Allow Azure services on the trusted services list to access this storage account" check box is checked.

The Json for the rule is below.
{
"rules": [
{
"enabled": true,
"name": "deleteafter8days",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 8
}
}
},
"filters": {
"blobTypes": [
"blockBlob"
]
}
}
}
]
}

I'm not sure where to go from here to determine why the files are not being deleted by lifecycle managment.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,426 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 33,296 Reputation points Microsoft Employee
    2021-10-28T21:35:33.407+00:00

    @Christopher Reffner
    There doesn't appear to be an issue with the rule you created. Did you recently create or modify the rule? It can take up to 24 hours for actions to run the first time and up to 48 hrs to complete if the policy was updated. The rule you have created is only for the base blobs and block blobs. Double check that the blobs you are seeing are not snapshots or versions and are indeed block blobs.

    Hope this helps! If you are still facing issues let me know and we can work with you directly to see what might be causing this issue.

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

    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.