skip to Main Content

How does one go about applying an Azure Lifecycle Management Policy to a file name that appears(duplicated name, different file contents) in different blob directories while avoiding effecting other blobs?

The file name in question is executionlogs.txt

here is how it shows up in my container in multiple locations

  1. Experiment/key001/records/executionlogs.txt
  2. Experiment/key002/records/executionlogs.txt
  3. Experiment/key003/records/executionlogs.txt
    and so on…

I want to be able to apply my policy to any blob named executionlogs.txt but I cannot specify each directory because there are not only hundreds but also they are created constantly.

2

Answers


  1. @LukeDornburgh I see that your ask is specific to the Blob LifeCycle Management policy in Azure Storage to apply ONLY to executionlogs.txt within various directories without affecting the other blobs.

    We cannot use the prefixMatch filter name as it has syntax of containerName/BlobName and it will affect the other blobs which are present in that container and this doesn’t serve your purpose.

    Suggestion:

    You can try to add Blob Index tags to all your executionlogs.txt blobs and use the blobIndexMatch filter in the Blob Lifecycle management policy.

    See the sample example here which uses the blobIndexMatch filter. Hope this helps.

    Login or Signup to reply.
  2. Lifecycle management in storage accounts does not support custom processing of blobs based on file names. Storage Tasks is a new service in private preview that can do this. You can define complex conditions using blob properties and define operations to perform when conditions are met. If you’re interested in trying this, I would recommend to provide the detailed use case.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search