Last active
April 18, 2020 18:27
-
-
Save mknkisk/e27e89ddf89c95bff51befd7ee5f4509 to your computer and use it in GitHub Desktop.
aws glacier -> aws s3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for key in `aws s3api list-objects --bucket {bucket_name} --output json | jq -r '.Contents[].Key'`; do echo $key; aws s3api restore-object --bucket {bucket_name} --key $key --restore-request '{"Days": 1}'; done | |
for key in `aws s3api list-objects --bucket {bucket_name} --output json | jq -r '.Contents[].Key'`; do echo "\n$key"; aws s3api head-object --bucket {bucket_name} --key $key --output json | jq -r .Restore; done | |
for key in `aws s3api list-objects --bucket {bucket_name} --prefix {path} --output json | jq -r '.Contents[].Key'`; do echo "\n$key"; aws s3 cp s3://{bucket_name}/$key ./; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment