Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created July 28, 2020 12:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#!/usr/bin/env bash
export AWS_PROFILE=trobrock
file="$1"
echo "Creating archive..."
tar -cv $file | gzip -9 > $file.tgz
echo "\tDONE"
echo "Uploading to glacier..."
aws glacier upload-archive --account-id - --vault-name icebox --body $file.tgz > $file.tgz.glacier
echo "\tDONE"
echo "Cleaning up..."
rm $file.tgz
echo "\tDONE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment