Created
December 4, 2015 13:11
-
-
Save stollcri/58535848d5bdc8e02415 to your computer and use it in GitHub Desktop.
Synchronize files to AWS S3
This file contains hidden or 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
| $SRC_DIR=/var/www/htdocs | |
| cd $SRC_DIR/images | |
| DIR_SIZE=$(du . -hS | tail -n1 | awk '{print $1}') | |
| echo "Syncing s3://BUCKET_NAME/images/ ($DIR_SIZE)" | |
| /usr/local/bin/aws s3 sync . s3://BUCKET_NAME/images/ --storage-class STANDARD --exclude '.*' --exclude '*.php' | |
| cd $SRC_DIR/images-old | |
| DIR_SIZE=$(du . -hS | tail -n1 | awk '{print $1}') | |
| echo "Syncing s3://BUCKET_NAME/images-old/ ($DIR_SIZE)" | |
| /usr/local/bin/aws s3 sync . s3://BUCKET_NAME/images-old/ --storage-class STANDARD_IA --exclude '.*' --exclude '*.php' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment