1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry id="backup_volsetrestore8">
4 <refentrytitle>backup volsetrestore</refentrytitle>
5 <manvolnum>8</manvolnum>
8 <refname>backup volsetrestore</refname>
9 <refpurpose>Restores all volumes in a volume set</refpurpose>
12 <title>Synopsis</title>
13 <para><emphasis role="bold">backup volsetrestore</emphasis> [<emphasis role="bold">-name</emphasis> <<emphasis>volume set name</emphasis>>]
14 [<emphasis role="bold">-file</emphasis> <<emphasis>file name</emphasis>>] [<emphasis role="bold">-portoffset</emphasis> <<emphasis>TC port offset</emphasis>>+]
15 [<emphasis role="bold">-extension</emphasis> <<emphasis>new volume name extension</emphasis>>] [<emphasis role="bold">-n</emphasis>]
16 [<emphasis role="bold">-localauth</emphasis>] [<emphasis role="bold">-cell</emphasis> <<emphasis>cell name</emphasis>>] [<emphasis role="bold">-help</emphasis>]</para>
18 <para><emphasis role="bold">backup vols</emphasis> [<emphasis role="bold">-na</emphasis> <<emphasis>volume set name</emphasis>>] [<emphasis role="bold">-f</emphasis> <<emphasis>file name</emphasis>>]
19 [<emphasis role="bold">-p</emphasis> <<emphasis>TC port offset</emphasis>>+] [<emphasis role="bold">-e</emphasis> <<emphasis>new volume name extension</emphasis>>]
20 [<emphasis role="bold">-n</emphasis>] [<emphasis role="bold">-l</emphasis>] [<emphasis role="bold">-c</emphasis> <<emphasis>cell name</emphasis>>] [<emphasis role="bold">-h</emphasis>]</para>
24 <title>Description</title>
25 <para>The <emphasis role="bold">backup volsetrestore</emphasis> command restores the complete contents of a
26 group of read/write volumes to the file system, by restoring data from the
27 last full dump and all subsequent incremental dumps of each volume. It is
28 most useful for recovering from loss of data on multiple partitions, since
29 it can restore each of a defined set of volumes to a different site.</para>
31 <para>(If the <computeroutput>FILE YES</computeroutput> instruction appears in the
32 <replaceable>/usr/afs/backup/CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file associated with the specified
33 port offset, then the <emphasis role="bold">backup volsetrestore</emphasis> command restores data from
34 the backup data file listed for that port offset in the Tape Coordinator's
35 <replaceable>/usr/afs/backup/tapeconfig</replaceable> file, instead of from tape. For the sake of
36 clarity, the following text refers to tapes only, but the Backup System
37 handles backup data files in much the same way.)</para>
39 <para>If restoring one or more volumes to a single site only, it is usually more
40 efficient to use the <emphasis role="bold">backup volrestore</emphasis> command. If restoring all
41 volumes that resided on a single partition, it is usually more efficient
42 to use the <emphasis role="bold">backup diskrestore</emphasis> command.</para>
44 <para>Indicate the volumes to restore by providing either the <emphasis role="bold">-name</emphasis> argument
45 or the <emphasis role="bold">-file</emphasis> argument:</para>
49 <para>The <emphasis role="bold">-name</emphasis> argument names a volume set. The Backup System restores all
50 volumes listed in the Volume Location Database (VLDB) that match the
51 server, partition, and volume name criteria defined in the volume set's
52 volume entries, and for which dumps are available. It restores the volumes
53 to their current site (machine and partition), and by default overwrites
54 the existing volume contents.</para>
56 <para>It is not required that the volume set was previously used to back up
57 volumes (was used as the <emphasis role="bold">-volumeset</emphasis> option to the <emphasis role="bold">backup dump</emphasis>
58 command). It can be defined especially to match the volumes that need to
59 be restored with this command, and that is usually the better
60 choice. Indeed, a <emphasis>temporary</emphasis> volume set, created by including the
61 <emphasis role="bold">-temporary</emphasis> flag to the <emphasis role="bold">backup addvolset</emphasis> command, can be especially
62 useful in this context. A temporary volume set is not added to the Backup
63 Database and exists only during the current interactive backup session,
64 which is suitable if the volume set is needed only to complete the single
65 restore operation initialized by this command.</para>
67 <para>The reason that a specially defined volume set is probably better is that
68 volume sets previously defined for use in dump operations usually match
69 the backup version of volumes, whereas for a restore operation it is best
70 to define volume entries that match the base (read/write) name. In that
71 case, the Backup System searches the Backup Database for the newest dump
72 set that includes either the read/write or the backup version of the
73 volume. If, in contrast, a volume entry explicitly matches the volume's
74 backup or read-only version, the Backup System restores dumps of that
75 volume version only.</para>
79 <para>The <emphasis role="bold">-file</emphasis> argument names a file that lists specific volumes and the
80 site to which to restore each. The volume name must match the name used in
81 Backup Database dump records rather than in the VLDB, if they differ,
82 because the Backup System does not look up volumes in the VLDB. The
83 specified site can be different than the volume's current one; in that
84 case, the Backup System removes the current version of the volume and
85 updates the volume's location information in the VLDB.</para>
89 <para>If all of the full and incremental dumps of all relevant volumes were not
90 written to a type of tape that a single Tape Coordinator can read, use the
91 <emphasis role="bold">-portoffset</emphasis> argument to list multiple port offset numbers in the order
92 in which the tapes are needed (first list the port offset for the full
93 dump, second the port offset for the level 1 incremental dump, and so
94 on). This implies that the full dumps of all relevant volumes must have
95 been written to a type of tape that the first Tape Coordinator can read,
96 the level 1 incremental dumps to a type of tape the second Tape
97 Coordinator can read, and so on. If dumps are on multiple incompatible
98 tape types, use the <emphasis role="bold">backup volrestore</emphasis> command to restore individual
99 volumes, or use this command after defining new volume sets that group
100 together volumes that were dumped to compatible tape types. For further
101 discussion, see the <emphasis>IBM AFS Administration Guide</emphasis>.</para>
103 <para>By default, the Backup System overwrites the contents of an existing
104 volume with the restored data. To create a new volume to house the
105 restored version instead, use the <emphasis role="bold">-extension</emphasis> argument. The Backup
106 System derives the new volume's name by adding the specified extension to
107 the read/write base name, and creates a new VLDB entry. The command does
108 not affect the existing volume in any way. However, if a volume with the
109 specified extension also already exists, the command overwrites it.</para>
111 <para>The <emphasis role="bold">-n</emphasis> flag produces a list of the volumes to be restored if the <emphasis role="bold">-n</emphasis>
112 flag were not included, without actually restoring any volumes. See
113 <link linkend="OUTPUT">OUTPUT</link> for a detailed description of the output, and suggestions on how
114 to combine it most effectively with the <emphasis role="bold">-file</emphasis> and <emphasis role="bold">-name</emphasis> arguments.</para>
116 <para>The execution time for a <emphasis role="bold">backup volsetrestore</emphasis> command depends on the
117 number of volumes to be restored and the amount of data in them, but it
118 can take hours to restore a large number of volumes. One way to reduce the
119 time is to run multiple instances of the command simultaneously, either
120 using the <emphasis role="bold">-name</emphasis> argument to specify disjoint volume sets for each
121 command, or the <emphasis role="bold">-file</emphasis> argument to name files that list different
122 volumes. This is possible if there are multiple available Tape
123 Coordinators that can read the required tapes. Depending on how the
124 volumes to be restored were dumped to tape, specifying disjoint volume
125 sets can also reduce the number of tape changes required.</para>
127 <para>The Tape Coordinator's default response to this command is to access the
128 first tape it needs by invoking the <computeroutput>MOUNT</computeroutput> instruction in the local
129 <replaceable>/usr/afs/backup/CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable> file, or by prompting the backup
130 operator to insert the tape if there is no <computeroutput>MOUNT</computeroutput> instruction. However,
131 if the <computeroutput>AUTOQUERY NO</computeroutput> instruction appears in the <replaceable>CFG_</replaceable><emphasis>device_name</emphasis><replaceable></replaceable>
132 file, or if the issuer of the <emphasis role="bold">butc</emphasis> command included the <emphasis role="bold">-noautoquery</emphasis>
133 flag, the Tape Coordinator instead expects the tape to be in the device
134 already. If it is not, or is the wrong tape, the Tape Coordinator invokes
135 the <computeroutput>MOUNT</computeroutput> instruction or prompts the operator. It also invokes the
136 <computeroutput>MOUNT</computeroutput> instruction or prompts for any additional tapes needed to
137 complete the restore operation; the backup operator must arrange to
142 <title>Options</title>
145 <term><emphasis role="bold">-name</emphasis> <<emphasis>volume set name</emphasis>></term>
147 <para>Names a volume set to restore. The Backup System restores all of the
148 volumes listed in the VLDB that match the volume set's volume
149 entries. Provide this argument or the <emphasis role="bold">-file</emphasis> argument, but not both.</para>
154 <term><emphasis role="bold">-file</emphasis> <<emphasis>file name</emphasis>></term>
156 <para>Specifies the full pathname of a file that lists one or more volumes and
157 the site (file server machine and partition) to which to restore each.
158 Use either this argument or the <emphasis role="bold">-name</emphasis> argument, but not both.</para>
160 <para>Each volume's entry must appear on its own (unbroken) line in the file,
161 and have the following format:</para>
164 &lt;machine&gt; &lt;partition&gt; &lt;volume&gt; [&lt;comments&gt; ...]
171 <term><machine></term>
173 <para>Names the file server machine to which to restore the volume.</para>
178 <term><partition></term>
180 <para>Names the partition to which to restore the volume.</para>
185 <term><volume></term>
187 <para>Names the volume to restore. It is generally best to specify the base
188 (read/write) name of each volume. In this case, the Backup System searches
189 the Backup Database for the newest dump set that includes a dump of either
190 the read/write or the backup version of the volume. It restores the dumps
191 of that version of the volume, starting with the most recent full
192 dump. If, in contrast, the name explicitly includes the <computeroutput>.backup</computeroutput> or
193 <computeroutput>.readonly</computeroutput> extension, the Backup System restores dumps of that volume
199 <term><comments> ...</term>
201 <para>Is any other text. The Backup System ignores any text on each line that
202 appears after the volume name, so this field can be used for notes helpful
203 to the backup operator or other administrator.</para>
208 <para>Do not use wildcards (for example, <computeroutput>.*</computeroutput>) in the <machine>, <partition>,
209 or <volume> fields. It is acceptable for multiple lines in the file to
210 name the same volume, but the Backup System processes only the first of
216 <term><emphasis role="bold">-extension</emphasis> <<emphasis>new volume name extension</emphasis>></term>
218 <para>Creates a new volume for each volume specified by the <emphasis role="bold">-name</emphasis> or <emphasis role="bold">-file</emphasis>
219 argument, to house the restored data from that volume. The Backup System
220 derives the new volume's name by appending the specified string to the
221 read/write base name, and creates a new VLDB volume entry. It preserves
222 the contents of each existing volume. Any string other than <computeroutput>.readonly</computeroutput>
223 or <computeroutput>.backup</computeroutput> is acceptable, but the combination of the base name and
224 extension cannot exceed 22 characters in length. To use a period to
225 separate the extension from the name, specify it as the first character of
226 the string (as in <computeroutput>.rst</computeroutput>, for example).</para>
231 <term><emphasis role="bold">-portoffset</emphasis> <<emphasis>TC port offset</emphasis>>+</term>
233 <para>Specifies one or more port offset numbers (up to a maximum of 128), each
234 corresponding to a Tape Coordinator to use in the operation. If there is
235 more than one value, the Backup System uses the first one when restoring
236 the full dump of each volume, the second one when restoring the level 1
237 incremental dump of each volume, and so on. It uses the final value in the
238 list when restoring dumps at the corresponding depth in the dump hierarchy
239 and all dumps at lower levels.</para>
241 <para>Provide this argument unless the default value of 0 (zero) is appropriate
242 for all dumps. If <computeroutput>0</computeroutput> is just one of the values in the list, provide it
243 explicitly in the appropriate order.</para>
248 <term><emphasis role="bold">-n</emphasis></term>
250 <para>Displays a list of the volumes to be restored if the flag were not
251 included, without actually restoring them. <link linkend="OUTPUT">OUTPUT</link> details the format of
252 the output. When combined with the <emphasis role="bold">-name</emphasis> argument, its output is easily
253 edited for use as input to the <emphasis role="bold">-file</emphasis> argument on a subsequent <emphasis role="bold">backup
254 volsetrestore</emphasis> command.</para>
259 <term><emphasis role="bold">-localauth</emphasis></term>
261 <para>Constructs a server ticket using a key from the local
262 <replaceable>/usr/afs/etc/KeyFile</replaceable> file. The <emphasis role="bold">backup</emphasis> command interpreter presents
263 it to the Backup Server, Volume Server and VL Server during mutual
264 authentication. Do not combine this flag with the <emphasis role="bold">-cell</emphasis> argument. For
265 more details, see <link linkend="backup8">backup(8)</link>.</para>
270 <term><emphasis role="bold">-cell</emphasis> <<emphasis>cell name</emphasis>></term>
272 <para>Names the cell in which to run the command. Do not combine this argument
273 with the <emphasis role="bold">-localauth</emphasis> flag. For more details, see <link linkend="backup8">backup(8)</link>.</para>
278 <term><emphasis role="bold">-help</emphasis></term>
280 <para>Prints the online help for this command. All other valid options are
288 <title>Output</title>
289 <para>If the <emphasis role="bold">-n</emphasis> flag is not provided, the command displays a unique task ID
290 number for the operation, in two places:</para>
294 <para>In the shell window, directly following the command line.</para>
298 <para>In the Tape Coordinator window, if the butc process was started at debug
303 <para>The task ID number is not the same as the job ID number displayed by the
304 <emphasis role="bold">backup jobs</emphasis> command when the <emphasis role="bold">backup volsetrestore</emphasis> command is issued
305 in interactive mode. The Backup System does not assign either type of ID
306 number until the restoration process actually begins.</para>
308 <para>When the <emphasis role="bold">-n</emphasis> flag is included, no task ID or job ID numbers are reported
309 because none are assigned. Instead, the output begins with a count of the
310 number of volumes to be restored, followed by a line for each dump of a
311 volume. For each volume, the line representing the most recent full dump
312 appears first, and lines for any subsequent incremental dumps follow,
313 ordered by dump level. The lines for a given volume do not necessarily
314 appear all together, however.</para>
316 <para>The format of each line is as follows (the output is shown here on two
317 lines only for legibility reasons):</para>
320 &lt;machine&gt; &lt;partition&gt; &lt;volume_dumped&gt; # as &lt;volume_restored&gt;; \
321 &lt;tape_name&gt; (&lt;tape_ID&gt;); pos &lt;position_number&gt;; &lt;date&gt;
328 <term><machine></term>
330 <para>Names the file server machine that currently houses the volume, as listed
336 <term><partition></term>
338 <para>Names the partition that currently houses the volume, as listed in the
344 <term><volume_dumped></term>
346 <para>Specifies the version (read/write or backup) of the volume that was
347 dumped, as listed in the Backup Database.</para>
352 <term><volume_restored></term>
354 <para>Specifies the name under which to restore the volume. The Backup System
355 only restores data to read/write volumes. If the <emphasis role="bold">-extension</emphasis> argument is
356 included, then the specified extension appears on the name in this field
357 (for example, <computeroutput>user.pat.rst</computeroutput>).</para>
362 <term><tape_name></term>
364 <para>Names the tape containing the dump of the volume, from the Backup
365 Database. If the tape has a permanent name, it appears here; otherwise, it
366 is the AFS tape name.</para>
371 <term><tape_ID></term>
373 <para>The tape ID of the tape containing the dump of the volume, from the Backup
379 <term><position_number></term>
381 <para>Specifies the dump's position on the tape (for example, <computeroutput>31</computeroutput> indicates
382 that 30 volume dumps precede the current one on the tape). If the dump was
383 written to a backup data file, this number is the ordinal of the 16
384 KB-offset at which the volume's data begins.</para>
389 <term><date></term>
391 <para>The date and time when the volume was dumped.</para>
396 <para>One way to generate a file for use as input to the <emphasis role="bold">-file</emphasis> argument is to
397 combine the <emphasis role="bold">-name</emphasis> and <emphasis role="bold">-n</emphasis> options, directing the output to a
398 file. The <emphasis>IBM AFS Administration Guide</emphasis> section on using the Backup
399 System to restore data explains how to edit the file as necessary before
400 using it as input to the <emphasis role="bold">-file</emphasis> argument.</para>
402 <para>The output of this command includes only volumes for which the Backup
403 Database includes at least one dump record. The command interpreter
404 generates a message on the standard error stream about volumes that do not
405 have dump records but either are listed in the file named by the <emphasis role="bold">-file</emphasis>
406 argument, or appear in the VLDB as a match to a volume entry in the volume
407 set named by the <emphasis role="bold">-name</emphasis> argument.</para>
411 <title>Examples</title>
412 <para>The following command restores all volumes included in entries in the
413 volume set named <computeroutput>data.restore</computeroutput>, which was created expressly to restore
414 data to a pair of file server machines on which all data was corrupted due
415 to a software error. All volumes are restored to the sites recorded in
416 their entries in the VLDB.</para>
419 % backup volsetrestore -name data.restore
421 backup: task ID of restore operation: 112
422 backup: Finished doing restore
425 <para>The following command restores all volumes that have entries in the file
426 named <replaceable>/tmp/restore</replaceable>:</para>
429 % backup volsetrestore -file /tmp/restore
431 backup: task ID of restore operation: 113
432 backup: Finished doing restore
435 <para>The <replaceable>/tmp/restore</replaceable> file has the following contents:</para>
438 fs1.abc.com b user.pat
439 fs1.abc.com b user.terry
440 fs1.abc.com b user.smith
441 fs2.abc.com c user.jones
448 <title>Privilege Required</title>
449 <para>The issuer must be listed in the <replaceable>/usr/afs/etc/UserList</replaceable> file on every
450 machine where the Backup Server or Volume Location (VL) Server is running,
451 and on every file server machine that houses an affected volume. If the
452 <emphasis role="bold">-localauth</emphasis> flag is included, the issuer must instead be logged on to a
453 server machine as the local superuser <computeroutput>root</computeroutput>.</para>
457 <title>See Also</title>
458 <para><link linkend="butc5">butc(5)</link>,
459 <link linkend="backup8">backup(8)</link>,
460 <link linkend="backup_addvolentry8">backup_addvolentry(8)</link>,
461 <link linkend="backup_addvolset8">backup_addvolset(8)</link>,
462 <link linkend="backup_diskrestore8">backup_diskrestore(8)</link>,
463 <link linkend="backup_dump8">backup_dump(8)</link>,
464 <link linkend="backup_volrestore8">backup_volrestore(8)</link>,
465 <link linkend="butc8">butc(8)</link></para>
469 <title>Copyright</title>
470 <para>IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.</para>
472 <para>This documentation is covered by the IBM Public License Version 1.0. It was
473 converted from HTML to POD by software written by Chas Williams and Russ
474 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.</para>