简体   繁体   English

Azure Blob 存储生命周期管理 - 筛选文件夹

[英]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.我在 Azure 中使用生命周期管理,并试图让它根据它们所在的文件夹将 blob 移动到冷却。Azure 上的文档说这是可能的,但它们只提供容器前缀的示例。 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 EG 容器 1/文件夹 1 容器 1/文件夹 2 容器 2/文件夹 1 容器 2/文件夹 2

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).我需要能够在文件夹级别应用规则,因此 folder1 中的 blob 将 go 在 1 天后冷却,而在 folder2 中它会在 5 天后冷却(简单示例)。 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.我当前的规则过滤器就像“**/folder1”,但这并没有移动任何东西。 I've also tried just the folder name, EG "folder1"我也尝试了文件夹名称,例如“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)令人讨厌的是 Azure 没有即时反馈,我必须等到它运行的时间才能确定它是否有效(至少 24 小时)

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:请参考此规则过滤器链接 -> prefixMatch部分,这里是规则过滤器的屏幕截图:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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