Skip to content

Instantly share code, notes, and snippets.

@andrewgleave
Created April 11, 2013 10:04
Show Gist options
  • Save andrewgleave/5362194 to your computer and use it in GitHub Desktop.
Save andrewgleave/5362194 to your computer and use it in GitHub Desktop.
Mirror site to S3 using s3cmd and wget
#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