Azure Lifecycle Management

Patwa, Parag 1 Reputation point
2022-02-23T14:25:13.267+00:00

I have setup a policy to move blobs to "cold" if they have not been accessed for more than 30 days and move to "archive" if they have not been accessed for more than 90 days.

"rules": [
    {
      "enabled": true,
      "name": "TierToArchive",
      "type": "Lifecycle",
      "definition": {
        "actions": {
          "baseBlob": {
            "tierToArchive": {
              "daysAfterLastAccessTimeGreaterThan": 90
            }
          }
        },
        "filters": {
          "blobTypes": [
            "blockBlob"
          ]
        }
      }
    },
    {
      "enabled": true,
      "name": "TierToCool",
      "type": "Lifecycle",
      "definition": {
        "actions": {
          "version": {
            "delete": {
              "daysAfterCreationGreaterThan": 90
            }
          },
          "baseBlob": {
            "enableAutoTierToHotFromCool": true,
            "tierToCool": {
              "daysAfterLastAccessTimeGreaterThan": 30
            }
          },
          "snapshot": {
            "delete": {
              "daysAfterCreationGreaterThan": 90
            }
          }
        },
        "filters": {
          "blobTypes": [
            "blockBlob"
          ]
        }
      }
    }
  ]

I have blobs that are 2 years old, and they have been moved to "cold" but not archive. Is there something wrong with the rules?

Also, is there anyway to trigger the policy manually instead of waiting for 24/48hrs for Azure to run it?

any help much appreciated.

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

1 answer

Sort by: Most helpful
  1. Alan Kinane 16,906 Reputation points MVP
    2022-02-23T16:13:19.357+00:00

    I think your rules are in the wrong order, you need to have the tier to cool rule before the tier to archive rule. As far as I know you will have to wait for the time period to elapse, I don't think there is any way to force this.

    177207-image.png

    1 person found this answer 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.