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