\section{dump and restore **}

\begin{frame}
   {dump and restore}

   \begin{itemize}
      \item Can perform full or incremental backups
      \item Backup requires multiple passes
      \item Only works for \textbf{ext2}, \textbf{ext3}, and
      \textbf{ext4} filesystems
      \item Can specify output tape size and density, block
      size and count, or even both
      \item Can dump to any valid device or file;
      defaults to \filelink{/dev/tape}
      \item Parameters in \filelink{/etc/fstab} control what
      gets dumped and when
      \item Rarely used directly today, but sometimes used by
      higher level backup utilities such as \textbf{Amanda}
   \end{itemize}

\end{frame}

\cprotect\note{

   The \textbf{dump} and \textbf{restore} utilities have
   been around since the earliest days of \textbf{UNIX}
   and were not originally designed for modern hardware,
   filesystems and storage capacities.
   They are still sometimes used
   by higher level backup program suites, such as
   \textbf{Amanda}.  Thus, familiarity with these legacy
   tools may be useful.


   Unlike \textbf{cpio} and \textbf{tar}, these utilities
   read and write the filesystem directly.  This is
   much more efficient and allows backup files to be
   created without affecting their time stamps.  The
   major drawback is that it is limited to
   \textbf{ext2/ext3/ext4} filesystems.

   The \textbf{dump} program has a number of options to
   let you set parameters.  Some of these include:
   \respfile{dump.inc}

   Note when options are given to specify values, the
   values need not be placed immediately after the
   option, but they must be given in the same order as
   the options that specify them.

   The lack of filesystem flexibility is a rather strong
   limitation, both because of the multiplicity of
   filesystem types in use in \textbf{Linux}.

   \textbf{dump} and \textbf{restore} are sometimes used
   by higher level backup program suites, such as
   \textbf{Amanda}.  Some familiarity with these legacy
   tools is useful.

}
\begin{frame}
   {restore}

   \begin{itemize}
      \item Use to read tapes/files which were created with
      \textbf{dump}
      \item Restores files relative to the current directory
      \item Actions determined by command-line arguments
      \begin{cmd}
$ restore -xvf /dev/tape
      \end{cmd}
      \item You can also list the contents of a dump made
      with restore:
      \begin{cmd}
$ restore -tvf /tmp/dump0
      \end{cmd}
   \end{itemize}

\end{frame}

\cprotect\note{

   Useful options to \texttt{restore}:

   \begin{itemize}

      \item\texttt{-r}

      Restores everything. The dumped
      material is read and the complete contents are loaded
      into the current directory.
      \item\texttt{-t}

      Files and directories specified are
      listed on standard output if they reside on the backup.
      If no file argument is specified, the root directory on
      the backup is listed.  No actual restore is performed with
      this option.

      \item\texttt{-x}

      The files and directories named
      are extracted from the backup.  If the named
      file matches a directory on the backup, the directory is
      recursively extracted.  If no argument is listed, then all
      contents of the backup are extracted.

      \item\texttt{-i}

      This mode allows the interactive restoration of files
      from the backup. After reading in the directory
      information from the backup, restore provides a
      shell-like interface that allows the user to move
      around the directory tree selecting files to be
      extracted.
   \end{itemize}
   You can not use \texttt{-r} and \texttt{-x} at the same time.
}

