I am trying to mirror a fairly large site (20,000+ pages) prior to a major overhaul. Basically, I need a backup before cutting over to the new one in case we forgot something we need (we'll have about 1,000 pages at launch). The site is run on a CMS that I cannot easily extract usable data from, so I'm trying to make the copy with wget.

My problem is that wget does not appear to be actually converting links, despite the presence of --convert-links or -k in the command. I've tried a couple of different combinations of flags, but I haven't been able to get the output I need. Most recent failed attempt was:

nohup wget --mirror -k -l10 -PafscSnapshot --html-extension -R *calendar* -o wget.log http://www.example.org &

I've also included the --backup-converted, and --convert-links instead of -k (not that it have mattered). I've done it with and without -P and -l, again no that they should matter.

Results in files that still have links like:

http://www.example.org/ht/d/sp/i/17770
link|improve this question
Do the URLs really have a double-slash // after the hostname? I wonder if that's throwing off wget's parser... – coneslayer Apr 15 '10 at 17:11
Some do (did I mention I'm getting rid of the existing service), some don't. I grabbed a random example which happened to, but not all do. I'll update the question, since I most do not. – acrosman Apr 15 '10 at 18:33
feedback

2 Answers

Maybe you've run into wget -k converts files differently on Windows & Linux due to OS filename restrictions?

link|improve this answer
feedback

I have the same with a 6Gig site I'm trying to backup. After a few days, wget finishes, without an error message, and exit status 0, but without converting the links. Doing a smaller retrieval with the same options works fine. It's as if an internal table of whats been downloaded gets washed or corrupted before wget ends.

I'm going to try refetching the site with -nc (which shouldnt refetch anything, because it's already been downloaded, and finish off with converting the links - see Make wget convert HTML links to relative after download if -k wasn't specified )

link|improve this answer
.. but that didnt work. -nc was clobbering because of the -E option (even with -K on). – pike Dec 18 '10 at 15:38
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.