Upload to Glacier via CLI

0

What is best way to upload an entire folder (recursively) to S3 Glacier via CLI? I understand we can create a Glacier Vault and run 'aws glacier' command on individual objects (w/ no recursive option) such as:

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

However I notice that the 's3 sync' command has '--storage-class' options of 'GLACIER|DEEP_ARCHIVE.' Would following command work as well?:

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

AWS
已提问 4 年前1118 查看次数
1 回答
0
已接受的回答

It is recommended to use S3's Glacier storage class so you can use s3 sync.

Note that data stored in Glacier vaults is not interchangeable with Glacier-storage-class data in S3 buckets. You have to choose which set of APIs to use.

In general, S3's APIs have a richer feature set; we are encouraging use of the S3 APIs for all new Glacier data.

AWS
已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则