Created
May 14, 2015 19:42
-
-
Save dhesse/856d4cc9311befc81b04 to your computer and use it in GitHub Desktop.
Automated multipat glacier upload
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
UPLOADID=xxxxx #Replace with the id you got from initiate-multipart-upload | |
DONE=0 | |
for i in x* | |
do | |
echo $i | |
read SIZE _ <<< $(wc -c $i) | |
((UPPER = SIZE + DONE - 1)) | |
aws glacier upload-multipart-part --account-id -\ | |
--vault-name Photos --body $i --range 'bytes $DONE-$UPPER/*'\ | |
--upload-id $UPLOADID | |
((DONE = DONE + SIZE)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment