Quickly mirror website…

This is going to (hopefully) be part of a much larger article on moving web sites from one host to another.  Until then, I leave with just a simple command to download almost all of an entire webpage to a local directory…

<code>wget -rnp -nd www.example.com</code>

Or, if we want to download the same files, but store them in a directory created for each host…

<code>wget -rnp www.example.com</code>

Well, that’s all for now.  As this project moves forward for me, you should see more.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

This entry was posted in quickfire, tips and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Posted January 26, 2009 at 4:04 pm | Permalink

    Love the advice. Thank you.

  2. Posted May 6, 2009 at 11:05 pm | Permalink

    I think a better explanation for what -nd is what is “do not keep the hierarchy of directories just put all files from anywhere specified into the single destination directory. A note, files with same name will have extra extensions appended.”. The np option is probably what I’ve been looking for since it usually downloads more than what I need. Some sites I have mirrored where full sites in a sub directory but had images in a higher directory. I had to go back after mirroring and readjust paths because I was moving the site to it’s own domain in root. That’s a pain.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>