简体   繁体   中英

Azure Blob Storage Lifecycle Management - filter on folder

I'm playing with lifecycle management in Azure and trying to get it to move blobs to cool based on the folder they are in. The documentation on Azure says this is possible but they only provide examples of container prefixes. My question with this is, if it is possible and if so how do you define the filter?

My scenario is I have multiple containers with the same folder structure in each. EG container1/folder1 container1/folder2 container2/folder1 container2/folder2

I need to be able to apply rules on folder level so the blobs in folder1 will go to cool after 1 day whilst in folder2 it moves to cool after 5 days (trivial example). It should ignore the container name as they are generated on the fly and I don't know the names of them, only the structure within them.

my current rule filter is like so "**/folder1" but this isn't moving anything. I've also tried just the folder name, EG "folder1"

Any idea what I'm missing? It's annoying that there's no instant feedback from Azure and I have to wait until the time it runs to find out whether it works (at least 24 hours)

Thanks all

The filter rule must starts with a container name, and it does not support starting with folder name.

Please refer to this Rule filters link -> prefixMatch section, and here is the screenshot of Rule filters:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM