Lifecycle policy neting - which policy will take effect

Marcin Paradowski 0 Reputation points
2023-10-09T11:36:04.11+00:00

Hi.

I have a lifecycle management policy set on root, which moves blob to cold after 30 days, then deletes it after 60. If i add another policy, that works of specific directory under that root, that only moves to cold (without deleting), which one will be on top?

(e.g policy with delete is set on "/root" and just moving to cold is under "/root/directory" )

I need to "exclude" one directory so that files there will never be deleted, is this possible or do i need to move the directory in some other place where there aren't any policies set?

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,944 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sreeju Nair 12,176 Reputation points
    2023-10-09T13:34:30.8+00:00

    Based on the Lifecycle management policies page in Microsoft Learn, see the following.

    "If you define more than one action on the same blob, lifecycle management applies the least expensive action to the blob. For example, action delete is cheaper than action tierToArchive. Action tierToArchive is cheaper than action tierToCool. "

    Refer: https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-policy-configure?tabs=azure-portal

    If you have more than one rule with the same cost, the first one you defined will be working on it.

    0 comments No comments