LifeCycle Management: Blobs inside the nested hierarchy levels (subfolders) are not changed from one tier to another tier. Why?

Seenuvasan, Venkatanathan 65 Reputation points
2023-09-02T08:44:54.2+00:00

Hi,

Could you please clarify my doubts regarding Lifecycle Management in Azure Storage (general purpose v2)?

The requirement is to change the access tier from HOT to COOL for the blob that the name starting with the letter 'U'.

blob type is block blob. In general, my folder structure would be in the nested hierarchy level like Container/Directory/Directory1/Directory2/blobs.

Note: Directory1 and 2 are not static one. it will be created automatically based on year/month pattern.

I applied the blob prefix rule in life cycle management in the pattern of container/directory/U.

For example, stage/TestAccessTier/U.

Now, Blobs which are under parent directory level (TestAccessTier), are changed to COOL tier successfully. but the same rule is not worked for the nested directory level. I can not define the nested directories sine those are dynamic one.

Is it possible to achieve the expected outcome in lifecycle management ? Please guide me.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
{count} vote

Accepted answer
  1. Siva Villa 285 Reputation points Microsoft Employee Moderator
    2023-09-08T12:39:37.11+00:00

    Thanks for reaching out to Microsoft Q&A.

    A prefix match string of container1/sub1/ applies to all blobs in the container named container1 that begin with the string sub1/.
    Since, you have directories with different names part of the same container. It seems that the feasible approach would be to create separate lifecycle management policies for each folder/directory. https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-faq#the-blob-prefix-match-string-didn-t-apply-the-policy-to-the-expected-blobs
    As an alternative, you will need to develop a custom script and incorporate the function app sample method outlined in the article below.

    Lifecycle Management, Page Blob, Azure Storage, Blob Storage (microsoft.com)

    Please let us know if you have any further queries. I’m happy to assist you further.

    0 comments No comments

0 additional answers

Sort by: Most 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.