


     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



     NNNNAAAAMMMMEEEE
          bru - backup and restore utility

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
          bbbbrrrruuuu mmmmooooddddeeeessss [ ccccoooonnnnttttrrrroooollll ooooppppttttiiiioooonnnnssss ] [ sssseeeelllleeeeccccttttiiiioooonnnn ooooppppttttiiiioooonnnnssss ] files

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
          _B_r_u is a UUUUnnnniiiixxxx filesystem  backup  utility  with  significant
          enhancements  over  other more common utilities such as _t_a_r,
          _c_p_i_o, _v_o_l_c_o_p_y, and _d_d.  Some of _b_r_u's capabilities include:

               o  Full or  incremental  backup  with  quick  and  easy
                  restoration of files.
               o  Multiple physical volumes per archive.
               o  Data integrity assurance via checksum computation on
                  every archive block.
               o  Ability to properly save  and  restore  directories,
                  symbolic  links,  block special files, and character
                  special files.
               o  Comparison  of  archives  with   current   directory
                  hierarchy.
               o  Ability to recover files from corrupted archives  or
                  damaged media with minimal data loss.
               o  No inherent maximum archive buffer size.
               o  Improved performance through random  access  archive
                  I/O when available.
               o  Automatic byte or half word  swapping  as  necessary
                  when reading archives produced on other machines.
               o  Recognition of filename generation patterns  in  the
                  same  form  as  the  shell  for  files  read from an
                  archive.

          When _f_i_l_e_s are  specified  on  the  command  line  then  the
          actions  to  be  performed are limited to those _f_i_l_e_s.  If a
          named file is a directory then it and  all  its  descendents
          are  used.   If  no _f_i_l_e_s are specified then the default for
          writing archives is all  files  in  and  below  the  current
          directory.  The default for reading archives is selection of
          all files in the archive.

          If "-" is given instead of _f_i_l_e_s then the standard input  is
          read to obtain the file list.  This is useful in conjunction
          with the _f_i_n_d command to provide finer  control  over  files
          selected for backup.  Obviously this mode is only valid when
          _b_r_u is not also reading its archive from the standard input.

     DDDDEEEEFFFFAAAAUUUULLLLTTTTSSSS
          Various default parameters, such as archive device name  and
          size,  archive  buffer size, controlling terminal name, etc.
          are system dependent.  These defaults, along  with  version,
          variant,  and  other miscellaneous internal  information may
          be discovered via the ----hhhh mode.



     Page 1                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



     MMMMOOOODDDDEEEESSSS
          One or more of the following modes must be  specified.   The
          order  of  execution,  from  highest  priority to lowest, is
          eeeecccciiiittttxxxxddddgggghhhh.

          ----cccc        CCCCrrrreeeeaaaatttteeee a new archive.  Forces a new archive to  be
                    created   regardless   of  whether  one  currently
                    exists.  Writing starts at the first block.

          ----dddd        DDDDiiiiffffffffeeeerrrreeeennnncccceeeessss between  archived  _f_i_l_e_s  and  current
                    _f_i_l_e_s are detected and reported.  May be specified
                    more than once, as ----dddddddd ----dddddddddddd or  ----dddddddddddddddd  to  control
                    level of difference checking.

                    When specified as ----dddd _b_r_u reports when it discovers
                    that  a  regular file's size (st_size) or contents
                    (when compared as byte streams) has changed  since
                    the archive was made.

                    When  specified  as  ----dddddddd  _b_r_u  reports  additional
                    differences in modification date (st_mtime) access
                    mode (st_mode), number  of  links  (st_nlink)  for
                    non-directory  files,  differences in the contents
                    of symbolic links, owner id (st_uid), and group id
                    (st_gid).

                    When specified  as  ----dddddddddddd  _b_r_u  reports  additional
                    differences  in  host device (st_dev), major/minor
                    device (st_rdev) for special files,  and  time  of
                    last access (st_atime) for regular files.

                    When  specified   as   ----dddddddddddddddd   _b_r_u   reports   all
                    differences  except  time  of  last  status change
                    (st_ctime is not resettable),  major/minor  device
                    numbers  for  non-special files (meaningless), and
                    size differences for  directory  files  (may  have
                    empty  entries).  The ----dddddddddddddddd mode is generally only
                    meaningful during a verification  pass  with  full
                    backups of quiescent filesystems.

          ----eeee        EEEEssssttttiiiimmmmaaaatttteeee media requirements for  archive  creation
                    with  same  arguments.  Prints estimated number of
                    volumes, number of files  to  be  archived,  total
                    number  of  archive  blocks,  and  total  size  of
                    archive  in  kilobytes.   If  the  media  size  is
                    unknown  or  unspecified,  it  is  assumed  to  be
                    infinite.

          ----gggg        Dump archive info block  in  a  form  more  easily
                    parsed   by   programs   implementing  a  complete
                    filesystem management package.  Performs no  other
                    archive actions.



     Page 2                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          ----hhhh        Print hhhheeeellllpppp summary of options.  Also  prints  some
                    internal  information  such  as version number and
                    default values for archive pathname,  media  size,
                    archive buffer size, etc.

          ----iiii        IIIInnnnssssppppeeeecccctttt archive for internal consistency and  data
                    integrity.   When ----vvvvvvvv option is also given, prints
                    information from archive header block.

          ----tttt        List ttttaaaabbbblllleeee of contents of archive.  When used with
                    the  ----vvvv  option  will  give  a  verbose  table  of
                    contents  in  the  same  format  as  the  "ls  -l"
                    command.   When used with the ----vvvvvvvv option will also
                    indicate what files are linked to other files, and
                    where symbolic links point to.

          ----xxxx        EEEExxxxttttrrrraaaacccctttt named _f_i_l_e_s from archive.  If an  archived
                    file  is extracted (see ----uuuu option) then the access
                    mode, device id (special files only),  owner  uid,
                    group  uid, access time, and modification time are
                    also restored.  If  the  ----CCCC  flag  is  given  (see
                    below),  then  the owner uid and group uid will be
                    changed to that of the current user.

                    Nonexistent   directories   are   recreated   from
                    archived  directories  if possible, otherwise they
                    are created  with  appropriate  defaults  for  the
                    current  user.   Extracted  or created directories
                    are initially empty.

     CCCCOOOONNNNTTTTRRRROOOOLLLL OOOOPPPPTTTTIIIIOOOONNNNSSSS
          Many of the control options are similar in function to their
          _t_a_r or _c_p_i_o equivalents.

          Sizes are specified in bytes.  The scale factors MMMM, kkkk, or bbbb,
          can  be  used  to indicate multiplication by 2**20, 1024, or
          512  respectively.   Thus  "10k",  "20b",  and  "10240"  all
          specify the same number of bytes.

          ----#### _s_t_r    Use string _s_t_r as a control string for  the  built
                    in   debugging   system.    This  option  provides
                    information about the internal workings of _b_r_u for
                    the  software  maintainer  or  the merely curious.
                    Some examples are given later.

          ----aaaa        Do not reset the aaaacccccccceeeessssssss times of disk  files  that
                    have  been  read  while  performing other actions.
                    Normally _b_r_u restores the access and  modification
                    times  of  disk  files  after they have been read.
                    Resetting  the  times  prevents  defeat   of   the
                    mechanism  used  to  track  down and remove "dead"
                    files that haven't been accessed in any meaningful



     Page 3                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



                    way recently.

          ----bbbb _b_s_i_z_e  Use _b_s_i_z_e as the archive input/output bbbbuuuuffffffffeeeerrrr size.
                    The minimum is the size of an archive block (2k or
                    2048 bytes)  and  the  maximum  is  determined  by
                    available  memory  and I/O device limitations.  If
                    _b_s_i_z_e is not an even multiple of  2048  bytes,  it
                    will  be rounded up.  Normally this option is only
                    required with the ----cccc mode since  _b_r_u  writes  this
                    information  in  the  archive  header  block.   If
                    specified, _b_s_i_z_e overrides  any  existing  default
                    value  (generally  20k),  whether built in or read
                    from the archive header.

          ----BBBB        Useful in shell scripts where _b_r_u is  run  in  the
                    bbbbaaaacccckkkkggggrrrroooouuuunnnndddd  with no operator present.  Under these
                    conditions, _b_r_u simply terminates with appropriate
                    error  messages and status, rather than attempting
                    interaction with the terminal.

          ----CCCC        Change  the  owner  (cccchhhhoooowwwwnnnn)  and  group  of   each
                    extracted  file  to the owner uid and group gid of
                    the current user.  Normally, _b_r_u will restore  the
                    owner  and group to those recorded in the archive.
                    This flag causes bru to follow the system default,
                    with  extracted  files  having  the same owner and
                    group as the user  running  _b_r_u,  including  Root.
                    (Under  4.2 BSD,  the default group is that of the
                    directory in which the file is created.)

                    The ----CCCC option is  useful  with  archives  imported
                    from  other systems.  In general, it should not be
                    used by the operator or system administrator  when
                    restoring  saved files.  Use the ----ttttvvvv option to see
                    the  owner  and  group  of  files  stored  in  the
                    archive.

          ----ffff _p_a_t_h   Use _p_a_t_h  as  the  archive  ffffiiiilllleeee  instead  of  the
                    default.   If  the  _p_a_t_h  is "-" then _b_r_u uses the
                    standard input for  archive  reading  or  standard
                    output for archive writing, as appropriate.

          ----FFFF        FFFFaaaasssstttt mode.  In fast  mode,  checksum  computations
                    and comparisons are disabled.  This mode is useful
                    when the output of one _b_r_u is piped to  the  input
                    of  another _b_r_u, or when the data integrity of the
                    archive   transmission   medium   is   essentially
                    perfect.  Archives recorded with fast mode enabled
                    must also be read with fast mode.  Also, be  aware
                    that  some  of the automatic features of _b_r_u, such
                    as automatic byte swapping, are not functional  in
                    fast mode.



     Page 4                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          ----LLLL _s_t_r    LLLLaaaabbbbeeeellll the archive with the specified  string  _s_t_r.
                    _S_t_r  is  limited  to  63 characters and is usually
                    some meaningful reminder pertaining to the archive
                    contents.

          ----llll        Ignore unresolved  lllliiiinnnnkkkkssss.   Normally  bru  reports
                    problems  with  unresolved links (both regular and
                    symbolic links).  This option suppresses all  such
                    complaints.

          ----mmmm        Do not cross mmmmoooouuuunnnntttteeeedddd file system boundaries during
                    expansion  of  explicitly named directories.  This
                    option applies only to directories named in _f_i_l_e_s.
                    It  limits  selection  of directory descendents to
                    those  located  on  the  same  filesystem  as  the
                    explicitly named directory.  This option currently
                    applies only to the ----cccc and ----eeee modes.

          ----pppp        PPPPaaaassssssss over files in archive by reading rather  than
                    seeking.   Normally  _b_r_u  will  use  random access
                    capabilities if  available.   This  option  forces
                    reading instead of seeks.

          ----RRRR        RRRReeeemmmmooootttteeee files are to be eeeexxxxcccclllluuuuddddeeeedddd from the  archive.
                    If the system does not support remote filesystems,
                    this option is ignored.

          ----ssss _m_s_i_z_e  Use _m_s_i_z_e as the media ssssiiiizzzzeeee.  The effective  media
                    ssssiiiizzzzeeee  will be computed from _m_s_i_z_e since it must be
                    integral multiple of the input/output buffer  size
                    (see the ----bbbb option).  Normally this option is only
                    required with the ----cccc mode since  _b_r_u  writes  this
                    information  in  the  archive  header  block.   If
                    specified, _m_s_i_z_e overrides  any  existing  default
                    value,  whether  built in or read from the archive
                    header.

          ----vvvv        Enable vvvveeeerrrrbbbboooosssseeee mode.  May be specified  more  than
                    once,  as  ----vvvvvvvv,  ----vvvvvvvvvvvv,  or ----vvvvvvvvvvvvvvvv, to get even more
                    verbosity.

          ----wwww        WWWWaaaaiiiitttt for confirmation.  _B_r_u will  print  the  file
                    name,  the  action  to  be  taken,  and  wwwwaaaaiiiitttt  for
                    confirmation.  Any  response  beginning  with  'y'
                    will  cause  the  action  to  complete.  Any other
                    response will abort the action.

     FFFFIIIILLLLEEEE SSSSEEEELLLLEEEECCCCTTTTIIIIOOOONNNN OOOOPPPPTTTTIIIIOOOONNNNSSSS
          The file selection options control which files are  selected
          for  processing.  Note that some options are only valid with
          specific modes.




     Page 5                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          ----nnnn _d_a_t_e   Select only files nnnneeeewwwweeeerrrr than _d_a_t_e.   The  _d_a_t_e  is
                    given in one of the forms:

                         DD-MMM-YY[,HH:MM:SS]   EX: 12-Mar-84,12:45:00
                         MM/DD/YY[,HH:MM:SS]    EX: 3/12/84
                         MMDDHHMM[YY]           EX: 0312124584
                         pathname               EX: /etc/lastfullbackup

                    The time of day  is  optional  in  the  first  two
                    forms.   If present, it is separated from the date
                    with a comma.

                    If _d_a_t_e is really the pathname of a file, then the
                    modification  date  of  that  file  will  be  used
                    instead.  This is useful in automated backups when
                    a dummy file is "touched" to save the date of last
                    backup.

          ----oooo _u_s_e_r   Select only files oooowwwwnnnneeeedddd  by  _u_s_e_r.   _U_s_e_r  may  be
                    specified in one of three ways:

                         o  As an ascii string corresponding to a user
                            name in the password file.
                         o  As the pathname of a file  in  which  case
                            the owner of that file is used.
                         o  As a numeric value (decimal).

          ----uuuu _f_l_a_g_s  When used in  conjunction  with  ----xxxx  mode,  causes
                    files   of   type   specified   by   _f_l_a_g_s  to  be
                    uuuunnnnccccoooonnnnddddiiiittttiiiioooonnnnaaaallllllllyyyy     selected     regardless     of
                    modification   times.    Normally   _b_r_u  will  not
                    overwrite (supersede) an  existing  file  with  an
                    older  archive file of the same name.  Files which
                    are not superseded will give warnings  if  vvvveeeerrrrbbbboooosssseeee
                    mode level 2 (----vvvvvvvv) or higher is enabled.  Possible
                    characters for _f_l_a_g_s are:

                         bbbb    select block special files
                         cccc    select character special files
                         dddd    select directories
                         llll    select symbolic links
                         pppp    select fifos (named pipes)
                         rrrr    select regular files

                    Selection of directories only implies  that  their
                    attributes  may be modified.  Existing directories
                    are never overwritten, this option  merely  allows
                    their attributes to be set back to some previously
                    existing state.

                    Selection of symbolic links only implies that  the
                    contents  of  the  link  will  be modified.  It is



     Page 6                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



                    currently  impossible  under  4.2 BSD  to   change
                    access  time,  modification time, or the file mode
                    of a symbolic link.

     EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
          Create (----cccc) a new archive of  all  files  under  "/usr/src",
          writing  archive  to  file  (----ffff)  "/dev/rmt0" using multiple
          tapes with a maximum size (----ssss) of 30 megabytes per tape.

               bru -c -f /dev/rmt0 -s 30M /usr/src

          Create (----cccc) a new archive on the default device in the first
          pass, archiving all files in and below the current directory
          which have been created or modified (----nnnn)  since  3  P.M.  on
          14-Jan-84.   Then  do a second pass to verify that there are
          no differences (----dddd) between the archive and  current  files.
          Each file is listed (----vvvv) as it is processed.

               bru -cvd -n 14-Jan-84,15:00:00

          Archive all files owned  (----oooo)  by  user  "user1"  using  the
          default archive device.

               find / -user user1 -print | bru -c -
               bru -c -o user1 /

          Copy a directory hierarchy from "/usr/u1" to "/usr/u2".

               (cd /usr/u1; bru -cf - ) | (cd /usr/u2; bru -xf -)

          Extract   (----xxxx)   the   regular   file    "/usr/guest/myfile"
          unconditionally   (----uuuurrrr)   from   an  archive  on  file  (----ffff)
          "/dev/rf0".  Since the  device  size  was  recorded  in  the
          header  block,  it  need not be specified.  Note that option
          arguments  do  not  need  to   be   separated   from   their
          corresponding option flag by whitespace.

               bru -x -ur -f/dev/rf0 ./usr/guest/myfile

          Extract (----xxxx) all C source files in "/usr/src/cmd" that  have
          names  beginning with characters 'a' through 'm'.  Wait (----wwww)
          for confirmation before extracting each file.

               bru -xw '/usr/src/cmd/[a-m]*.c'

          Inspect (----iiii) a previously created  archive  on  the  default
          device,  dumping  the  contents  of  the  header  block  for
          inspection (----vvvvvvvvvvvv) and  verifying  internal  consistency  and
          data integrity of the archive.

               bru -ivvv




     Page 7                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          Perform the same function as the last example except  enable
          various  features of the built in debugger (when linked in).
          The  debug  control  string  is  a  string   of   the   form
          "-#<opt1>:<opt2>:...",  where each option is either a single
          flag character or a  flag  character  followed  by  a  comma
          separated  list.   Available flag characters are: 'd' enable
          debugging for list of keywords, 'f' limit debugging to  list
          of  function  names,  'F'  print source file name, 'L' print
          source file line  numbers,  'n'  print  nesting  depth,  'o'
          redirect  output to listed file, 'p' print process name, 't'
          enable tracing.

               bru -ivvv -#t
               bru -ivvv -#d:t
               bru -ivvv -#d,ar_io,verify:F:L
               bru -ivvv -#d:f,ar_seek
               bru -ivvv -#d:o,trace.out:t:p

          Back up the entire root filesystem without crossing  mounted
          (----mmmm)  filesystem boundaries.  The archive will be written to
          file (----ffff) "/dev/rmt0" using an I/O buffer size (----bbbb)  of  10k
          bytes.   A  record of all files processed will be written to
          file "brulogfile" for future reference.

               cd /
               bru -cvm -f /dev/rmt0 -b 10k >brulogfile

     DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
          Most diagnostics are reasonably informative. The most common
          have   to  do  with  meaningless  combinations  of  options,
          incompatible  options,  hitting  memory  or  device  limits,
          unresolved   file   links,  trying  to  archive  or  restore
          something to which access is normally  denied,  or  problems
          with media errors and/or archive corruption.

     DDDDEEEEVVVVIIIICCCCEEEE TTTTAAAABBBBLLLLEEEE
          _B_r_u contains an internal table of known  devices  and  their
          characteristics.   This  table  is dynamically loaded from a
          data file specified by the environment variable  BBBBRRRRUUUUTTTTAAAABBBB,  or
          from ////eeeettttcccc////bbbbrrrruuuuttttaaaabbbb, or from an internal default description if
          neither of the preceding is found.

     SSSSIIIIGGGGNNNNAAAALLLL HHHHAAAANNNNDDDDLLLLIIIINNNNGGGG
          _B_r_u  normally  catches  both  interrupt  (SIGINT)  and  quit
          (SIGQUIT).  When interrupt is caught during archive creation
          or extraction, _b_r_u completes its work on  the  current  file
          before  cleaning  up and exiting.  This is the normal way of
          aborting _b_r_u.  When a quit signal  is  caught  an  immediate
          exit is taken.

          Note that during file extraction, a quit  signal  may  leave
          the  last  file only partially extracted.  Similarly, a quit



     Page 8                                         (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          signal  during  archive  writing  may  leave   the   archive
          truncated.   When  either interrupt or quit is caught at any
          other time an immediate exit is taken.

     EEEERRRRRRRROOOORRRR RRRREEEECCCCOOOOVVVVEEEERRRRYYYY
          When  properly  configured  for  a  given  software/hardware
          environment,  bru  can recover from most common errors.  For
          example, attempts to use  unformatted  media  are  detected,
          allowing  substitution of formatted media.  Random blocks in
          an  archive  can  be  deliberately  overwritten  (corrupted)
          without  affecting  _b_r_u's  ability  to recover data from the
          rest of the archive.  When I/O errors are detected,  retries
          are  performed  automatically.   Out  of order sequencing on
          multi-volume archive reads is detected, allowing replacement
          with the correct volume.

     DDDDIIIIRRRREEEECCCCTTTTOOOORRRRIIIIEEEESSSS
          When creating  non-incremental  archives  _b_r_u  automatically
          archives all directories necessary to fully restore any file
          from  the  archive.    During   extraction,   any   required
          directories which do not already exist are restored from the
          archive  if  possible,  otherwise  they  are  created   with
          appropriate defaults for the current user.

          The net result is that restoration from incremental archives
          (which  may  not  contain  all  necessary  directories),  or
          incremental restoration from full archives (which  may  skip
          directories   needed  later),  may  result  in  creation  of
          directories with the default attributes.

     WWWWIIIILLLLDDDDCCCCAAAARRRRDDDDSSSS
          When rrrreeeeaaaaddddiiiinnnngggg archives _b_r_u recognizes  file  name  generation
          patterns  in  the  same  format  as  the shell.  This allows
          greater flexibility in specifying  files  to  be  extracted,
          compared,  or  listed.  As a special extension to shell type
          expansion, the sense of the match is reversed  for  patterns
          that begin with '!'.

          Note that the patterns may have  to  be  quoted  to  prevent
          expansion  by  the  shell.   Also  note  that  patterns  are
          processed  independently,  without  regard  for  any   other
          patterns  that  may  or  may not be present.  In particular,
          "/bin/a*   /bin/b*"  is  equivalent  to  "/bin/[ab]*",   but
          "/bin/!a*   /bin/!b*"   is   equivalent   to  "/bin/*",  nnnnooootttt
          "/bin/![ab]*".

     BBBBYYYYTTTTEEEE////WWWWOOOORRRRDDDD SSSSWWWWAAAAPPPPPPPPIIIINNNNGGGG
          While reading  archives  produced  on  other  machines,  _b_r_u
          automatically  attempts to perform byte and/or word swapping
          as necessary.

     RRRREEEEMMMMOOOOTTTTEEEE TTTTAAAAPPPPEEEE DDDDRRRRIIIIVVVVEEEESSSS



     PPPPaaaaggggeeee 9999                                         ((((pppprrrriiiinnnntttteeeedddd 11112222////22228888////88886666))))






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          On 4.2 BSD  systems,  and  System  V  systems  that  support
          networking, _b_r_u allows the use of remote tape drives for the
          archive device (via the ----ffff option).   A  remote  tape  drive
          file name has the form

               _s_y_s_t_e_m[._u_s_e_r]:/dev/???

          where _s_y_s_t_e_m is the remote system, the optional _u_s_e_r is  the
          login name to use on the remote system if different from the
          current user's login name, and ////ddddeeeevvvv////???????????? is the tape drive to
          use  (1600 BPI or 800 BPI, raw or blocked, rewinding or non-
          rewinding, etc.).  In all cases,  the  user  must  have  the
          appropriate permissions on the remote system.  (See also the
          CCCCAAAAVVVVEEEEAAAATTTTSSSS section, below.)

     EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
          _B_r_u always returns meaningful status as follows:

               0    Normal exit, no errors or warnings.
               1    Warnings (or interrupted).
               2    Errors (or quit signal).

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
          Under System V, see
          tar(1), cpio(1), volcopy(1M),  finc(1M),  frec(1M),  ff(1M),
          filesave(1M).

          Under 4.2 BSD, see
          tar(1),  dd(1),   rsh(1),   rmt(8),   dump(8),   restore(8),
          rdump(8), rrestore(8).

     AAAAUUUUTTTTHHHHOOOORRRR
          Fred Fish
          Ported from System  V  to  4.2 BSD  by  Arnold  Robbins,  at
          Georgia Tech

     UUUUNNNNIIIIXXXX SSSSYYYYSSSSTTTTEEEEMMMM IIIINNNNCCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTIIIIEEEESSSS
          _B_r_u recognizes special file types that may be allowed on one
          type of UUUUnnnniiiixxxx system, but not on another.  For instance, on a
          4.2 BSD system, _b_r_u will extract fifos as plain files  (mode
          0666,  as  modified  by the _u_m_a_s_k), and issue an appropriate
          error message.  Usually, _b_r_u will issue two  messages.   The
          first message will be the more descriptive of the two.

          Under System V, when _b_r_u sees a symbolic link, it will check
          to  see  if  the  file  to be linked to exists, and is not a
          directory.  If so, it will attempt to make a hard link.   If
          the hard link fails, _b_r_u will issue a warning.

          Pyramid corporation conditional symbolic links are also sup-
          ported.   On  a  Pyramid,  they are restored properly.  On a
          4.2 BSD system, _b_r_u will attempt a  symbolic  link  for  the



     Page 10                                        (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          file given in the UCB universe.  Under System V, it will at-
          tempt a hard link for the file given  in  the  ATT  universe
          (with  the  same  constraints  as when attempting to restore
          regular symbolic links).

          Currently, the only different UUUUnnnniiiixxxx systems  that  _b_r_u  fully
          understands are System V, 4.2 BSD, and Pyramid's OSx.

     CCCCAAAAVVVVEEEEAAAATTTTSSSS
          Pathnames are limited to 127  characters  in  length.   This
          could become a chronic problem under 4.2 BSD.

          Implementation differences complicate the algorithms for au-
          tomatic detection of end of file on devices.  The algorithms
          can be fooled, hence the ----ssss option.

          Special files moved to a machine other than  their  original
          host  will generally be useless and possibly even dangerous.
          This goes double for symbolic links.

          When extracting files from archives, patterns used to  match
          directories may result in some unnecessary directories being
          extracted.  For example, if the pattern is "a/*/c", and  the
          directory "a/b" is encountered in the archive, the directory
          file "a/b" will be extracted since it will  be  needed  when
          (and  if)  the  file "a/b/c" is encountered.  When in doubt,
          use the ----wwww option.

          In order to be able to  efficiently  archive  needed  direc-
          tories,  _b_r_u builds an image of the directory tree for _f_i_l_e_s
          using dynamically allocated memory.  Since there may  be  at
          most  5120 characters passed on the command line, it is very
          unlikely that _b_r_u will run out of memory while building  the
          tree  from command line arguments.  This is not true of file
          lists read from the standard input, particularly on machines
          with limited address space.

          Information about file linkages  is  also  kept  in  memory.
          Some linkages may be lost if memory is exhausted.

          Since _b_r_u is owned by root and runs  with  "set user id"  to
          allow  it  to create directories and special files, it makes
          every attempt to prevent normal users from archiving or  ex-
          tracting  files  they  would  normally  not  have access to.
          There may be loopholes.  Also note that anyone with physical
          or electronic access to an archive, and knowledge of the ar-
          chive structure, can recover any of its contents by  writing
          their own file extraction program.

          Directories which have filesystems mounted on them will  not
          be  properly  archived  until  the  filesystem is unmounted.
          This is not generally a problem.



     Page 11                                        (printed 12/28/86)






     BBBBRRRRUUUU((((1111))))                      UUUUNNNNIIIIXXXX 5555....0000                       BBBBRRRRUUUU((((1111))))



          Explicitly naming both a directory and one  of  its  descen-
          dents will cause the descendent to be archived twice, unless
          they are on separate filesystems and the ----mmmm flag is used.

          Explicitly naming a file more than once is ineffective.

          When reading from the raw magnetic tape  file  (rmtxxx)  _b_r_u
          automatically  attempts  to  adjust  the  I/O buffer size to
          match that used to record the archive.  Under  certain  cir-
          cumstances it may fail and require help via the ----bbbb option.

          The 4.2 BSD remote magnetic tape  protocol,  rmt(8),  allows
          writing and reading of no more than 10K bytes, so ----bbbb10k must
          be specified when reading from or writing to a  remote  tape
          drive.  Also, using remote tape drives can be slow.








































     Page 12                                        (printed 12/28/86)



