


RESTORE(8)            MAINTENANCE COMMANDS             RESTORE(8)



NAME
     restore, rrestore - incremental file system restore

SYNOPSIS
     /usr/etc/restore -irRtx [ _f_i_l_e_n_a_m_e ...  ]

DESCRIPTION
     restore restores files from backup tapes  created  with  the
     dump(8) command.  _o_p_t_i_o_n_s is a string of at least one of the
     options listed below, along with any modifiers and arguments
     you supply.  Remaining arguments to restore are the names of
     files (or directories whose files) are  to  be  restored  to
     disk.   Unless the h modifier is in effect, a directory name
     refers to the files it contains, and (recursively) its  sub-
     directories and the files they contain.

OPTIONS
     i    Interactive.  After reading in the  directory  informa-
          tion  from  the  tape,  restore  invokes an interactive
          interface that allows you to browse  through  the  dump
          tape's directory hierarchy, and select individual files
          to be extracted.  See Interactive Commands, below,  for
          a description of available commands.

     r    Restore the entire tape.  Load the tape's full contents
          into the current directory.  This option should only be
          used to restore a  complete  dump  tape  onto  a  clear
          filesystem,  or  to  restore  an  incremental dump tape
          after a full "level 0" restore.  For example:
               example# /usr/etc/newfs /dev/rxy0g
               example# /usr/etc/mount /dev/xy0g /mnt
               example# cd /mnt
               example# restore r

          is a typical sequence to  restore  a  "level  0"  dump.
          Another  restore can be done to get an incremental dump
          in on top of this.

     R    Resume restoring.  restore requests a  particular  tape
          of  a  multivolume  set  from  which  to  resume a full
          restore (see the r option above).  This allows  restore
          to  start  from  a checkpoint when it is interrupted in
          the middle of a full restore.

     t    Table of contents.  List each _f_i_l_e_n_a_m_e that appears  on
          the  tape.   If no _f_i_l_e_n_a_m_e argument is given, the root
          directory is listed.  This results in  a  list  of  all
          files  on the tape, unless the h modifier is in effect.
          (The t option replaces the function of the old  dumpdir
          program).





Sun Release 4.1   Last change: 7 September 1988                 1






RESTORE(8)            MAINTENANCE COMMANDS             RESTORE(8)



     x    Extract the named files from the tape.  If a named file
          matches  a  directory  whose contents were written onto
          the tape, and the h modifier  is  not  in  effect,  the
          directory is recursively extracted.  The owner, modifi-
          cation time, and mode are restored (if  possible).   If
          no  _f_i_l_e_n_a_m_e  argument  is given, the root directory is
          extracted.  This  results  in  the  entire  tape  being
          extracted unless the h modifier is in effect.

  Modifiers
     Some of the following  modifiers  take  arguments  that  are
     given as separate words on the command line.  When more than
     one such modifier appears within _o_p_t_i_o_n_s, the arguments must
     appear  in  the  same order as the modifiers that they apply
     to.

     a _a_r_c_h_i_v_e-_f_i_l_e
          The dump table of contents is taken from the  specified
          _a_r_c_h_i_v_e-_f_i_l_e  instead  of  from  a  dump  tape.   If  a
          requested file is present in  the  table  of  contents,
          _r_e_s_t_o_r_e  will prompt for the tape volume to be mounted.
          If only contents information  is  needed,  for  example
          when  the  _t  option  is  specified, or the _i option is
          specified without a corresponding _e_x_t_r_a_c_t  request,  no
          dump tape will have to be mounted.

     c    Convert the contents  of  the  dump  tape  to  the  new
          filesystem format.

     d    Debug.  Turn on debugging output.

     h    Extract the actual directory,  rather  than  the  files
          that  it  references.   This prevents hierarchical res-
          toration of complete subtrees from the tape.

     m    Extract by inode numbers rather  than  by  filename  to
          avoid  regenerating complete pathnames.  This is useful
          if only a few files are being extracted.

     v    Verbose.  restore displays the name  of  each  file  it
          restores, preceded by its file type.

     y    Do not ask whether to abort the restore in the event of
          tape  errors.   restore tries to skip over the bad tape
          block(s) and continue as best it can.

     b _f_a_c_t_o_r
          Blocking factor.  Specify the blocking factor for  tape
          reads.   By default, restore will attempt to figure out
          the block size of the tape.  Note: a tape block is  512
          bytes.




Sun Release 4.1   Last change: 7 September 1988                 2






RESTORE(8)            MAINTENANCE COMMANDS             RESTORE(8)



     f _d_u_m_p-_f_i_l_e
          Use _d_u_m_p-_f_i_l_e instead  of  /dev/rmt?  as  the  file  to
          restore  from.   If  _d_u_m_p-_f_i_l_e  is  specified  as  `-',
          restore reads from the standard  input.   This  allows,
          dump(8)  and  restore  to be used in a pipeline to dump
          and restore a file system:

          example# dump 0f - /dev/rxy0g |  (cd /mnt;  restore  xf
          -)

          If the name of the file is of the  form  _m_a_c_h_i_n_e:_d_e_v_i_c_e
          the restore is done from the specified machine over the
          network using rmt(8C).  Since restore is  normally  run
          by  root,  the name of the local machine must appear in
          the .rhosts file of the remote machine.  If the file is
          specified  as _u_s_e_r@_m_a_c_h_i_n_e:_d_e_v_i_c_e, restore will attempt
          to execute as the specified user on the remote machine.
          The  specified  user  must  have  a .rhosts file on the
          remote machine that allows root from the local machine.

     s _n  Skip to the _n'th file  when  there  are  multiple  dump
          files on the same tape.  For example, the command:
               example# restore xfs /dev/nrar0 5

          would position you at the fifth file on the tape.

USAGE
  Interactive Commands
     restore enters interactive mode  when  invoked  with  the  i
     option.   Interactive commands are reminiscent of the shell.
     For those commands that accept an argument, the  default  is
     the current directory.

     ls [ _d_i_r_e_c_t_o_r_y ]
          List files  in  _d_i_r_e_c_t_o_r_y  or  the  current  directory,
          represented   by   a  `.'  (period).   Directories  are
          appended  with  a  `/'  (slash).   Entries  marked  for
          extraction  are prefixed with a `*' (asterisk).  If the
          verbose option is in effect,  inode  numbers  are  also
          listed.

     cd _d_i_r_e_c_t_o_r_y
          Change to directory _d_i_r_e_c_t_o_r_y (within the dump-tape).

     pwd  Print the full pathname of the current  working  direc-
          tory.

     add [ _f_i_l_e_n_a_m_e ]
          Add the current directory, or the named file or  direc-
          tory  directory  to the list of files to extract.  If a
          directory is specified,  add  that  directory  and  its
          files  (recursively) to the extraction list (unless the



Sun Release 4.1   Last change: 7 September 1988                 3






RESTORE(8)            MAINTENANCE COMMANDS             RESTORE(8)



          h modifier is in effect).

     delete [ _f_i_l_e_n_a_m_e ]
          Delete the current directory,  or  the  named  file  or
          directory  from  the  list  of  files to extract.  If a
          directory is specified, delete that directory  and  all
          its  descendents from the extraction list (unless the h
          modifier is in effect).   The  most  expedient  way  to
          extract  a majority of files from a directory is to add
          that directory to the extraction list, and then  delete
          specific files to omit.

     extract
          Extract all files on the extraction list from the  dump
          tape.   restore  asks  which  volume the user wishes to
          mount.  The fastest way to extract a  small  number  of
          files  is  to  start with the last tape volume and work
          toward the first.

     verbose
          Toggle the status of the v modifier.   While  v  is  in
          effect,  the  ls command lists the inode numbers of all
          entries, and restore displays  information  about  each
          file as it is extracted.

     help Display a summary of the available commands.

     quit restore exits immediately, even if the extraction  list
          is not empty.

FILES
     /dev/rmt8           the default tape drive
     dumphost:/dev/rmt8  the default tape drive if called as rre-
                         store
     /tmp/rstdir*        file containing directories on the tape
     /tmp/rstmode*       owner, mode, and timestamps  for  direc-
                         tories
     ./restoresymtable   information passed  between  incremental
                         restores

SEE ALSO
     dump(8), mkfs(8), mount(8), newfs(8), rmt(8C)

DIAGNOSTICS
     restore complains about bad option characters.

     Read errors result in complaints.  If y has been  specified,
     or the user responds y, restore will attempt to continue.

     If the dump extends over more than one  tape,  restore  asks
     the  user  to  change  tapes.  If the x or i option has been
     specified, restore also asks which volume the user wishes to



Sun Release 4.1   Last change: 7 September 1988                 4






RESTORE(8)            MAINTENANCE COMMANDS             RESTORE(8)



     mount.

     There are numerous consistency checks that can be listed  by
     restore.   Most  checks  are  self-explanatory or can "never
     happen".  Common errors are given below.

     Converting to new file system format.
          A dump tape created from the old file system  has  been
          loaded.   It is automatically converted to the new file
          system format.

     _f_i_l_e_n_a_m_e: not found on tape
          The specified file name was listed in the  tape  direc-
          tory, but was not found on the tape.  This is caused by
          tape read errors while looking for the file,  and  from
          using a dump tape created on an active file system.

     expected next file _i_n_u_m_b_e_r, got _i_n_u_m_b_e_r
          A file that was not listed in the directory showed  up.
          This  can  occur  when  using a dump tape created on an
          active file system.

     Incremental tape too low
          When doing an incremental  restore,  a  tape  that  was
          written  before  the previous incremental tape, or that
          has too low an incremental level has been loaded.

     Incremental tape too high
          When doing incremental restore, a tape  that  does  not
          begin  its coverage where the previous incremental tape
          left off, or one that has too high an incremental level
          has been loaded.

     Tape read error while restoring _f_i_l_e_n_a_m_e
     Tape read error while skipping over inode  inumber
     Tape read error while trying to resynchronize
     A tape read error has occurred.
          If a file name is  specified,  then  its  contents  are
          probably partially wrong.  If an inode is being skipped
          or  the  tape  is  trying  to  resynchronize,  then  no
          extracted  files  have been corrupted, though files may
          not be found on the tape.
     resync restore, skipped _n_u_m blocks
          After a tape read error, restore  may  have  to  resyn-
          chronize  itself.   This  message  lists  the number of
          blocks that were skipped over.

BUGS
     restore can get confused  when  doing  incremental  restores
     from dump tapes that were made on active file systems.





Sun Release 4.1   Last change: 7 September 1988                 5






RESTORE(8)            MAINTENANCE COMMANDS             RESTORE(8)



     A "level 0" dump must be done after a full restore.  Because
     restore  runs  in  user  mode,  it has no control over inode
     allocation; this means that restore repositions  the  files,
     although  it  does  not  change their contents. Thus, a full
     dump must be done to get a new set of directories reflecting
     the new file positions, so that later incremental dumps will
     be correct.
















































Sun Release 4.1   Last change: 7 September 1988                 6



