How to restore folders (or entire buckets) to Amazon S3 from Glacier?

后端 未结 10 828
天命终不由人
天命终不由人 2020-12-23 12:47

I changed the lifecycle for a bunch of my buckets on Amazon S3 so their storage class was set to Glacier. I did this using the online AWS Console. I now need those files a

10条回答
  •  太阳男子
    2020-12-23 13:31

    If you're using the AWS CLI tool (it's nice, you should), you can do it like this:

    aws s3 ls s3:// | awk '{print $4}' | xargs -L 1 aws s3api restore-object --restore-request Days= --bucket  --key
    

    Replace with the bucket name you want.

    Replace with the number of days you want to restore the object for.

提交回复
热议问题