Skip to content

Instantly share code, notes, and snippets.

@harperreed
Created July 10, 2012 02:57
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harperreed/3080695 to your computer and use it in GitHub Desktop.
Save harperreed/3080695 to your computer and use it in GitHub Desktop.
Create an static S3 bucket to mirror a site
#!/bin/bash
#this will mirror a website, upload to s3, and make it publically available.
#install s3cmd. install wget. (i use homebrew).
#configure s3cmd (s3cmd --configure)
# run this by doing: mirror_site.sh www.example.org
wget --mirror -p --html-extension --convert-links -e robots=off -P . $1
s3cmd mb s3://$1
s3cmd put --acl-public --recursive $1/ s3://$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment