


NSR(5)                                                     NSR(5)


NNAAMMEE
       nsr - NetWorker directive file format

DDEESSCCRRIIPPTTIIOONN
       This  man  page  describes  the  format  of ..nnssrr directive
       files.  These files are interpreted by ssaavvee(8) and  Appli-
       cation  Specific  Module  (ASM) programs, during NetWorker
       backup processes.  This format is also used in the  _d_i_r_e_c_-
       _t_i_v_e attribute of the nnssrr__ddiirreeccttiivvee(5) resource.

       Directives  control how particular files are to be backed-
       up, how descendent directories are searched, and how  sub-
       sequent  directives  are processed.  For each file backed-
       up, any ASM information required to recover that  file  is
       also  backed-up.   This  enables  rreeccoovveerr(8),  or  any ASM
       directly invoked, to recover a file correctly, even if the
       current directives have changed since the file was backed-
       up.  See uuaassmm(8) for a general description of the  various
       ASMs.

       The ..nnssrr directive file in each directory is parsed before
       anything in that directory is backed up, unless  NetWorker
       is  being  run in _i_g_n_o_r_e mode.  Each line of a ..nnssrr direc-
       tive file, and each line of the ddiirreeccttiivvee attribute,  con-
       tains one directive.  Any text after a "##" character until
       the end of the line is treated as a comment and discarded.
       Directives appear in one of three distinct forms:

              [++] _A_S_M [_a_r_g_s ...] :: _p_a_t_t_e_r_n ...
              _s_a_v_e _e_n_v_i_r_o_n_m_e_n_t
              <<<< _d_i_r >>>>

       The  three  forms  are  referred to as ASM specifications,
       _s_a_v_e _e_n_v_i_r_o_n_m_e_n_t directives, and  <<<<  _d_i_r  >>>>  directives,
       respectively.


       Use  ASM specifications (name and any arguments), to spec-
       ify how files or directories with a matching  _p_a_t_t_e_r_n  are
       backed-up.  When a _p_a_t_t_e_r_n matches a directory, the speci-
       fied ASM is responsible for handling the directory and its
       contents.   Any _p_a_t_t_e_r_n or ASM arguments requiring special
       control or white space characters should be  quoted  using
       double quotes ("").

       A colon (::) is used as the separator between the ASM spec-
       ification (and any arguments) and the  _p_a_t_t_e_r_n  specifica-
       tion  list.   The  _p_a_t_t_e_r_n list for each ASM specification
       consists of simple file names or  patterns.   The  _p_a_t_t_e_r_n
       cannot  be  "...."  and  must not contain any "//" characters
       (all names must be within  the  current  directory).   The
       string  ".."  can  be  used to match the current directory.
       Standard sshh(1) file pattern matching  (*,  [...],  [!...],
       [x-y],  ?)   can  be  used  to match file names.  If a "++"



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        1





NSR(5)                                                     NSR(5)


       precedes the ASM name, then the directive is propagated to
       subdirectories.   When a directory is first visited, it is
       searched for a ..nnssrr file.  If one is  found,  it  is  then
       read.   Each ..nnssrr file is only read once.  When starting a
       save at a directory below //, any ..nnssrr files on the normal-
       ized path of the current working directory are read before
       any files are saved to catalog any propagated  directives.

       The  following  algorithm  is  used  to match files to the
       appropriate ASM specification.  First the ..nnssrr file in the
       current  directory  (if any) is scanned from top to bottom
       for an ASM specification without a leading "+" whose  _p_a_t_-
       _t_e_r_n matches the file name.  If no match is found then the
       ..nnssrr in the current directory is  re-scanned  for  an  ASM
       specification with a leading "+" whose _p_a_t_t_e_r_n matches the
       file name (for clarity, we recommend placing all propagat-
       ing  ("+") directives after all the non-propagating direc-
       tives in a ..nnssrr file).  If no match  is  found,  then  the
       ..nnssrr  file found in the "...." directory (if any) is scanned
       from top to bottom looking for a match with an ASM  speci-
       fication  that  has  a  leading ++.  This process continues
       until the ..nnssrr file in  the  "//"  directory  (if  any)  is
       scanned.   If  no match is found (or a match is found with
       an ASM specification whose name is the same  as  the  cur-
       rently  running  ASM), then the currently running ASM will
       handle the save of the file.


       Use _s_a_v_e _e_n_v_i_r_o_n_m_e_n_t directives to change how ASM specifi-
       cations and future ..nnssrr files are used.  The _s_a_v_e _e_n_v_i_r_o_n_-
       _m_e_n_t directives do  not  take  any  file  patterns.   They
       affect  the  currently  running  ASM  and  subsequent ASMs
       invoked below this directory.  There are  three  different
       possible _s_a_v_e _e_n_v_i_r_o_n_m_e_n_t directives that can be used:

       ffoorrggeett
             Forget all inherited directives (those starting with
             a "++" in parent directories).

       iiggnnoorree
             Ignore subsequent ..nnssrr  files  found  in  descendent
             directories.

       aallllooww Allow  ..nnssrr file interpretation in descendent direc-
             tories.


       The <<<< _d_i_r >>>> directive can be used to specify a directory
       where  subsequent ASM specifications from the current ..nnssrr
       file should be applied.  This directive is intended to  be
       used  to consolidate the contents of several ..nnssrr files to
       a single location or directory.  The _d_i_r portion  of  this
       directive  must  resolve  to a valid directory at or below
       the directory containing this directive or subsequent  ASM



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        2





NSR(5)                                                     NSR(5)


       specifications  will  be  ignored.   Relative  path  names
       should be used for file names to ensure the interpretation
       of  of  subsequent ASM directives is consistent, even if a
       directory is mounted in a different absolute part  of  the
       filesystem.

       There  mmuusstt  be  a  <<<<  _d_i_r >>>> as the first directive in a
       directive file used in conjunction with the --ff  option  to
       ssaavvee(8),  ssaavveeffss(8) or with an ASM program.  Also, when <<<<
       _d_i_r >>>> directives are used in this manner,  whether  first
       or  later  in the file, absolute path names should be used
       to ensure appropriate interpretation.  Absolute path names
       should  also  be  used for each directory specified within
       the ddiirreeccttiivvee attribute of the NNSSRR ddiirreeccttiivvee resource (see
       nnssrr__ddiirreeccttiivvee(5)).

       When  a <<<< _d_i_r >>>> directive is used, subsequent directives
       are parsed and logged for later  use.   When  a  directory
       specified  by  _d_i_r  is opened, any _s_a_v_e _e_n_v_i_r_o_n_m_e_n_t direc-
       tives specified for that directory  (for  example,  aallllooww,
       iiggnnoorree,  and  ffoorrggeett)  are processed first.  If the ASM is
       not currently ignoring ..nnssrr files and a  local  ..nnssrr  file
       exists,  the  file is read and processed.  Finally, any of
       the non _s_a_v_e _e_n_v_i_r_o_n_m_e_n_t  directives  specified  for  that
       directory are handled as if they where appended to the end
       of a ..nnssrr file in that directory.  If multiple <<<<  _d_i_r  >>>>
       specifications  resolve  to  the  same directory, then the
       corresponding save directives  are  handled  logically  in
       "last seen first" order.

EEXXAAMMPPLLEESS
       Having a _/_u_s_r_/_s_r_c_/_._n_s_r file containing:
              +skip: errs *.o
              +compressasm: .
       will  cause  all  files  (or  directories)  located in the
       //uussrr//ssrrcc directory named eerrrrss or **..oo  (and  anything  con-
       tained within them) to be skipped.  In addition, all other
       files contained in the _/_u_s_r_/_s_r_c  directory  will  be  com-
       pressed  during  save  and  will  be  set up for automatic
       decompression on recover.

       Having a _/_v_a_r_/_._n_s_r file containing:
              compressasm: adm .nsr
              null: * .?*
       causes all  files  (or  directories)  and  their  contents
       located  within  the _/_v_a_r directory and anything contained
       within them,  (except  for  those  files  located  in  the
       _/_v_a_r_/_a_d_m  directory  and  the  ..nnssrr  file  itself)  to  be
       skipped, although all the names in the directory would  be
       backed-up.   In addition, since ccoommpprreessssaassmm is a _s_e_a_r_c_h_i_n_g
       directive (see uuaassmm(8)), the files  contained  within  the
       _/_v_a_r_/_a_d_m  directory  will be compressed during back up and
       will be set up for automatic decompression on recover.




NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        3





NSR(5)                                                     NSR(5)


       The following is an example of using the //..nnssrr file  as  a
       master  save  directive  file for the entire filesystem by
       using <<<< _d_i_r >>>> directives to consolidate the various  ASM
       save directives to a single location:

              # Master NetWorker directive file for this machine
              << ./ >>
              # /mnt and /a are used for temporary fs mounting
              # and need not be saved
                   skip: mnt a
                   +skip: core errs dead.letter *% *~
              # Don't bother saving anything within /tmp
              << ./tmp >>
                   skip: .?* *
              << ./export/swap >>
                   swapasm: *
              # Translate all mailboxes. Also, use mailasm to save each
              # mail file to maintain mail file locking conventions and
              # to preserve the last file access time.
              << ./usr/spool/mail >>
                   xlateasm: .
                   mailasm: *
              # Allow .nsr files to be interpreted in /nsr, even if we
              # are currently ignoring .nsr files. NetWorker
              # applications (such as nsrindexd) set up their own private
              # .nsr files which save index files more intelligently.
              << ./nsr >>
                   allow
              # We can rebuild any .o files in /usr/src
              # from sources except those in /usr/src/sys.
              << ./usr/src >>
                   +skip: *.o
              << ./usr/src/sys >>
                   forget


FFIILLEESS
       ..nnssrr   save directive file in each directory

SSEEEE AALLSSOO
       sshh(1), nnssrr__ddiirreeccttiivvee(5), nnssrriinnddeexxaassmm(8), nnssrrmmmmddbbaassmm(8),
       rreeccoovveerr(8), ssaavvee(8), ssaavveeffss(8), uuaassmm(8).















NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        4


