<HTML>
Hi,
<BR>Just to confirm about the changes needed in script for automatically
<BR>mirroring Marku's Grass homepage. I have been having some trouble
<BR>with the mirroring script since the URL has been changed.

<P>Will the following change in Justin's script work for mirroring the
<BR>script. I have changed the --cut-dirs to 1 and also added the
<BR>new URL as follows

<P>wget -b -m -np --cut-dirs=1 -P /www/grass -o /home/webmaster/mirrorLog/httpLog0
<BR><A HREF="http://www.laum.uni-hannover.de/iln/grass/grass42/">http://www.geog.uni-hannover.de/grass/</A>
<BR>&nbsp;
<BR>but am having some problems with the mirroring.
<BR>Can someone (Justin maybe?) please confirm if the
<BR>changes in the script are okay. It seems that I have to redo
<BR>the entire mirroring once again.

<P>Thanks in advance.

<P>Venkatesh Raghavan
<BR>Osaka City University
<BR>raghavan@media.osaka-cu.ac.jp
<BR>&nbsp;

<P>&nbsp;

<P>Justin Hickey wrote:
<BLOCKQUOTE TYPE=CITE>Hello all

<P>I set up a mirror site of Markus's http and ftp sites using wget. After
<BR>compiling wget, this is what I did:

<P>1. Defined directories under my http server and my ftp server to hold
the grass
<BR>data

<P>2. Made changes (set proxies etc.) to the global wgetrc file (default
is
<BR>/usr/local/etc/wgetrc). The only change worth noting is that I added
the
<BR>following line so that the host name of the URL's would be dropped
when saving
<BR>them

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add_hostdir = off

<P>Otherwise, a directory is created with the name of the host machine
(eg
<BR>www.laum.uni-hannover.de) as the root of your mirror site.

<P>3. Wrote a shell script to run the wget commands (I plan to use this
script as
<BR>a cron job) shown below

<P>------------------------------ begin script ----------------------------------

<P>#! /bin/sh

<P># Rotate the logs
<BR>mv /home/webmaster/mirrorLog/httpLog3 /home/webmaster/mirrorLog/httpLog4
<BR>mv /home/webmaster/mirrorLog/httpLog2 /home/webmaster/mirrorLog/httpLog3
<BR>mv /home/webmaster/mirrorLog/httpLog1 /home/webmaster/mirrorLog/httpLog2
<BR>mv /home/webmaster/mirrorLog/httpLog0 /home/webmaster/mirrorLog/httpLog1
<BR>mv /home/webmaster/mirrorLog/ftpLog3 /home/webmaster/mirrorLog/ftpLog4
<BR>mv /home/webmaster/mirrorLog/ftpLog2 /home/webmaster/mirrorLog/ftpLog3
<BR>mv /home/webmaster/mirrorLog/ftpLog1 /home/webmaster/mirrorLog/ftpLog2
<BR>mv /home/webmaster/mirrorLog/ftpLog0 /home/webmaster/mirrorLog/ftpLog1

<P># Get the grass html pages
<BR>wget -b -m -np --cut-dirs=3 -P /www/grass -o /home/webmaster/mirrorLog/httpLog0
<BR><A HREF="http://www.laum.uni-hannover.de/iln/grass/grass42/">http://www.laum.uni-hannover.de/iln/grass/grass42/</A>

<P># Get the grass ftp pages
<BR>wget -b -m -np --cut-dirs=2 -P /ftp/grass -o /home/webmast/mirrorLog/ftpLog0
<BR><A HREF="ftp://130.75.72.14/pub/grass421/">ftp://130.75.72.14/pub/grass421/</A>

<P>----------------------------------- end script ------------------------------

<P>Notes:

<P>The above shows a rotation of 5 logs each of wget output

<P>The wget commands should all be on one line (of course)

<P>Explanation of the options:

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
run in the background
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
use the mirror options
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -np&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
no parent files - only download files that are under
<BR>the
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
given URL, even if there are links to files in other
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
directories (eg without -np, if there is a link to the
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
website's top page you will download the whole site
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
instead of just the grass files)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --cut-dirs=n&nbsp;&nbsp;&nbsp;
remove n directories from the path of the URL (eg http
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
URL is www.laum.uni-hannover.de/iln/grass/grass42/ if n
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
equals 3 then iln/grass/grass42 is removed from the
<BR>URL.
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Otherwise the mirror site will have iln/grass/grass42
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
as its root)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -P &lt;dest>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
path to the mirror site destination
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -o &lt;log>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
specify the log file

<P>I hope this is of help to anyone who is setting up a mirror site.

<P>--
<BR>Sincerely,

<P>Jazzman (a.k.a. Justin Hickey)&nbsp; e-mail: jhickey@hpcc.nectec.or.th
<BR>High Performance Computing Center
<BR>National Electronics and Computer Technology Center (NECTEC)
<BR>Bangkok, Thailand
<BR>==================================================================
<BR>People who think they know everything are very irritating to those
<BR>of us who do.&nbsp; ---Anonymous

<P>Jazz and Trek Rule!!!
<BR>==================================================================</BLOCKQUOTE>
&nbsp;</HTML>