Saturday, June 24, 2006

Mirroring websites with wget

I'm sure it's already quite well known, but I've just discovered how to mirror web sites with wget. I'd been wanting to make sure I had a back up of this blog and was already sure that wget would be the tool to use. A quick search turned up this command:

wget --mirror –w 2 –p --html-extension –-convert-links –P /home/pat/documents/blogger/ http://patgardner.blogspot.com

--mirror

get files recursively, but depending on timestamp

-w

wait a number of seconds between retrieval

-p

download all page requisites such as images

--html-extension

makes sure that all the copies of files have .html file extensions

--convert-links

convert links suitable for local viewing

-P

path to save files to

No comments: