here's what you've waited for:			-don



TRACK(1)            UNIX Programmer's Manual             TRACK(1)



NAME
     track -- maintain files between machines

SYNOPSIS
     track [ - FSTcdfimnpqsvwx ] _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t

DESCRIPTION
     Track supports a _l_i_b_r_a_r_i_a_n/_s_u_b_s_c_r_i_b_e_r model of file
     update.  That is, subscribing machines are able, but
     not obliged, to stay in synch with librarian machines'
     file-system contents.

     The file _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t contains a description of
     those files, directories, devices, & links which are to
     be kept up-to-date on the subscriber machines.  The
     _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t'_s file-system-description must follow
     a particular syntax, which is described in subscrip-
     tionlist(5).  For a prototype, see the usual default,
     /srvd/etc/athena/lib/slists/sys_rvd.  The general
     default is <workdir>/slists/sys_rvd, where <workdir> is
     the "local working directory", as described under the
     -d option below.

     When track is invoked with the -w option (i.e. as the
     _l_i_b_r_a_r_i_a_n machine), track follows the
     _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t'_s directions to traverse the
     librarian's file-system, and creates a _s_t_a_t_f_i_l_e con-
     taining currentness information about the files that
     are available to other machines.  The _s_t_a_t_f_i_l_e, whose
     default path is /srvd/etc/athena/lib/stats/sys_rvd,
     contains currentness info for each of the librarian's
     exported files, including file-type, mod-time, uid,
     gid, permissions, device-type, link-value & checksum.
     It is not particularly human-legible.  This is a
     performance-hack, allowing the subscribers to avoid
     net-accesses except when librarian files need to be
     copied.

     When track is invoked without -w (i.e. as the _s_u_b_-
     _s_c_r_i_b_e_r machine), the _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t is used to
     decide what local files are to be considered for possi-
     ble updating.  The _s_t_a_t_f_i_l_e is used to decide whether
     each local file should be updated: any differences in
     currentness will cause track to update the local file
     from the librarian's version.  The librarian machine is
     specified as an NFS mount-point with the -F option.
     The default librarian is /srvd.

     It is possible for the librarian & subscribers to use
     different _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t_s. In general, the librarian
     "exports" a catalog (the _s_t_a_t_f_i_l_e ), and each sub-
     scriber may "import" as much or as little of this



Printed 4/21/88           18 April 1988                         1






TRACK(1)            UNIX Programmer's Manual             TRACK(1)



     catalog's offering as he wishes.  If the librarian's &
     subscribers' _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t_s differ, only those files
     which are specified in both lists can be updated.

     Track is unforgiving when writing a statfile, but it
     tries to forgive errors when updating.  This design-
     policy discourages bogus statfiles and partial updates.
     Any errors are logged in the file TRACKLOG.  This is
     useful for patching an update that breaks.

     The most commonly-used options are:

     -F<fromdir>
          Specify the source ( librarian) root-directory or
          mount-point.  The default value is /srvd.

     -T<todir>
          Specify the destination root directory, or mount-
          point. The default is /.

     -c   When updating, compare each regular file's check-
          sum with the corresponding checksum on the
          librarian-mountpoint.  The librarian's checksums
          are always recorded in the _s_t_a_t_f_i_l_e. -c slows the
          update, but the checksums enable track to detect
          file-system corruption.

     -d<workdir>
          Change the local working directory (i.e. the
          directory on the local machine) to _w_o_r_k_d_i_r. The
          default is /mnt/etc/athena/lib, where /mnt is the
          librarian mount-point.  The working directory is
          the place where track will look for _s_t_a_t_f_i_l_e_s
          (e.g., stats/sys_rvd), and _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t_s
          (_e._g., _s_l_i_s_t_s/_s_y_s__r_v_d). In order to write a stat-
          file (-w option), track must have permission to
          write in its local working directory.

     -f   Force the update.  Don't be gentle about what is
          destroyed.  Normally track is very cautious about
          files being destroyed by an update.

     -n   Do nothing, just produce a list of files that need
          updating (disabled by -w), and the anticipated
          consequences of doing the update.  This output
          goes to stderr, but not into the TRACKLOG.

     -s <statfile>
          -s - Use the named file as the statfile, or use
          stdio if "-s -" is used.  The default is
          <workdir>/stats/sys_rvd, where <workdir> is the
          working-dir specified by the -d option.



Printed 4/21/88           18 April 1988                         2






TRACK(1)            UNIX Programmer's Manual             TRACK(1)



     -v   Produces a very verbose description of what is
          happening during the update: which files get
          updated, and why. This output goes to stderr, but
          not into the TRACKLOG.

     -w   Write out a _s_t_a_t_f_i_l_e. This flag is always used by
          the _l_i_b_r_a_r_i_a_n machine and never used by the _s_u_b_-
          _s_c_r_i_b_e_r machine(s).  This option turns on -c.

     The less commonly-used options:

     -i   Include devices and special files in update.

     -m[recipient]
          ( Currently broken) Mail stdout and stderr to the
          recipient.  The default recipient is root.

     -p   Parse only and produce a verbose description of
          the fields in the _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t. This can be
          useful when track complains about syntax errors in
          the subscriptionlist.  The output goes to stderr.

     -q   Be quiet, i.e. don't complain about non-fatal
          errors.  The most common non-fatal error occurs
          when the _l_i_b_r_a_r_i_a_n'_s statfile is out-of-date, so
          that the subscriber tries to import deleted files.

     -x   Display debugging information ( minimal).

     -S <max_path_depth>
          Specify deeper path stacks; this is an internal
          implementation parameter.  Track is supposed to
          tell you when to use -S, and how to use it.  Since
          the default depth accomodates pathnames with ~50
          components, this option is seldom used.

EXAMPLES
track
    Update the local root's contents from the corresponding
        contents of /srvd, according to the constraints
        specified in the default subscriptionlist & stat-
        file. This is what the Athena script update_ws does.
track -p daily
    Parse the _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t named "daily" and print a
        verbose listing of the contents. This command is
        very helpful when trying to debug freshly modified
        _s_u_b_s_c_r_i_p_t_i_o_n_l_i_s_t_s.
track -w hourly
    Act as the _l_i_b_r_a_r_i_a_n and output a _s_t_a_t_f_i_l_e for the _s_u_b_-
        _s_c_r_i_p_t_i_o_n_l_i_s_t named "hourly".

track hourly -w -q



Printed 4/21/88           18 April 1988                         3






TRACK(1)            UNIX Programmer's Manual             TRACK(1)



    Same as above, but non-fatal errors will be ignored.

attach paris:root
track daily -F/paris/root
    Act as a _s_u_b_s_c_r_i_b_e_r machine and get the updates from
        root directory on the machine named "paris".

track -n daily
    Act as a _s_u_b_s_c_r_i_b_e_r, but do not perform any updates.
        Instead, print a listing of the updates that should
        be made.  This is analogous to "make -n".  Invoking
        track with the -n flag is a safe way to preview what
        will happen before track is turned loose on a new
        machine.

track -w sys_rvd -s - -F/source \
 | track sys_rvd -s - -F/source -T/target -c
    Backup to /target those of /source's contents that are
        specified in sys_rvd, but only if /target has a dif-
        ferent version.  It is best to run this on /target's
        machine, so that only reads are networked.

FILES
      /source/4.3/etc.athena/track/*
      /srvd/etc/athena/lib/slists/sys_rvd
      /srvd/etc/athena/lib/stats/sys_rvd
      /usr/adm/TRACKLOG
      /tmp/sys_rvd.started

SEE ALSO
     subscriptionlist(5), statfile(5), permissions(5),
     cron(8)

     When Network File Systems Aren't Enough: Automatic File
     Distribution Revisited
     by Daniel Nachbar

AUTHOR
     Daniel Nachbar (AT&T); rewritten for bug-fixing, speed,
     -c option, & extra link-support by Don Davis (Athena);
     NFS-conversion done by Rob French (Athena).

BUGS
     -m option doesn't work.

     If, under -n, the subscriptionlist-entry's topmost tar-
     get directory doesn't exist, the simulated update
     raises many more errors than would the true update.

     Needs a -C (comparison mount-point) option.

     Can't handle pathnames longer than 256 chars.



Printed 4/21/88           18 April 1988                         4



