Whole document tree Mirror MasterLee McLoughlinZoë LeechWarningmm is not for the faint-heartedIntroductionmm [flags] [configuration file]Descriptionmm is a Perl program designed to manage the running of multiple mirrors. It will keep as many mirrors running in parallel as it can, up to a user defined maximum, automatically starting another when one finishes. It will also handle locking so that only one mirror of a package can occur at a time and allows configuration of the minimum time between attempts to mirror a package.mm presumes that all the package details are stored in a directory called packages. All the packages for a given site must be in a file whose name is the same as that of the site. So in packages/sunsite.org.uk will be all the package details for the host sunsite.org.uk. Flagsmm -d mmin will pass mirror the -d flag (so mirror will run in debug mode). Configuration FileThe configuration file is parsed as a series of statements. Blank lines and lines beginning with a hash are ignored. There are are two kinds of statements: control statements and site:package details.Control statements are of the form:
Statements are obeyed in sequence as they are reached. Here is a list of the keywords and their values and any defaults: site:package min-restart-last-ok min-restart-last-notok mirror-argsThe site and package fields are matched against those in the files in the packages directory. A mirror for this site:package will only be run if the last mirror run was successful and was more than min-restart-last-ok hours ago. If the last mirror of this was unsuccessful then min-restart-last-notok will be used to decide if the mirror will be run. The information about the last mirror run is stored in a file called mm.status in the directory defined by home ExamplesHere is a mm configuration file to manage the mirroring of two packages.
max=1 cmd=/usr/bin/rm -f /public/mirror/tmp home=/public/mirror ftp.cl.cam.ac.uk:JIPS-nrs 20 20
However maintaining this file where there are a large number of mirrors
can be a problem. To overcome this the program pkgs_to_mmin, was
home=/public/mirror cmdin=./pkgs_to_mmin packages/*
See Alsoperl(l), ftp(1), mirrorAuthorWritten by Lee McLoughlin <lmjm@icparc.ic.ac.uk>. |