Azure Blob Lifecycle Policy Rule

Pallab Chakraborty 401 Reputation points

We are planning to define a Blob Lifecycle Policy rule. So first i would like to know is it recommended to define the Lifecycle Policy always at the Blob Level or at the Storage Account Level or at both the levels?

If Policy is defined say at both Storage Account Level and Blob Level and in case of a policy conflict, which one will win, is it the Blob Policy or the Account Policy e.g I have defined a policy at the Account Level that after 40 days if my Block Blobs are not accessed then move them to the Cool Tier. Simultaneously say i have defined a policy at a particular Blob Level that if that Blob is not accessed after 60 days move the Blob to the Cool Tier. So in this case, which policy will apply to that particular Blob and which policy will apply to the rest of the other blobs?

My other question is : I have defined a policy at the Storage Account Level and my policy is in the screenshot92663-screenshot.jpg

So as you can see there are two rules defined, one for moving to the Cool Tier and one for deletion. So i would like to know will my second rule be triggered at all which is deletion of the Blob after 1825 days or this is just an or Rule and my second rule will never be triggered as my first rule will always trigger first as after 60 days that rule will trigger.
If the answer to my question is "Second Rule won't be triggered at all", how do i ensure that i can trigger both the rules after the designated period. Thanks

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,534 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,278 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 31,996 Reputation points Microsoft Employee

    @Pallab Chakraborty
    You can have both individual blob and storage level lifecycle policies, whatever works best for your use-case. If multiple policies apply to a blob both will be run. In your example the 40 day policy would move the blob since it has the shorter time.

    In the screenshot example you provided the blob will be moved to cold storage after 60 days and then will be deleted after 1825 days if not accessed. When creating multiple rules in a policy, the associated actions must be implemented in tier order (from hot to cool storage, then archive, then deletion).

    Hope this helps. Let me know if you have further questions or issues.


    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful