Skip to content

Instantly share code, notes, and snippets.

@dhesse
Created May 14, 2015 19:42
Show Gist options
  • Save dhesse/856d4cc9311befc81b04 to your computer and use it in GitHub Desktop.
Save dhesse/856d4cc9311befc81b04 to your computer and use it in GitHub Desktop.
Automated multipat glacier upload
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