Last active
January 3, 2017 14:43
-
-
Save jakubigla/b7e75e719e165034fd609cc9e594329e to your computer and use it in GitHub Desktop.
Tar directories and upload to AWS Glacier
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 | |
DIRS=$(ls -d *); | |
for DIRR in $DIRS; do | |
echo $DIRR | |
tar -zcvf "$DIRR.tar.gz" "$DIRR" | |
aws glacier upload-archive --account-id - --vault-name Hangar --body "$DIRR.tar.gz" --region eu-central-1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment