Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created July 28, 2020 12:46
Show Gist options
  • Save trobrock/cf1710b47ae24dd013bba6ebb1dde6ef to your computer and use it in GitHub Desktop.
Save trobrock/cf1710b47ae24dd013bba6ebb1dde6ef to your computer and use it in GitHub Desktop.
#!/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