如何通过AWSCLI将文件上传到Glacier?

0

【以下的问题经过翻译处理】 通过CLI上传整个文件夹(递归)到S3 Glacier的最佳方式是什么?我知道我们可以创建Glacier Vault,并对各个对象运行'aws glacier'命令(没有递归选项),例如:

aws glacier upload-archive --vault-name MyVault --body myArchive.doc

然而,我注意到's3 sync'命令有'--storage-class'选项,可以选择'GLACIER | DEEP_ARCHIVE'。以下命令是否也适用:

aws s3 sync my-dir s3://my-bucket/path --storage-class DEEP_ARCHIVE

profile picture
EXPERT
asked 5 months ago11 views
1 Answer
0

【以下的回答经过翻译处理】 建议使用S3的Glacier存储类别,这样可以使用s3 sync。 请注意,存储在Glacier vault中的数据无法与S3存储桶中的Glacier存储类别的数据互换。你必须选择使用哪个API集。

总的来说,S3的API具有更丰富的功能集;我们建议使用S3 API处理所有新的Glacier数据。

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions