man-page-fileserver-update-20080311
[openafs.git] / doc / xml / AdminReference / sect8 / backup_diskrestore.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry id="backup_diskrestore8">
3   <refmeta>
4     <refentrytitle>backup diskrestore</refentrytitle>
5     <manvolnum>8</manvolnum>
6   </refmeta>
7   <refnamediv>
8     <refname>backup diskrestore</refname>
9     <refpurpose>Restores the entire contents of a partition</refpurpose>
10   </refnamediv>
11   <refsect1>
12     <title>Synopsis</title>
13     <para><emphasis role="bold">backup diskrestore</emphasis> <emphasis role="bold">-server</emphasis> &lt;<emphasis>machine to restore</emphasis>&gt;
14         <emphasis role="bold">-partition</emphasis> &lt;<emphasis>partition to restore</emphasis>&gt;
15         [<emphasis role="bold">-portoffset</emphasis> &lt;<emphasis>TC port offset</emphasis>&gt;+]
16         [<emphasis role="bold">-newserver</emphasis> &lt;<emphasis>destination machine</emphasis>&gt;]
17         [<emphasis role="bold">-newpartition</emphasis> &lt;<emphasis>destination partition</emphasis>&gt;]
18         [<emphasis role="bold">-extension</emphasis> &lt;<emphasis>new volume name extension</emphasis>&gt;]
19         [<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>
20
21     <para><emphasis role="bold">backup di</emphasis> <emphasis role="bold">-s</emphasis> &lt;<emphasis>machine to restore</emphasis>&gt; <emphasis role="bold">-pa</emphasis> &lt;<emphasis>partition to restore</emphasis>&gt;
22         [<emphasis role="bold">-po</emphasis> &lt;<emphasis>TC port offset</emphasis>&gt;+] [<emphasis role="bold">-news</emphasis> &lt;<emphasis>destination machine</emphasis>&gt;]
23         [<emphasis role="bold">-newp</emphasis> &lt;<emphasis>destination partition</emphasis>&gt;]
24         [<emphasis role="bold">-e</emphasis> &lt;<emphasis>new volume name extension</emphasis>&gt;] [<emphasis role="bold">-n</emphasis>] [<emphasis role="bold">-l</emphasis>]
25         [<emphasis role="bold">-c</emphasis> &lt;<emphasis>cell name</emphasis>&gt;] [<emphasis role="bold">-h</emphasis>]</para>
26
27   </refsect1>
28   <refsect1>
29     <title>Description</title>
30     <para>The <emphasis role="bold">backup diskrestore</emphasis> command restores all of the volumes for which
31     the Volume Location Database (VLDB) lists a read/write site on the
32     partition specified with the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis> arguments. It is
33     useful if a disk or machine failure corrupts or destroys the data on an
34     entire partition. (To restore any read-only or backup volumes that resided
35     on the partition, use the <emphasis role="bold">vos release</emphasis> and <emphasis role="bold">vos backup</emphasis> commands,
36     respectively, after restoring the read/write version.)</para>
37
38     <para>If restoring only selected volumes to a single site, it is usually more
39     efficient to use the <emphasis role="bold">backup volrestore</emphasis> command. To restore multiple
40     volumes to many different sites, use the <emphasis role="bold">backup volsetrestore</emphasis> command.</para>
41
42     <para>(If the <computeroutput>FILE YES</computeroutput> instruction appears in the
43     <replaceable>/usr/afs/backup/CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file on the Tape Coordinator machine
44     associated with the specified port offset, then the Backup System restores
45     data from the backup data file listed for that port offset in the Tape
46     Coordinator's <replaceable>/usr/afs/backup/tapeconfig</replaceable> file, instead of from
47     tape. For the sake of clarity, the following text refers to tapes only,
48     but the Backup System handles backup data files in much the same way.)</para>
49
50     <para>The Backup System determines whether the read/write or backup version of
51     each volume was dumped more recently, and restores the dumps of that
52     version, starting with the most recent full dump. It resets the creation
53     timestamp of each restored volume to the date and time at which it begins
54     restoring the volume (the creation timestamp appears in the <computeroutput>Creation</computeroutput>
55     field of the output from the <emphasis role="bold">vos examine</emphasis> and <emphasis role="bold">vos listvol</emphasis> commands).</para>
56
57     <para>If all of the full and incremental dumps of all relevant volumes were not
58     written on compatible tape devices, use the <emphasis role="bold">-portoffset</emphasis> argument to
59     list multiple port offset numbers in the order in which the tapes are
60     needed (first list the port offset for the full dump, second the port
61     offset for the level 1 incremental dump, and so on). This implies that the
62     full dumps of all relevant volumes must have been written to a type of
63     tape that the first Tape Coordinator can read, the level 1 incremental
64     dumps to a type of tape the second Tape Coordinator can read, and so
65     on. If dumps are on multiple incompatible tape types, use the <emphasis role="bold">backup
66     volrestore</emphasis> command to restore individual volumes, or the <emphasis role="bold">backup
67     volsetrestore</emphasis> command after defining groups of volumes that were dumped
68     to compatible tape types. For further discussion, see the <emphasis>IBM AFS
69     Administration Guide</emphasis>.</para>
70
71     <para>By default, the Backup System restores the contents of the specified
72     partition to that same partition. To restore the contents to an alternate
73     site, combine the following options as indicated. The Backup System
74     removes each volume from the original site, if it still exists, and
75     records the change of site in the VLDB.</para>
76
77     <itemizedlist>
78       <listitem>
79         <para>To restore to a different partition on the same file server machine,
80         provide the <emphasis role="bold">-newpartition</emphasis> argument.</para>
81
82       </listitem>
83       <listitem>
84         <para>To restore to the partition with the same name on a different file server
85         machine, provide the <emphasis role="bold">-newserver</emphasis> argument.</para>
86
87       </listitem>
88       <listitem>
89         <para>To restore to a completely different site, combine the <emphasis role="bold">-newserver</emphasis> and
90         <emphasis role="bold">-newpartition</emphasis> arguments.</para>
91
92       </listitem>
93     </itemizedlist>
94     <para>By default, the Backup System overwrites the contents of existing volumes
95     with the restored data. To create a new volume to house the restored data
96     instead, use the <emphasis role="bold">-extension</emphasis> argument. The Backup System creates the new
97     volume at the site designated by the <emphasis role="bold">-newserver</emphasis> and <emphasis role="bold">-newpartition</emphasis>
98     arguments if they are used or the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis> arguments
99     otherwise. It derives the volume name by adding the extension to the
100     read/write base name listed in the VLDB, and creates a new VLDB entry. The
101     command does not affect the existing volume in any way. However, if a
102     volume with the specified extension also already exists, the command
103     overwrites it.</para>
104
105     <para>To print out a list of the tapes containing the needed dumps, without
106     actually performing the restore operation, include the <emphasis role="bold">-n</emphasis> flag along
107     with the other options to be used on the actual command.</para>
108
109     <para>The Tape Coordinator's default response to this command is to access the
110     first tape it needs by invoking the <computeroutput>MOUNT</computeroutput> instruction in the local
111     <replaceable>CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file, or by prompting the backup operator to insert
112     the tape if there is no <computeroutput>MOUNT</computeroutput> instruction. However, if the <computeroutput>AUTOQUERY
113     NO</computeroutput> instruction appears in the <replaceable>CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file, or if the
114     issuer of the <emphasis role="bold">butc</emphasis> command included the <emphasis role="bold">-noautoquery</emphasis> flag, the Tape
115     Coordinator instead expects the tape to be in the device already.  If it
116     is not, or is the wrong tape, the Tape Coordinator invokes the <computeroutput>MOUNT</computeroutput>
117     instruction or prompts the operator. It also invokes the <computeroutput>MOUNT</computeroutput>
118     instruction or prompts for any additional tapes needed to complete the
119     restore operation; the backup operator must arrange to provide them.</para>
120
121   </refsect1>
122   <refsect1>
123     <title>Cautions</title>
124     <para>If issuing this command to recover data after a disk crash or other
125     damage, be sure not to issue the <emphasis role="bold">vos syncserv</emphasis> command first. Doing so
126     destroys the VLDB record of the volumes that resided on the partition.</para>
127
128   </refsect1>
129   <refsect1>
130     <title>Options</title>
131     <variablelist>
132       <varlistentry>
133         <term><emphasis role="bold">-server</emphasis> &lt;<emphasis>machine to restore</emphasis>&gt;</term>
134         <listitem>
135           <para>Names the file server machine that the VLDB lists as the site of the
136           volumes that need to be restored.</para>
137
138         </listitem>
139       </varlistentry>
140       <varlistentry>
141         <term><emphasis role="bold">-partition</emphasis> &lt;<emphasis>partition to restore</emphasis>&gt;</term>
142         <listitem>
143           <para>Names the partition that the VLDB lists as the site of the volumes that
144           need to be restored.</para>
145
146         </listitem>
147       </varlistentry>
148       <varlistentry>
149         <term><emphasis role="bold">-portoffset</emphasis> &lt;<emphasis>TC port offset</emphasis>&gt;+</term>
150         <listitem>
151           <para>Specifies one or more port offset numbers (up to a maximum of 128), each
152           corresponding to a Tape Coordinator to use in the operation. If there is
153           more than one value, the Backup System uses the first one when restoring
154           the full dump of each volume, the second one when restoring the level 1
155           incremental dump of each volume, and so on. It uses the final value in the
156           list when restoring dumps at the corresponding depth in the dump hierarchy
157           and at all lower levels.</para>
158
159           <para>Provide this argument unless the default value of 0 (zero) is appropriate
160           for all dumps. If <computeroutput>0</computeroutput> is just one of the values in the list, provide it
161           explicitly in the appropriate order.</para>
162
163         </listitem>
164       </varlistentry>
165       <varlistentry>
166         <term><emphasis role="bold">-newserver</emphasis> &lt;<emphasis>destination machine</emphasis>&gt;</term>
167         <listitem>
168           <para>Names an alternate file server machine to which to restore the volumes. If
169           this argument is omitted, the volumes are restored to the file server
170           machine named by the <emphasis role="bold">-server</emphasis> argument.</para>
171
172         </listitem>
173       </varlistentry>
174       <varlistentry>
175         <term><emphasis role="bold">-newpartition</emphasis> &lt;<emphasis>destination partition</emphasis>&gt;</term>
176         <listitem>
177           <para>Names an alternate partition to which to restore the data. If this
178           argument is omitted, the volumes are restored to the partition named by
179           the <emphasis role="bold">-partition</emphasis> argument.</para>
180
181         </listitem>
182       </varlistentry>
183       <varlistentry>
184         <term><emphasis role="bold">-extension</emphasis> &lt;<emphasis>new volume name extension</emphasis>&gt;</term>
185         <listitem>
186           <para>Creates a new volume for each volume being restored, to house the restored
187           data. The Backup System derives the new volume's name by appending the
188           specified string to the read/write base name listed in the VLDB, and
189           creates a new VLDB volume entry. The Backup System preserves the contents
190           of the volumes on the partition, if any still exist. Any string other than
191           <computeroutput>.readonly</computeroutput> or <computeroutput>.backup</computeroutput> is acceptable, but the combination of the base
192           name and extension cannot exceed 22 characters in length. To use a period
193           to separate the extension from the name, specify it as the first character
194           of the string (as in <computeroutput>.rst</computeroutput>, for example).</para>
195
196         </listitem>
197       </varlistentry>
198       <varlistentry>
199         <term><emphasis role="bold">-n</emphasis></term>
200         <listitem>
201           <para>Displays a list of the tapes necessary to perform the requested restore,
202           without actually performing the operation.</para>
203
204         </listitem>
205       </varlistentry>
206       <varlistentry>
207         <term><emphasis role="bold">-localauth</emphasis></term>
208         <listitem>
209           <para>Constructs a server ticket using a key from the local
210           <replaceable>/usr/afs/etc/KeyFile</replaceable> file. The <emphasis role="bold">backup</emphasis> command interpreter presents
211           it to the Backup Server, Volume Server and VL Server during mutual
212           authentication. Do not combine this flag with the <emphasis role="bold">-cell</emphasis> argument. For
213           more details, see <link linkend="backup8">backup(8)</link>.</para>
214
215         </listitem>
216       </varlistentry>
217       <varlistentry>
218         <term><emphasis role="bold">-cell</emphasis> &lt;<emphasis>cell name</emphasis>&gt;</term>
219         <listitem>
220           <para>Names the cell in which to run the command. Do not combine this argument
221           with the <emphasis role="bold">-localauth</emphasis> flag. For more details, see <link linkend="backup8">backup(8)</link>.</para>
222
223         </listitem>
224       </varlistentry>
225       <varlistentry>
226         <term><emphasis role="bold">-help</emphasis></term>
227         <listitem>
228           <para>Prints the online help for this command. All other valid options are
229           ignored.</para>
230
231         </listitem>
232       </varlistentry>
233     </variablelist>
234   </refsect1>
235   <refsect1>
236     <title>Output</title>
237     <para>If a tape error occurs during the restore operation, the Tape Coordinator
238     displays the following messages:</para>
239
240 <programlisting>
241    Restore operation on volume I&amp;lt;name&amp;gt; failed due to tape error
242    Do you want to continue (y/n)?
243
244 </programlisting>
245       <para>where <emphasis>name</emphasis> is the name of the volume that was being restored when the
246       tape error occurred. Enter the value <emphasis role="bold">y</emphasis> to continue the operation
247       without restoring the indicated volume or the value <computeroutput>n</computeroutput> to terminate the
248       operation. In the latter case, the operator can then attempt to determine
249       the cause of the tape error.</para>
250
251       <para>If the issuer includes the <emphasis role="bold">-n</emphasis> flag with the command, the following
252       string appears at the head of the list of the tapes necessary to perform
253       the restore operation:</para>
254
255 <programlisting>
256    Tapes needed:
257
258 </programlisting>
259       </refsect1>
260       <refsect1>
261         <title>Examples</title>
262         <para>The following command restores the volumes for which the VLDB lists a
263         read/write site on the <replaceable>/vicepd</replaceable> partition of the machine
264         <computeroutput>fs5.abc.com</computeroutput>. The Tape Coordinator associated with port offset 3
265         performs the operation.</para>
266
267 <programlisting>
268    % backup diskrestore -server fs5.abc.com -partition /vicepd -portoffset 3
269
270 </programlisting>
271           <para>The following command restores the volumes for which the VLDB lists a
272           read/write site on the <replaceable>/vicepb</replaceable> partition of the machine <computeroutput>fs1.abc.com</computeroutput>
273           to a new site: the <replaceable>/vicepa</replaceable> partition on the machine <computeroutput>fs3.abc.com</computeroutput>. The
274           Tape Coordinator associated with port offset 0 performs the
275           operation. (The command appears here on two lines only for legibility.)</para>
276
277 <programlisting>
278    % backup diskrestore  -server fs1.abc.com -partition /vicepb   \
279                          -newserver fs3.abc.com -newpartition /vicepa
280
281 </programlisting>
282             <para>The following command lists the tapes required to restore the volumes for
283             which the VLDB lists a read/write site on the <replaceable>/vicepm</replaceable> partition of the
284             machine <computeroutput>fs4.abc.com</computeroutput>:</para>
285
286 <programlisting>
287    % backup diskrestore -server fs4.abc.com -partition /vicepm -n
288    Tapes needed:
289    user.sunday1.1
290    user.sunday1.2
291    user.monday1.1
292    user.tuesday1.1
293    user.wednesday1.1
294
295 </programlisting>
296             </refsect1>
297             <refsect1>
298               <title>Privilege Required</title>
299               <para>The issuer must be listed in the <replaceable>/usr/afs/etc/UserList</replaceable> file on every
300               machine where the Backup Server or Volume Location (VL) Server is running,
301               and on every file server machine that houses an affected volume. If the
302               <emphasis role="bold">-localauth</emphasis> flag is included, the issuer must instead be logged on to a
303               server machine as the local superuser <computeroutput>root</computeroutput>.</para>
304
305             </refsect1>
306             <refsect1>
307               <title>See Also</title>
308               <para><link linkend="butc5">butc(5)</link>,
309               <link linkend="backup8">backup(8)</link>,
310               <link linkend="backup_dump8">backup_dump(8)</link>,
311               <link linkend="backup_volrestore8">backup_volrestore(8)</link>,
312               <link linkend="backup_volsetrestore8">backup_volsetrestore(8)</link>,
313               <link linkend="butc8">butc(8)</link>,
314               <link linkend="vos_backup1">vos_backup(1)</link>,
315               <link linkend="vos_examine1">vos_examine(1)</link>,
316               <link linkend="vos_listvol1">vos_listvol(1)</link>,
317               <link linkend="vos_release1">vos_release(1)</link></para>
318
319             </refsect1>
320             <refsect1>
321               <title>Copyright</title>
322               <para>IBM Corporation 2000. &lt;http://www.ibm.com/&gt; All Rights Reserved.</para>
323
324               <para>This documentation is covered by the IBM Public License Version 1.0.  It was
325               converted from HTML to POD by software written by Chas Williams and Russ
326               Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.</para>
327
328             </refsect1>
329           </refentry>