Azure blobs直接存储到存档ti

2024-05-16 09:00:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我跟随https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python的快速入门学习如何使用python将文件作为blob存储上载到Azure。在

由于我希望将其用作灾难恢复解决方案,并且希望将成本降至最低,所以我希望使用归档层。在

我知道我可以在上传blob后立即使用 def set_standard_blob_tier(self, container_name, blob_name, standard_blob_tier, timeout=None)

但是,如果可能的话,我更喜欢直接将其上载到存档层(而不是将其上载到默认层,即热层或冷层,然后再将其移动)。在

所以我没有什么疑问:

  1. 有可能吗?如果是,怎么办?

  2. 因为我对云计算还是个新手,这两个选项在总成本方面有什么不同吗?(正如您所了解的,当前,每个blob在移动到归档层之前都将在酷层中停留几秒钟,因此这段时间可能会有成本,此外,还需要在层之间进行传输)。

谢谢!在


Tags: namehttpscomdocsstorageazurequickstartblob
1条回答
网友
1楼 · 发布于 2024-05-16 09:00:27

Is it possible? if yes, how?

目前无法将blob直接上载到归档层。您需要在热层或冷层上载blob,然后在上载后将该层更改为存档。在

As I'm pretty new to cloud, as there any difference in term of the total cost between the two options? (As you can understand, currently, each blob will be in the cool tier for few seconds before moving to the archive tier, so there might be a cost for that time, and in addition, a cost for the transfer between the tiers).

我不知道我是否理解这个问题,但每个访问层(热、冷和归档)对存储和事务成本都有不同的定价。热层具有最高的存储和最低的事务成本,而归档层具有最低的存储和最高的事务成本。在

此外,将归档层从归档层更改为热层或冷层是一项耗时的操作(而反过来几乎是瞬间完成的)。在

此外,如果在归档blob的6个月内将blob从归档层移到热/冷层,您将被处以罚款。在

请在此处阅读有关存储层的更多信息:https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers。在

更新

  1. Is there a cost to change the tier from cool to archive?

是的。将层从“酷”更改为“归档”是有成本的。若我没搞错的话,将层从cool更改为archive被认为是一个写操作。如果你在美国西部地区买10000个斑点,你只需要花0.11美元就可以买到10000个斑点。所以,如果你是为100个斑点做的,你将支付0.0011美元(0.11*100/10000美元)。在

  1. Will I be charged for the few seconds the file was in the cool tier (between uploaded and moved to archive)?

答案又是肯定的。定价将取决于你在cool-tier中存储的数据量,存储时间和存储区域。例如,如果您在美国西部地区的cool tier中存储1gb的数据一个月,您将支付0.0152美元。你只需要计算按比例分配的金额。在

有关定价的详细信息,请访问此链接:https://azure.microsoft.com/en-us/pricing/details/storage/blobs/。在

相关问题 更多 >