Upload to Glacier via CLI
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
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.
Relevant questions
upload last part to glacier confusion
asked 6 months agoS3 Glacier (2013) Flexible running without Bucket, want to move to Glacier Deep Archive
asked 2 months agoMove Glacier data to Deep Glacier
asked 3 years agoGlacier Egress Charges (S3)
Accepted AnswerWill we allow transitioning between Glacier and Glacier Deep Archive?
Accepted Answerasked 4 years agoGlacier Vault Lock and Policy Changes?
Accepted Answerasked 7 years agoS3 Object-Lock and Glacier Vault Lock - Third Party Backup Support
Accepted Answerasked 2 years agoHow do I make my Glacier Vault a Glacier Deep Archive
asked 6 months agoUpload to Glacier via CLI
Accepted Answerasked 3 years agoUnable to delete a glacier vault
Accepted Answerasked 7 months ago