简体   繁体   English

Azure Blob 存储生命周期管理 - 嵌入式文件夹

[英]Azure Blob Storage Lifecycle Management - embedded folders

I'm currently trying to implement lifecycle management on a container where i have embeded folders as follows:我目前正在尝试在我嵌入文件夹的容器上实现生命周期管理,如下所示:

container1/1/test/done_filename.txt
container1/1/processed/complete_filename.txt
container1/1/wip_filename.txt

i tried creating a rule filter to delete files under the test folder that start with done however i waited 48 hours and it's still not removed.我尝试创建一个规则过滤器来删除 test 文件夹下以 done 开头的文件,但是我等了 48 小时,它仍然没有被删除。

Rule filter:
delete after 1 day 
Prefix Match:
file with this prefix: container1/1/test/done_

All samples I see from microsoft and online only mention "myContainer/prefix", am i to understand that the lifecycle management feature doesn't support subfolders/full paths?我从微软和在线看到的所有示例都只提到“myContainer/prefix”,我是否理解生命周期管理功能不支持子文件夹/完整路径? do all files have to be within the the root of the container?所有文件都必须在容器的根目录内吗? or what am i doing wrong here.或者我在这里做错了什么。

Updated showing rule definition:更新显示规则定义:

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

I expect the above to delete any file under "container1/1/test/" that starts with "done_" but the file is still there when i check after a few days even though the file has not been modified.我希望以上内容会删除“container1/1/test/”下以“done_”开头的任何文件,但是当我在几天后检查时该文件仍然存在,即使该文件没有被修改。

If you have enabled the rule, then your policy and prefix match are ok.如果您启用了规则,那么您的策略和前缀匹配就可以了。

You need to check some settings which can block the blob delete operation :您需要检查一些可以阻止blob delete operation的设置:

1.Make sure you can manually delete these blobs. 1.确保您可以手动删除这些 blob。 You can try to delete one of them manually.您可以尝试手动删除其中一个。 Why we need to do that?为什么我们需要这样做? If you have leased these blobs or set immutability policies , the delete operation are not allowed.如果您已租用这些 blob设置了不变性策略,则不允许删除操作。

2.Check the settings in Networking pane of your storage account. 2.检查存储帐户的网络窗格中的设置。 And make sure you select the option "Allow access from All networks":并确保您 select 选项“允许从所有网络访问”:

在此处输入图像描述

I was able to find the solution here: https://docs.microsoft.com/answers/answers/154361/view.html我能够在这里找到解决方案: https://docs.microsoft.com/answers/answers/154361/view.html

When you are using selected networks because of security restrictions like we do then correct solution is to enable “Allow trusted Microsoft services to access this storage account” under Networking.当您因为像我们这样的安全限制而使用选定的网络时,正确的解决方案是在网络下启用“允许受信任的 Microsoft 服务访问此存储帐户”。

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

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