.ad l .nh .TH masterslave 1 "2 Mar 1994" "netlib" .SH NAME masterslave - decide how to synchronize slave with master .SH SYNOPSIS .B "masterslave" \fImaster.crc\fP \fIslave.crc\fP > \fIcommands\fP .PP .B "masterslave" -i \fImaster.lsr\fP \fIold.crc\fP > \fImaster.crc\fP .SH DESCRIPTION \fBMasterslave\fP compares two checksum files produced by \fIcrc\fP and prints a list of commands that, when executed by \fImirror\fP, will bring the slave system into synch with the master. .PP Ordinarily the master site updates \fImaster.crc\fP periodically and publishes the file where slave sites can conveniently get it. The slaves, either periodically or when prompted, updates its own list of checksums and then uses \fImasterslave\fP to decide what needs to be done. .PP To make the updating of \fImaster.crc\fP more efficient, the incremental form of the command, \fImasterslave -i\fP, takes an (inexpensive) \fImaster.lsr\fP file, the result of an \fIlsr -t\fP command, and a possibly out-of-date \fIold.crc\fP file and recompute checksums only for files whose date or length has changed. .PP Separating the functionality between \fImasterslave\fP, which decides what to do, and \fImirror\fP, which actually does it, is useful for easily inserting security and plausibility checks, for performing systematic renaming, and for building alerting services. .SH EXAMPLES .PP In the most straightforward use, .B rcp master:master.crc . lsr | crc > slave.crc masterslave master.crc slave.crc | mirror ftp netlib.att.com . /netlib/crc/net/compressed .PP An example of incremental update is: .B lsr -t > master.lsr masterslave -i master.lsr master.crc > /tmp/crc || exit 1 cp /tmp/crc master.crc rm master.lsr /tmp/crc .SH SEE ALSO .B lsr(1), crc(1), mirror(1) .SH AUTHOR Eric Grosse .