Created
September 25, 2018 12:57
-
-
Save camallen/e2ad28b337992f8ed8403f6dc8b057bb to your computer and use it in GitHub Desktop.
Request glacier restore from file
This file contains hidden or 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
#!/bin/sh | |
bucket="zooniverse-cold-storage" | |
path_prefix="data/Galaxy-Zoo-SDSS/COS_stamps_large" | |
for x in `cat glacier_to_restore.txt` | |
do | |
bucket_path="${path_prefix}/${x}" | |
echo "Begin restoring ${bucket_path}" | |
aws s3api restore-object --restore-request '{"Days":5,"GlacierJobParameters":{"Tier":"Bulk"}}' --bucket ${bucket} --key ${bucket_path} | |
echo "Done restoring $bucket_path" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've used the following to generate the list of files to restore from glacier using the script above.