Created
May 31, 2015 21:06
-
-
Save tyler-johnson/8fb13088f751a9c4968b to your computer and use it in GitHub Desktop.
Runs tar+gzip on current directory's files and streams data to s3.
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
find . -type f -mindepth 1 | awk -v base="./" "{ len=length(base); if (substr(\$1,1,len) == base) print substr(\$1,len+1); else print $1 }" | tar --files-from=- -cvf - | gzip -c | aws s3 cp - s3://bti-static/backup.tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment