Last active
January 1, 2016 09:39
-
-
Save rosenhouse/8126177 to your computer and use it in GitHub Desktop.
Reduced redundancy sync 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
#!/bin/bash -e | |
SRC="$1" | |
DEST="$2" | |
echo "Starting reduced-redundancy sync of $SRC --> $DEST" | |
# would prefer to use this tool, but we get errors: https://github.com/aws/aws-cli/issues/401 | |
# aws --region us-west-2 s3 sync --storage-class REDUCED_REDUNDANCY $SRC $DEST | |
# instead we'll use s3cmd | |
# EC2 instance IAM role credentials are added in version v1.5 | |
# git clone https://github.com/s3tools/s3cmd.git | |
# cd s3cmd | |
# python setup.py install | |
s3cmd sync --verbose --reduced-redundancy --recursive $SRC $DEST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment