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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南