masterslave(1) (2 Mar 1994) masterslave(1) NAME masterslave - decide how to synchronize slave with master SYNOPSIS masterslave _m_a_s_t_e_r._c_r_c _s_l_a_v_e._c_r_c > _c_o_m_m_a_n_d_s masterslave -i _m_a_s_t_e_r._l_s_r _o_l_d._c_r_c > _m_a_s_t_e_r._c_r_c DESCRIPTION MMMMaaaasssstttteeeerrrrssssllllaaaavvvveeee compares two checksum files produced by _c_r_c and prints a list of commands that, when executed by _m_i_r_r_o_r, will bring the slave system into synch with the master. Ordinarily the master site updates _m_a_s_t_e_r._c_r_c 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 _m_a_s_t_e_r_s_l_a_v_e to decide what needs to be done. To make the updating of _m_a_s_t_e_r._c_r_c more efficient, the incremental form of the command, _m_a_s_t_e_r_s_l_a_v_e -_i, takes an (inexpensive) _m_a_s_t_e_r._l_s_r file, the result of an _l_s_r -_t com- mand, and a possibly out-of-date _o_l_d._c_r_c file and recompute checksums only for files whose date or length has changed. Separating the functionality between _m_a_s_t_e_r_s_l_a_v_e, which decides what to do, and _m_i_r_r_o_r, which actually does it, is useful for easily inserting security and plausibility checks, for performing systematic renaming, and for building alerting services. EXAMPLES In the most straightforward use, rcp master:master.crc . lsr | crc > slave.crc masterslave master.crc slave.crc | mirror ftp netlib.att.com . /netlib/crc/net/compressed An example of incremental update is: lsr -t > master.lsr masterslave -i master.lsr master.crc > /tmp/crc || exit 1 cp /tmp/crc master.crc rm master.lsr /tmp/crc SEE ALSO lsr(1), crc(1), mirror(1) AUTHOR Eric Grosse Page 1 netlib (printed 3/14/95)