openafs/doc/xml/AdminReference/sect8/backup_volrestore.xml
Chas Williams 52557c982e xml-docbook-documentation-first-pass-20060915
needs more massaging to make it fit the tree, but, get it here first
2006-09-16 01:13:22 +00:00

357 lines
21 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<refentry id="backup_volrestore8">
<refmeta>
<refentrytitle>backup volrestore</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refnamediv>
<refname>backup volrestore</refname>
<refpurpose>Restores one or more volumes</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<para><emphasis role="bold">backup volrestore</emphasis> <emphasis role="bold">-server</emphasis> &lt;<emphasis>destination machine</emphasis>&gt;
<emphasis role="bold">-partition</emphasis> &lt;<emphasis>destination partition</emphasis>&gt;
<emphasis role="bold">-volume</emphasis> &lt;<emphasis>volume(s) to restore</emphasis>&gt;+
[<emphasis role="bold">-extension</emphasis> &lt;<emphasis>new volume name extension</emphasis>&gt;]
[<emphasis role="bold">-date</emphasis> &lt;<emphasis>date from which to restore</emphasis>&gt;+]
[<emphasis role="bold">-portoffset</emphasis> &lt;<emphasis>TC port offsets</emphasis>&gt;+] [<emphasis role="bold">-n</emphasis>]
[<emphasis role="bold">-localauth</emphasis>] [<emphasis role="bold">-cell</emphasis> &lt;<emphasis>cell name</emphasis>&gt;] [<emphasis role="bold">-help</emphasis>]</para>
<para><emphasis role="bold">backup volr</emphasis> <emphasis role="bold">-s</emphasis> &lt;<emphasis>destination machine</emphasis>&gt;
<emphasis role="bold">-pa</emphasis> &lt;<emphasis>destination partition</emphasis>&gt; <emphasis role="bold">-v</emphasis> &lt;<emphasis>volume(s) to restore</emphasis>&gt;+
[<emphasis role="bold">-e</emphasis> &lt;<emphasis>new volume name extension</emphasis>&gt;]
[<emphasis role="bold">-d</emphasis> &lt;<emphasis>date from which to restore</emphasis>&gt;+] [<emphasis role="bold">-po</emphasis> &lt;<emphasis>TC port offsets</emphasis>&gt;+]
[<emphasis role="bold">-n</emphasis>] [<emphasis role="bold">-l</emphasis>] [<emphasis role="bold">-c</emphasis> &lt;<emphasis>cell name</emphasis>&gt;] [<emphasis role="bold">-h</emphasis>]</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>The <emphasis role="bold">backup volrestore</emphasis> command restores the contents of one or more
volumes to the site indicated by the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis>
arguments. Use the command either to overwrite the contents of existing
volumes with the restored data or to create new volumes while retaining
the existing ones. The specified site does not have to be the current site
for the volumes.</para>
<para>(If the <computeroutput>FILE YES</computeroutput> instruction appears in the
<replaceable>/usr/afs/backup/CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file associated with the specified
port offset, then the <emphasis role="bold">backup volrestore</emphasis> command restores data from the
backup data file listed for that port offset in the Tape Coordinator's
<replaceable>/usr/afs/backup/tapeconfig</replaceable> file, rather than from tape. For the sake of
clarity, the following text refers to tapes only, but the Backup System
handles backup data files in much the same way.)</para>
<para>The command's arguments can be combined as indicated:</para>
<itemizedlist>
<listitem>
<para>To preserve a volume's current contents and also create a new volume to
house the restored version, use the <emphasis role="bold">-extension</emphasis> argument. The Backup
System creates the new volume on the server and partition named by the
<emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis> arguments, assigns it the same name as the
current volume with the addition of the specified extension, and creates a
new Volume Location Database (VLDB) entry for it. Creating a new volume
enables the administrator to compare the two versions.</para>
</listitem>
<listitem>
<para>To overwrite a volume's existing contents with the restored version, omit
the <emphasis role="bold">-extension</emphasis> argument, and specify the site as indicated:</para>
<itemizedlist>
<listitem>
<para>To retain the current site, specify it with the <emphasis role="bold">-server</emphasis> and
<emphasis role="bold">-partition</emphasis> arguments.</para>
</listitem>
<listitem>
<para>To move the volume to a different site while overwriting it, specify the
new site with the <emphasis role="bold">-server</emphasis> argument, <emphasis role="bold">-partition</emphasis> argument, or
both. The Backup System creates a new volume at that site, removes the
existing volume, and updates the site information in the volume's VLDB
entry. The backup version of the volume is not removed automatically from
the original site, if it exists. Use the <emphasis role="bold">vos remove</emphasis> command to remove
it and the <emphasis role="bold">vos backup</emphasis> command to create a backup version at the new
site.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>To restore a volume that no longer exists in the file system, specify its
name with the <emphasis role="bold">-volume</emphasis> argument and use the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis>
arguments to place it at the desired site. The Backup System creates a new
volume and new VLDB entry.</para>
</listitem>
</itemizedlist>
<para>In each case, the command sets each volume's creation date to the date and
time at which it restores it. The creation date appears in the <computeroutput>Creation</computeroutput>
field in the output from the <emphasis role="bold">vos examine</emphasis> and <emphasis role="bold">vos listvol</emphasis> commands.</para>
<para>If restoring all of the volumes that resided on a single partition, it is
usually more efficient to use the <emphasis role="bold">backup diskrestore</emphasis> command. If
restoring multiple volumes to many different sites, it can be more
efficient to use the <emphasis role="bold">backup volsetrestore</emphasis> command.</para>
<para>By default, the backup volrestore command restores the most recent full
dump and all subsequent incremental dumps for each volume, bringing the
restored volumes to the most current possible state. To restore the
volumes to their state at some time in the past, use the <emphasis role="bold">-date</emphasis>
argument. The Backup System restores the most recent full dump and each
subsequent incremental dump for which the <emphasis>clone date</emphasis> of the volume
included in the dump is before the indicated date and time (the clone date
timestamp appears in the <computeroutput>clone date</computeroutput> field of the output from the
<emphasis role="bold">backup volinfo</emphasis> command). For backup and read-only volumes, the clone
date represents the time at which the volume was copied from its
read/write source; for read/write volumes, it represents the time at which
the volume was locked for inclusion in the dump. The resemblance of a
restored volume to its actual state at the indicated time depends on the
amount of time that elapsed between the volume's clone date in the last
eligible dump and the specified time.</para>
<para>If the <emphasis role="bold">-volume</emphasis> argument specifies the base (read/write) form of the
volume name, the Backup System searches the Backup Database for the newest
dump set that includes a dump of either the read/write or the backup
version of the volume. It restores the dumps of that version of the
volume, starting with the most recent full dump. If, in contrast, the
volume name explicitly includes the <computeroutput>.backup</computeroutput> or <computeroutput>.readonly</computeroutput> extension,
the Backup System restores dumps of the corresponding volume version only.</para>
<para>To generate a list of the tapes the Backup System needs to perform the
restore operation, without actually performing it, combine the <emphasis role="bold">-n</emphasis> flag
with the options to be used on the actual command.</para>
<para>If all of the full and incremental dumps of all relevant volumes were not
written to a type of tape that a single Tape Coordinator can read, use the
<emphasis role="bold">-portoffset</emphasis> argument to list multiple port offset numbers in the order
in which the tapes are needed (first list the port offset for the full
dump, second the port offset for the level 1 incremental dump, and so
on). If restoring multiple volumes, the same ordered list of port offsets
must apply to all of them. If not, either issue this command separately
for each volume, or use the <emphasis role="bold">vos volsetrestore</emphasis> command after defining
groups of volumes that were dumped to compatible tape types. For further
discussion, see the <emphasis>IBM AFS Administration Guide</emphasis>.</para>
<para>The Tape Coordinator's default response to this command is to access the
first tape it needs by invoking the <emphasis role="bold">MOUNT</emphasis> instruction in the local
<replaceable>/usr/afs/backup/CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file, or by prompting the backup
operator to insert the tape if there is no <computeroutput>MOUNT</computeroutput> instruction. However,
if the <computeroutput>AUTOQUERY NO</computeroutput> instruction appears in the <replaceable>CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable>
file, or if the issuer of the <emphasis role="bold">butc</emphasis> command included the <emphasis role="bold">-noautoquery</emphasis>
flag, the Tape Coordinator instead expects the tape to be in the device
already. If it is not, or is the wrong tape, the Tape Coordinator invokes
the <computeroutput>MOUNT</computeroutput> instruction or prompts the operator. It also invokes the
<computeroutput>MOUNT</computeroutput> instruction or prompts for any additional tapes needed to
complete the restore operation; the backup operator must arrange to
provide them.</para>
</refsect1>
<refsect1>
<title>Options</title>
<variablelist>
<varlistentry>
<term><emphasis role="bold">-server</emphasis> &lt;<emphasis>destination machine</emphasis>&gt;</term>
<listitem>
<para>Names the file server machine on which to restore each volume. If this
argument and the <emphasis role="bold">-partition</emphasis> argument indicate a site other than the
current site for each volume, and the <emphasis role="bold">-extension</emphasis> argument is not also
provided, the Backup System removes the existing volumes from their
current sites, places the restored contents at the specified site, and
changes the site information in the volume's VLDB entry.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-partition</emphasis> &lt;<emphasis>destination partition</emphasis>&gt;</term>
<listitem>
<para>Names the partition to which to restore each volume. If this argument and
the <emphasis role="bold">-server</emphasis> argument indicate a site other than the current site for
each volume, and the <emphasis role="bold">-extension</emphasis> argument is not also provided, the
Backup System removes the existing volumes from their current sites,
places the restored contents at the specified site, and changes the site
information in the volume's VLDB entry.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-volume</emphasis> &lt;<emphasis>volume to restore</emphasis>&gt;+</term>
<listitem>
<para>Names one or more volumes to restore, using the volume name as listed in
the Backup Database. Provide the base (read/write) name of each volume to
have the Backup System search the Backup Database for the newest dump set
that includes a dump of either the read/write or the backup version of the
volume; it restores the dumps of that version of the volume, starting with
the most recent full dump. If, in contrast, a volume name explicitly
includes the <computeroutput>.backup</computeroutput> or <computeroutput>.readonly</computeroutput> extension, the Backup System
restores dumps of the corresponding volume version only.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-extension</emphasis> &lt;<emphasis>new volume name extension</emphasis>&gt;</term>
<listitem>
<para>Creates a new volume to house the restored data, with a name derived by
appending the specified string to each volume named by the <emphasis role="bold">-volume</emphasis>
argument. The Backup System creates a new VLDB entry for the volume. Any
string other than <computeroutput>.readonly</computeroutput> or <computeroutput>.backup</computeroutput> is acceptable, but the
combination of the existing volume name and extension cannot exceed 22
characters in length. To use a period to separate the extension from the
name, specify it as the first character of the string (as in <computeroutput>.rst</computeroutput>, for
example).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-date</emphasis> &lt;<emphasis>date from which to restore</emphasis>&gt;+</term>
<listitem>
<para>Specifies a date and optionally time; the restored volume includes data
from dumps performed before the date only. Provide a value in the format
<emphasis>mm/dd/yyyy</emphasis> [<emphasis>hh</emphasis>:<emphasis>MM</emphasis>], where the required <emphasis>mm/dd/yyyy</emphasis> portion
indicates the month (<emphasis>mm</emphasis>), day (<emphasis>dd</emphasis>), and year (<emphasis>yyyy</emphasis>), and the
optional <emphasis>hh:MM</emphasis> portion indicates the hour and minutes in 24-hour format
(for example, the value <computeroutput>14:36</computeroutput> represents 2:36 p.m.). If omitted, the
time defaults to 59 seconds after midnight (00:00:59 hours).</para>
<para>Valid values for the year range from <computeroutput>1970</computeroutput> to <computeroutput>2037</computeroutput>; higher values are
not valid because the latest possible date in the standard UNIX
representation is in February 2038. The command interpreter automatically
reduces any later date to the maximum value.</para>
<para>If this argument is omitted, the Backup System restores all possible dumps
including the most recently created.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-portoffset</emphasis> &lt;<emphasis>TC port offest</emphasis>&gt;+</term>
<listitem>
<para>Specifies one or more port offset numbers (up to a maximum of 128), each
corresponding to a Tape Coordinator to use in the operation. If there is
more than one value, the Backup System uses the first one when restoring
the full dump of each volume, the second one when restoring the level 1
incremental dump of each volume, and so on. It uses the final value in the
list when restoring dumps at the corresponding depth in the dump hierarchy
and all dumps at lower levels.</para>
<para>Provide this argument unless the default value of 0 (zero) is appropriate
for all dumps. If <computeroutput>0</computeroutput> is just one of the values in the list, provide it
explicitly in the appropriate order.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-n</emphasis></term>
<listitem>
<para>Displays the list of tapes that contain the dumps required by the restore
operation, without actually performing the operation.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-localauth</emphasis></term>
<listitem>
<para>Constructs a server ticket using a key from the local
<replaceable>/usr/afs/etc/KeyFile</replaceable> file. The <emphasis role="bold">backup</emphasis> command interpreter presents
it to the Backup Server, Volume Server and VL Server during mutual
authentication. Do not combine this flag with the <emphasis role="bold">-cell</emphasis> argument. For
more details, see <link linkend="backup8">backup(8)</link>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-cell</emphasis> &lt;<emphasis>cell name</emphasis>&gt;</term>
<listitem>
<para>Names the cell in which to run the command. Do not combine this argument
with the <emphasis role="bold">-localauth</emphasis> flag. For more details, see <link linkend="backup8">backup(8)</link>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">-help</emphasis></term>
<listitem>
<para>Prints the online help for this command. All other valid options are
ignored.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Output</title>
<para>If the issuer includes the <emphasis role="bold">-n</emphasis> flag with the command, the following
string appears at the head of the list of the tapes necessary to complete
the restore operation.</para>
<programlisting>
Tapes needed:
</programlisting>
</refsect1>
<refsect1>
<title>Examples</title>
<para>The following command restores the volume user.pat to partition <replaceable>/vicepa</replaceable>
on machine <computeroutput>fs5.abc.com</computeroutput>:</para>
<programlisting>
% backup volrestore -server fs5.abc.com -partition a -volume user.pat
</programlisting>
<para>The following command restores the volumes <computeroutput>user.smith</computeroutput> and <computeroutput>user.terry</computeroutput>
to partition <replaceable>/vicepb</replaceable> on machine <computeroutput>fs4.abc.com</computeroutput>, adding a <computeroutput>.rst</computeroutput>
extension to each volume name and preserving the existing <computeroutput>user.smith</computeroutput>
and <computeroutput>user.terry</computeroutput> volumes. Only dumps created before 5:00 p.m. on 31
January 1998 are restored. (The command is shown here on multiple lines
only for legibility reasons.)</para>
<programlisting>
% backup volrestore -server fs4.abc.com -partition b \
-volume user.smith user.terry \
-extension .rst -date 1/31/1998 17:00
</programlisting>
<para>The following command restores the volume user.pat to partition <replaceable>/vicepb</replaceable>
on machine <computeroutput>fs4.abc.com</computeroutput>. The Tape Coordinator with port offset 1 handles
the tape containing the full dump; the Tape Coordinator with port offset 0
handles all tapes containing incremental dumps. (The command is shown here
on two lines only for legibility reasons.)</para>
<programlisting>
% backup volrestore -server fs5.abc.com -partition a \
-volume user.pat -portoffset 1 0
</programlisting>
</refsect1>
<refsect1>
<title>Privilege Required</title>
<para>The issuer must be listed in the <replaceable>/usr/afs/etc/UserList</replaceable> file on every
machine where the Backup Server or Volume Location (VL) Server is running,
and on every file server machine that houses an affected volume. If the
<emphasis role="bold">-localauth</emphasis> flag is included, the issuer must instead be logged on to a
server machine as the local superuser <computeroutput>root</computeroutput>.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para><link linkend="butc5">butc(5)</link>,
<link linkend="backup8">backup(8)</link>,
<link linkend="backup_dump8">backup_dump(8)</link>,
<link linkend="backup_diskrestore8">backup_diskrestore(8)</link>,
<link linkend="backup_volsetrestore8">backup_volsetrestore(8)</link>,
<link linkend="butc8">butc(8)</link>,
<link linkend="vos_backup1">vos_backup(1)</link>,
<link linkend="vos_remove1">vos_remove(1)</link></para>
</refsect1>
<refsect1>
<title>Copyright</title>
<para>IBM Corporation 2000. &lt;http://www.ibm.com/&gt; All Rights Reserved.</para>
<para>This documentation is covered by the IBM Public License Version 1.0. It was
converted from HTML to POD by software written by Chas Williams and Russ
Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.</para>
</refsect1>
</refentry>