[英]Automatically changing Azure blob storage tier to cool?
We are considering moving archived data after some retention period to the newer cool
tier of Azure Storage ( https://azure.microsoft.com/en-us/blog/introducing-azure-cool-storage/ ).我们正在考虑在保留一段时间后将存档数据移动到更新的
cool
存储层 ( https://azure.microsoft.com/en-us/blog/introducing-azure-cool-storage/ )。
Can I programatically set up something that will automatically change the tier or move content to a cool tier storage after some period of time?我能否以编程方式设置在一段时间后自动更改层或将内容移动到凉爽层存储的东西?
In additional, we can change the Blob Storage characteristic at any point. 此外,我们可以随时更改Blob存储特性。 But when change from cool to hot, you have to pay for a lot of I/O for converting the blob type.
但是当从酷变为热时,你必须为转换blob类型付出大量的I / O. Converting from hot to cool is free.
从热到冷转换是免费的。 We could find more details at this document .
我们可以在本文档中找到更多详细信息。
Can I programmatically set up something that will automatically change the tier or move content to a cool tier storage after some period of time?
我能否以编程方式设置在一段时间后自动更改层或将内容移动到凉爽层存储的东西?
Yes , ( since August 2021 ) it's now possible to have Azure automatically move blobs between Hot, Cool, and Archive tiers - this is done using a Lifecycle management policy which you can configure.是的,( 自 2021 年 8 月起) 现在可以让 Azure 在热、冷和存档层之间自动移动 blob - 这是使用您可以配置的生命周期管理策略完成的。
This is documented in this page: https://docs.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview这记录在此页面中: https://docs.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview
Some caveats:一些警告:
You can't force-run a policy: once you've set-up the policy you'll simply have to wait... up to 48 hours or even longer.您不能强制执行策略:一旦您设置了策略,您只需等待……最多 48 小时甚至更长时间。
Your blobs need to be readable by Azure itself, so this won't work with super secure or inaccessible storage accounts.您的 blob 需要 Azure 本身可以读取,因此这不适用于超级安全或无法访问的存储帐户。
You need to enable blob access-tracking first (I describe how to do this in the section below).您需要首先启用 blob 访问跟踪(我将在下面的部分中描述如何执行此操作)。
The policy rules you can create are somewhat restrictive as you can only filter the set of blobs to auto-archive or automatically move to the Cool tier based on only these parameters:您可以创建的策略规则有些限制,因为您只能根据以下参数过滤要自动存档的 blob 集或自动移动到 Cool 层:
The only possible rule actions are to move blobs between tiers or to delete blobs.唯一可能的规则操作是在层之间移动 blob 或删除 blob。 You can't move blobs between containers or accounts or edit any blob metadata or change a blob's access-policy and so on...
您不能在容器或帐户之间移动 blob,也不能编辑任何 blob 元数据或更改 blob 的访问策略等等......
To set up a blob lifecycle policy to automatically move Hot blobs to the Cool tier if not accessed for 90 days (as an example), do this:要设置 blob 生命周期策略以在 90 天未访问时自动将热 blob 移动到冷层(例如),请执行以下操作:
(Azure Portal screenshots taken as I wrote this, in August 2022 - if the screenshots or instructions are outdated leave a comment and I'll update them) (我在 2022 年 8 月撰写本文时截取的 Azure 门户屏幕截图 - 如果屏幕截图或说明已过时,请发表评论,我会更新它们)
Open the Azure Portal ( https://portal.azure.com ) and navigate to your Storage Account's "blade".打开Azure门户( Z5E056C500A1C4B6A7110B507BADE5Z:// PORTAL.ZCF04ASTORDAL.ZCF04A04AA02E37B774FC311A48FC592ARENFC59.48FC59.48FC59NDCRADENDCRADENDCRADENDCRADENDCRADENDCRADENDCRADENDCENDCRAD不是
Look for "Lifecycle Management" in the sidebar:在侧边栏中查找“生命周期管理”:
Ensure "Enable access tracking" is enabled . 确保启用“启用访问跟踪” 。
The tooltip says access tracking has additional charges, but I can't find any information about what those charges are.工具提示说访问跟踪有额外费用,但我找不到任何关于这些费用的信息。
Click "Add a rule" and complete the wizard:单击“添加规则”并完成向导:
move-blobs-not-accessed-for-90-days-to-cool-tier
move-blobs-not-accessed-for-90-days-to-cool-tier
tierToCool
), move-to-archive ( tierToArchive
), and delete-blob ( delete
).tierToCool
)、移动到存档 ( tierToArchive
) 和删除 blob ( delete
)。 And that's it - so now you have to wait up to 48 hours for the policy to start to take effect, and maybe wait even longer for Azure to actually finish moving the blobs between tiers.就是这样- 所以现在您必须等待长达 48 小时才能让策略开始生效,并且可能等待更长时间 Azure 才能真正完成在层之间移动 blob。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.