Boto Glacier

编程入门 行业动态 更新时间:2024-10-15 10:20:27
本文介绍了Boto Glacier-使用分段上传功能上传大于4 GB的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我定期使用boto将文件上传到AWS Glacier,如下所示:

I am periodically uploading a file to AWS Glacier using boto as follows:

# Import boto's layer2 import boto.glacier.layer2 # Create a Layer2 object to connect to Glacier l = boto.glacier.layer2.Layer2(aws_access_key_id=awsAccess, aws_secret_access_key=awsSecret) # Get a vault based on vault name (assuming you created it already) v = l.get_vault(vaultName) # Create an archive from a local file on the vault archiveID = v.create_archive_from_file(fileName)

但是对于大于4 GB的文件,此操作将失败。

However this fails for files that are larger than 4 GB in size.

我假设这是因为 Amazon Glacier常见问题解答:可以在单个上载请求中上载的最大档案是4 GB。对于大于100 MB的项目,客户应考虑使用分段上传功能。

I'm assuming that this is because as specified in the Amazon Glacier FAQ: "The largest archive that can be uploaded in a single Upload request is 4 gigabytes. For items larger than 100 megabytes, customers should consider using the Multipart upload capability."

如何在boto和AWS Glacier中使用分段上传功能?

How do I use the Multipart upload capability with boto and AWS Glacier?

推荐答案

Amazon Glacier使用术语归档来描述文件。换句话说,您不能将大于4GB的文件上传到Glacier。如果您仍然想尝试分段上传,请查看vault.concurrent_create_archive_from_file或vault.create_archive_writer

Amazon Glacier uses the term archive to describe files. In other words, you cannot upload a file larger than 4GB to Glacier. If you'd like to try the multipart uploader anyway, look at vault.concurrent_create_archive_from_file or vault.create_archive_writer

更多推荐

Boto Glacier

本文发布于:2023-11-26 11:26:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633806.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Boto   Glacier

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!