Maintaining the mirror

The mirror manual page

Unfortunately it prints horribly in netscape.

How I use mirror

  • Friendly sysadmins installed mirror
  • I made a file in Toronto called mackay_wol (Config file) contents:
    package=mackay_wol
      site=wol.ra.phy.cam.ac.uk
      remote_dir=/pub/www/mackay/
      local_dir=/homes/neuron/b/mackay/public_html/
      remote_password=mackay_mirror@ai.toronto.edu
      compress_patt=
      do_deletes=false
      exclude_patt=(tmp//*|.*\~|#.*#|.*\.bak|yippee.*|shail//*|courses//*|&
           code//*|old//*|tex_inputs//*|HANDBOOK//*|density//*|protein//*|&
           bugs//*|images//chrom*)
           
  • Then to see what would happen if I ran mirror with this file,
    mirror -n mackay_wol
    
  • To do it for real, and get feedback (-d),
    mirror -d -d mackay_wol
         

    Getting it done by cron

    To see contents of crontab
         crontab -l
    
    To edit:
         crontab -e
    
    The following does my mirror at 5.15 on Mondays
    15 5 * * 1 rsh neuron.ai.toronto.edu "mirror -d  mackay_wol | Mail mackay"
        

    Other ideas I don't use:
      compress_prog=gzip
               exclude_patt=(^|/)(host|.+tar\.gz|\.mirror$|\.in\..*\.$|MIRROR.LOG|#.*#|\.FSP|\.cache|\.zipped|lost+found/|\ )
               delete_excl=(^|/)(host|\.mirror$|\.notar$|\.message$)
    

    The readme file from the software

    Mirror is a package written in Perl that uses the ftp protocol to
    duplicate a directory hierarchy between the machine it is run on and a
    remote host.  It avoids copying files unnecessarily by comparing the
    file timestamps and sizes before transfering.  Amongst other things
    can optionally compress, gzip, and split files.
    
    It was written for use by archive maintainers but can be used by
    anyone wanting to transfer a lot of files over ftp.
    
    
    INSTALLATION:
    You *may* need to change the values of $extra_path and $big_temp at
    the start of mirror.pl.  This is very unlikely but possible.
    
    If your system limits the length of a file name a lot then also look for:
    	LIMITED NAMELEN
    which is about 75% of the way thru mirror.pl.  I only know of one site using
    this.
    
    
    IF INSTALLING MIRROR JUST FOR ARCHIVE MAINTENANCE:
    
    Normally pick a directory that you want to run mirror from.  Unravel the tar
    image in that directory.  Edit the mirror.defaults to reflect local settings.
    
    IF YOU ARE PLANNING ON MAKING MIRROR AVAILABLE AS A USER COMMAND:
    
    Install into a publically accessible lib area (for example
    /usr/local/lib/mirror) and add a symlink from a suitable bin area to
    the mirror.pl in the lib directory.  It this is not possible given
    your local setup install all the .pl scripts into a lib area that will
    be scanned by perl and install the binary in a suitable bin.
    
    
    If h2ph has been run for your system then you should probably remove
    socket.ph and use the one *meant* for your machine.  If h2ph has not
    been run then you should persuade your systems administrators to do
    so.  The contents of socket.ph are operating system specific and it is
    possible that what works for me will not work for you.
    
    A special note for Solaris 2.x users.  The socket.ph created by h2ph doesn't
    work.  Install the socket.ph-solaris from this distribution instead.
    
    There seems to be a problem with older versions of perl that causes
    mirror to fail with the message 'fstype unix unknown'.  If you experience
    this then please upgrade your perl.  The latest perl can be found in
    src.doc.ic.ac.uk:gnu/perl-4.036.tar.gz  (the exact version number may
    be different).
    
    AVAILABILITY:
    The latest version of mirror is available from:
    
    	src.doc.ic.ac.uk [146.169.2.1]
    		directory: computing/archiving/mirror
    		(shortcut packages/mirror)
    	
            ftp.th-darmstadt.de [130.83.55.75]
            	directory: pub/networking/mirror
    
    
    	ftp.sun.ac.za [146.232.212.2]
    		directory: pub/packages/mirror
    
    
    RELATED:
    Mirror is part of a family of related programs.  The others are ftpmail
    and ftpcat.  Ftpmail is a mail responder and ftpcat cats a remote file.
    These are to be found in src.doc.ic.ac.uk:packages/ftpmail/
    and packages/ftpcat/.
    
    If you are interested in developing mirror (not just getting the
    latest releases but actually doing work) there is a mailing list
    mirror-people@doc.ic.ac.uk.  Subscribe by emailing to
    mirror-people-request@doc.ic.ac.uk.   But please do NOT do this unless you
    have the time to work on mirror.
    
    
    
    
    REMEMBER:
    
    Objects in a mirror are closer than you think!
    
    David MacKay <mackay@mrao.cam.ac.uk>
    Last modified: Wed Dec 11 17:39:15 1996