Boto Glacier-使用分段上传功能上传大于4 GB的文件 [英] Boto Glacier - Upload file larger than 4 GB using multipart upload
问题描述
我定期使用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-使用分段上传功能上传大于4 GB的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!