Skip to content

Instantly share code, notes, and snippets.

@harperreed
Created March 2, 2012 04:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save harperreed/1955586 to your computer and use it in GitHub Desktop.
Save harperreed/1955586 to your computer and use it in GitHub Desktop.
Mirror a site in s3
#!/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