Created
April 11, 2013 10:04
-
-
Save andrewgleave/5362194 to your computer and use it in GitHub Desktop.
Mirror site to S3 using s3cmd and wget
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
#optionally create two buckets and serve from root, redirecting www | |
s3cmd mb --bucket-location=EU s3://example.com | |
s3cmd mb --bucket-location=EU s3://www.example.com | |
s3cmd ws-create --ws-index=index.html s3://example.com | |
s3cmd ws-create s3://www.example.com | |
#configure www redirect if necessary | |
wget --mirror -p --html-extension --convert-links -e robots=off -P . http://example.com | |
s3cmd put --recursive --exclude=".DS_Store" --acl-public example.com/ s3://example.com | |
#create hosted zones and redirect DNS | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment