Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / doc / xml / AdminGuide / auagd011.xml
CommitLineData
805e021f
CE
1<?xml version="1.0" encoding="UTF-8"?>
2<chapter id="HDRWQ248">
3 <title>Configuring the AFS Backup System</title>
4
5 <para>The AFS Backup System helps you to create backup copies of data from AFS volumes and to restore data to the file system if
6 it is lost or corrupted. This chapter explains how to configure the Backup System. For instructions on backing up and restoring
7 data and displaying dump records, see <link linkend="HDRWQ283">Backing Up and Restoring AFS Data</link>.</para>
8
9 <sect1 id="HDRWQ249">
10 <title>Summary of Instructions</title>
11
12 <para>This chapter explains how to perform the following tasks by using the indicated commands:</para>
13
14 <informaltable frame="none">
15 <tgroup cols="2">
16 <colspec colwidth="70*" />
17
18 <colspec colwidth="30*" />
19
20 <tbody>
21 <row>
22 <entry>Determine tape capacity and filemark size</entry>
23
24 <entry><emphasis role="bold">fms</emphasis></entry>
25 </row>
26
27 <row>
28 <entry>Define Tape Coordinator entry in Backup Database</entry>
29
30 <entry><emphasis role="bold">backup addhost</emphasis></entry>
31 </row>
32
33 <row>
34 <entry>Remove Tape Coordinator entry from Backup Database</entry>
35
36 <entry><emphasis role="bold">backup delhost</emphasis></entry>
37 </row>
38
39 <row>
40 <entry>Display Tape Coordinator entries from Backup Database</entry>
41
42 <entry><emphasis role="bold">backup listhosts</emphasis></entry>
43 </row>
44
45 <row>
46 <entry>Create volume set</entry>
47
48 <entry><emphasis role="bold">backup addvolset</emphasis></entry>
49 </row>
50
51 <row>
52 <entry>Add volume entry to volume set</entry>
53
54 <entry><emphasis role="bold">backup addvolentry</emphasis></entry>
55 </row>
56
57 <row>
58 <entry>List volume sets and entries</entry>
59
60 <entry><emphasis role="bold">backup listvolsets</emphasis></entry>
61 </row>
62
63 <row>
64 <entry>Delete volume set from Backup Database</entry>
65
66 <entry><emphasis role="bold">backup delvolset</emphasis></entry>
67 </row>
68
69 <row>
70 <entry>Delete volume entry from volume set</entry>
71
72 <entry><emphasis role="bold">backup delvolentry</emphasis></entry>
73 </row>
74
75 <row>
76 <entry>Define dump level</entry>
77
78 <entry><emphasis role="bold">backup adddump</emphasis></entry>
79 </row>
80
81 <row>
82 <entry>Change expiration date on existing dump level</entry>
83
84 <entry><emphasis role="bold">backup setexp</emphasis></entry>
85 </row>
86
87 <row>
88 <entry>Delete dump level from dump hierarchy</entry>
89
90 <entry><emphasis role="bold">backup deldump</emphasis></entry>
91 </row>
92
93 <row>
94 <entry>Display dump hierarchy</entry>
95
96 <entry><emphasis role="bold">backup listdumps</emphasis></entry>
97 </row>
98
99 <row>
100 <entry>Label tape</entry>
101
102 <entry><emphasis role="bold">backup labeltape</emphasis></entry>
103 </row>
104
105 <row>
106 <entry>Read label on tape</entry>
107
108 <entry><emphasis role="bold">backup readlabel</emphasis></entry>
109 </row>
110 </tbody>
111 </tgroup>
112 </informaltable>
113 </sect1>
114
115 <sect1 id="HDRWQ251">
116 <title>Introduction to Backup System Features</title>
117
118 <indexterm>
119 <primary>Backup System</primary>
120
121 <secondary>introduction</secondary>
122 </indexterm>
123
124 <para>The AFS Backup System is highly flexible, enabling you to control most aspects of the backup process, including how often
125 backups are performed, which volumes are backed up, and whether to dump all of the data in a volume or just the data that has
126 changed since the last dump operation. You can also take advantage of several features that automate much of the backup
127 process.</para>
128
129 <para>To administer and use the Backup System most efficiently, it helps to be familiar with its basic features, which are
130 described in the following sections. For pointers to instructions for implementing the features as you configure the Backup
131 System in your cell, see <link linkend="HDRWQ257">Overview of Backup System Configuration</link>.</para>
132
133 <sect2 id="HDRWQ252">
134 <title>Volume Sets and Volume Entries</title>
135
136 <indexterm>
137 <primary>volume set (Backup System)</primary>
138
139 <secondary>defined</secondary>
140 </indexterm>
141
142 <indexterm>
143 <primary>volume set (Backup System)</primary>
144
145 <secondary>volume entry</secondary>
146
147 <see>volume entry</see>
148 </indexterm>
149
150 <indexterm>
151 <primary>volume entry (Backup System)</primary>
152
153 <secondary>defined</secondary>
154 </indexterm>
155
156 <indexterm>
157 <primary>Backup System</primary>
158
159 <secondary>volume set</secondary>
160
161 <see>volume set</see>
162 </indexterm>
163
164 <indexterm>
165 <primary>Backup System</primary>
166
167 <secondary>volume entry</secondary>
168
169 <see>volume entry</see>
170 </indexterm>
171
172 <para>When you back up AFS data, you specify which data to include in terms of complete volumes rather than individual files.
173 More precisely, you define groups of volumes called <emphasis>volume sets</emphasis>, each of which includes one or more
174 volumes that you want to back up in a single operation. You must include a volume in a volume set to back it up, because the
175 command that backs up data (the <emphasis role="bold">backup dump</emphasis> command) does not accept individual volume
176 names.</para>
177
178 <para>A volume set consists of one or more <emphasis>volume entries</emphasis>, each of which specifies which volumes to back
179 up based on their location (file server machine and partition) and volume name. You can use a wildcard notation to include all
180 volumes that share a location, a common character string in their names, or both.</para>
181
182 <para>For instructions on creating and removing volume sets and volume entries, see <link linkend="HDRWQ265">Defining and
183 Displaying Volume Sets and Volume Entries</link>.</para>
184 </sect2>
185
186 <sect2 id="Header_274">
187 <title>Dumps and Dump Sets</title>
188
189 <indexterm>
190 <primary>Backup System</primary>
191
192 <secondary>dump</secondary>
193
194 <see>dump</see>
195 </indexterm>
196
197 <indexterm>
198 <primary>Backup System</primary>
199
200 <secondary>dump set</secondary>
201
202 <see>dump set</see>
203 </indexterm>
204
205 <indexterm>
206 <primary>dump (Backup System)</primary>
207
208 <secondary>appended, defined</secondary>
209 </indexterm>
210
211 <indexterm>
212 <primary>dump (Backup System)</primary>
213
214 <secondary>parent, defined</secondary>
215 </indexterm>
216
217 <indexterm>
218 <primary>dump (Backup System)</primary>
219
220 <secondary>defined</secondary>
221 </indexterm>
222
223 <indexterm>
224 <primary>dump (Backup System)</primary>
225
226 <secondary>full, defined</secondary>
227 </indexterm>
228
229 <indexterm>
230 <primary>dump (Backup System)</primary>
231
232 <secondary>incremental, defined</secondary>
233 </indexterm>
234
235 <indexterm>
236 <primary>dump (Backup System)</primary>
237
238 <secondary>initial, defined</secondary>
239 </indexterm>
240
241 <indexterm>
242 <primary>dump (Backup System)</primary>
243
244 <secondary>set</secondary>
245
246 <see>dump set</see>
247 </indexterm>
248
249 <indexterm>
250 <primary>dump set (Backup System)</primary>
251
252 <secondary>defined</secondary>
253 </indexterm>
254
255 <para>A <emphasis>dump</emphasis> is the collection of data that results from backing up a volume set. A <emphasis>full
256 dump</emphasis> includes all of the data in every volume in the volume set, as it exists at the time of the dump operation. An
257 <emphasis>incremental dump</emphasis> includes only some of the data from the volumes in the volume set, namely those files
258 and directory structures that have changed since a specified previous dump operation was performed. The previous dump is
259 referred to as the incremental dump's <emphasis>parent dump</emphasis>, and it can be either a full dump or an incremental
260 dump itself.</para>
261
262 <para>A <emphasis>dump set</emphasis> is a collection of one or more dumps stored together on one or more tapes. The first
263 dump in the dump set is the <emphasis>initial dump</emphasis>, and any subsequent dump added onto the end of an existing dump
264 set is an <emphasis>appended dump</emphasis>. Appending dumps is always optional, but maximizes use of a tape's capacity. In
265 contrast, creating only initial dumps can result in many partially filled tapes, because an initial dump must always start on
266 a new tape, but does not necessarily extend to the end of the tape. Appended dumps do not have to be related to one another or
267 to the initial dump (they do not have to be dumps of the same or related volume sets), but well-planned appending can reduce
268 the number of times you have to change tapes during a restore operation. For example, it can make sense to append incremental
269 dumps of a volume set together in a single dump set.</para>
270
271 <para>All the records for a dump set are indexed together in the Backup Database based on the initial dump (for more on the
272 Backup Database, see <link linkend="HDRWQ256">The Backup Database and Backup Server Process</link>). To delete the database
273 record of an appended dump, you must delete the initial dump record, and doing so deletes the records for all dumps in the
274 dump set. Similarly, you cannot recycle just one tape in a dump set without deleting the database records of all tapes in the
275 dump set.</para>
276
277 <para>For instructions on creating an initial dump, see <link linkend="HDRWQ296">Backing Up Data</link>, and to learn how to
278 append dumps, see <link linkend="HDRWQ299">Appending Dumps to an Existing Dump Set</link>.</para>
279 </sect2>
280
281 <sect2 id="Header_275">
282 <title>Dump Hierarchies, Dump Levels and Expiration Dates</title>
283
284 <indexterm>
285 <primary>Backup System</primary>
286
287 <secondary>dump hierarchy</secondary>
288
289 <see>dump hierarchy</see>
290 </indexterm>
291
292 <indexterm>
293 <primary>Backup System</primary>
294
295 <secondary>dump level</secondary>
296
297 <see>dump hierarchy</see>
298 </indexterm>
299
300 <indexterm>
301 <primary>dump levels</primary>
302
303 <secondary>defined</secondary>
304 </indexterm>
305
306 <indexterm>
307 <primary>dump hierarchy (Backup System)</primary>
308
309 <secondary>described</secondary>
310 </indexterm>
311
312 <indexterm>
313 <primary>dump hierarchy (Backup System)</primary>
314
315 <secondary>dump level</secondary>
316
317 <tertiary>defined</tertiary>
318 </indexterm>
319
320 <indexterm>
321 <primary>dump hierarchy (Backup System)</primary>
322
323 <secondary>expiration date on dump level</secondary>
324
325 <tertiary>described</tertiary>
326 </indexterm>
327
328 <para>A <emphasis>dump hierarchy</emphasis> is a logical structure that defines the relationship between full and incremental
329 dumps; that is, it defines which dump serves as the parent for an incremental dump. Each individual component of a hierarchy
330 is a <emphasis>dump level</emphasis>. When you create a dump by issuing the <emphasis role="bold">backup dump</emphasis>
331 command, you specify a volume set name and a dump level name. The Backup System uses the dump level to determine whether the
332 dump is full or incremental, and if incremental, which dump level to use as the parent.</para>
333
334 <para>You can associate an <emphasis>expiration date</emphasis> with a dump level, to define when a dump created at that level
335 expires. The Backup System refuses to overwrite a tape until all dumps in the dump set to which the tape belongs have expired,
336 so assigning expiration dates automatically determines how you recycle tapes. You can define an expiration date either in
337 absolute terms (for example, 13 January 2000) or relative terms (for example, 30 days from when the dump is created). You can
338 also change the expiration date associated with a dump level (but not with an actual dump that has already been created at
339 that level).</para>
340
341 <para>For instructions on creating dump hierarchies, assigning expiration dates, and establishing a tape recycling schedule,
342 see <link linkend="HDRWQ267">Defining and Displaying the Dump Hierarchy</link>.</para>
343
344 <indexterm>
345 <primary>Backup System</primary>
346
347 <secondary>dump name</secondary>
348
349 <see>dump</see>
350 </indexterm>
351
352 <indexterm>
353 <primary>Backup System</primary>
354
355 <secondary>tape name</secondary>
356
357 <see>tapes</see>
358 </indexterm>
359
360 <indexterm>
361 <primary>Backup System</primary>
362
363 <secondary>dump ID number</secondary>
364
365 <see>dump</see>
366 </indexterm>
367
368 <indexterm>
369 <primary>tapes (Backup System)</primary>
370
371 <secondary>names</secondary>
372
373 <tertiary>described</tertiary>
374 </indexterm>
375
376 <indexterm>
377 <primary>dump (Backup System)</primary>
378
379 <secondary>ID number, described</secondary>
380 </indexterm>
381
382 <indexterm>
383 <primary>dump (Backup System)</primary>
384
385 <secondary>name, described</secondary>
386 </indexterm>
387 </sect2>
388
389 <sect2 id="HDRWQ253">
390 <title>Dump Names and Tape Names</title>
391
392 <para>When you create a dump, the Backup System creates a Backup Database record for it, assigning a name comprising the
393 volume set name and the last element in the dump level pathname:</para>
394
395 <programlisting>
396 volume_set_name<emphasis role="bold">.</emphasis>dump_level_name
397</programlisting>
398
399 <para>For example, a dump of the volume set <emphasis role="bold">user</emphasis> at the dump level <emphasis
400 role="bold">/sunday/friday</emphasis> is called <emphasis role="bold">user.friday</emphasis>. The Backup System also assigns a
401 unique <emphasis>dump ID</emphasis> number to the dump to distinguish it from other dumps with the same name that possibly
402 exist.</para>
403
404 <para>The Backup System assigns a similar <emphasis>AFS tape name</emphasis> to each tape that contains a dump set, reflecting
405 the volume set and dump level of the dump set's initial dump, plus a numerical index of the tape's position in the dump set,
406 and a unique dump ID number:</para>
407
408 <programlisting>
409 volume_set_name<emphasis role="bold">.</emphasis>dump_level_name<emphasis role="bold">.</emphasis>tape_index (dump ID)
410</programlisting>
411
412 <para>For example, the second tape in a dump set whose initial dump is of the volume set <emphasis
413 role="bold">uservol</emphasis> at the dump level <emphasis role="bold">/sunday/friday</emphasis> has AFS tape name like
414 <emphasis role="bold">uservol.friday.2</emphasis> (<emphasis role="bold">914382400</emphasis>).</para>
415
416 <para>In addition to its AFS tape name, a tape can have an optional <emphasis>permanent name</emphasis> that you assign.
417 Unlike the AFS tape name, the permanent name does not have to indicate the volume set and dump level of the initial (or any
418 other) dump, and so does not change depending on the contents of the tape. The Backup System does not require a certain format
419 for permanent names, so you need to make sure that each tape's name is unique. If a tape has a permanent name, the Backup
420 System uses it rather than the AFS tape name when referring to the tape in prompts and the output from most <emphasis
421 role="bold">backup</emphasis> commands, but still tracks the AFS tape name internally.</para>
422 </sect2>
423
424 <sect2 id="HDRWQ254">
425 <title>Tape Labels, Dump Labels, and EOF Markers</title>
426
427 <indexterm>
428 <primary>tapes (Backup System)</primary>
429
430 <secondary>label</secondary>
431
432 <tertiary>described</tertiary>
433 </indexterm>
434
435 <indexterm>
436 <primary>dump (Backup System)</primary>
437
438 <secondary>label, described</secondary>
439 </indexterm>
440
441 <indexterm>
442 <primary>Backup System</primary>
443
444 <secondary>filemarks</secondary>
445
446 <see>Tape Coordinator</see>
447 </indexterm>
448
449 <indexterm>
450 <primary>Tape Coordinator (Backup System)</primary>
451
452 <secondary>filemark</secondary>
453
454 <tertiary>described</tertiary>
455 </indexterm>
456
457 <para>Every tape used in the Backup System has a magnetic label at the beginning that records the tape's name, capacity, and
458 other information. You can use the <emphasis role="bold">backup labeltape</emphasis> command to write a label, or the
459 <emphasis role="bold">backup dump</emphasis> command creates one automatically if you use an unlabeled tape. The label records
460 the following information: <itemizedlist>
461 <listitem>
462 <para>The tape's permanent name, which you can assign by using the <emphasis role="bold">-pname</emphasis> argument to
463 the <emphasis role="bold">backup labeltape</emphasis> command. It can be any string of up to 32 characters. If you do
464 not assign a permanent name, the Backup System records the value <computeroutput>&lt;NULL&gt;</computeroutput> when you
465 use the <emphasis role="bold">backup labeltape</emphasis> command to assign an AFS tape name, or when you use the
466 <emphasis role="bold">backup dump</emphasis> command to write a dump to the tape.</para>
467 </listitem>
468
469 <listitem>
470 <para>The tape's AFS <emphasis>tape name</emphasis>, which can be one of three types of values: <itemizedlist>
471 <listitem>
472 <para>A name that reflects the volume set and dump level of the dump set's initial dump and the tape's place in
473 the sequence of tapes for the dump set, as described in <link linkend="HDRWQ253">Dump Names and Tape Names</link>.
474 If the tape does not have a permanent name, you can assign the AFS tape name by using the <emphasis
475 role="bold">-name</emphasis> argument to the <emphasis role="bold">backup labeltape</emphasis> command.</para>
476 </listitem>
477
478 <listitem>
479 <para>The value <computeroutput>&lt;NULL&gt;</computeroutput>, which results when you assign a permanent name, or
480 provide no value for the <emphasis role="bold">backup labeltape</emphasis> command's <emphasis
481 role="bold">-name</emphasis> argument.</para>
482 </listitem>
483
484 <listitem>
485 <para>No AFS tape name at all, indicating that you have never labeled the tape or written a dump to it.</para>
486 </listitem>
487 </itemizedlist></para>
488
489 <para>If a tape does not already have an actual AFS tape name when you write a dump to it, the Backup System constructs
490 and records the appropriate AFS tape name. If the tape does have an AFS tape name and you are writing an initial dump,
491 then the name must correctly reflect the dump's volume set and dump level.</para>
492 </listitem>
493
494 <listitem>
495 <para>The capacity, or <emphasis>size</emphasis>, of the tape, followed by a letter that indicates the unit of measure
496 (<computeroutput>k</computeroutput> or <computeroutput>K</computeroutput> for kilobytes,
497 <computeroutput>m</computeroutput> or <computeroutput>M</computeroutput> for megabytes,
498 <computeroutput>g</computeroutput> or <computeroutput>G</computeroutput> for gigabytes, or
499 <computeroutput>t</computeroutput> or <computeroutput>T</computeroutput> for terabytes). The tape's manufacturer
500 determines the tape's capacity. For further discussion of how the Backup System uses the value in the capacity field,
501 see <link linkend="HDRWQ258">Configuring the tapeconfig File</link>.</para>
502 </listitem>
503 </itemizedlist></para>
504
505 <para>For information about labeling tapes, see <link linkend="HDRWQ272">Writing and Reading Tape Labels</link>.</para>
506
507 <para>In addition to the tape label, the Backup System writes a <emphasis>dump label</emphasis> on the tape for every appended
508 dump (the tape label and dump label are the same for the initial dump). A dump label records the following information:
509 <itemizedlist>
510 <listitem>
511 <para>The name of the tape containing the dump</para>
512 </listitem>
513
514 <listitem>
515 <para>The date and time that the dump operation began</para>
516 </listitem>
517
518 <listitem>
519 <para>The cell to which the volumes in the dump belong</para>
520 </listitem>
521
522 <listitem>
523 <para>The dump's size in kilobytes</para>
524 </listitem>
525
526 <listitem>
527 <para>The dump's dump level</para>
528 </listitem>
529
530 <listitem>
531 <para>The dump's dump ID</para>
532 </listitem>
533 </itemizedlist></para>
534
535 <para>The Backup System writes a <emphasis>filemark</emphasis> (also called an End-of-File or EOF marker) between the data
536 from each volume in a dump. The tape device's manufacturer determines the filemark size, which is typically between 2 KB and 2
537 MB; in general, the larger the usual capacity of the tapes that the device uses, the larger the filemark size. If a dump
538 contains a small amount of data from each of a large number of volumes, as incremental dumps often do, then the filemark size
539 can significantly affect how much volume data fits on the tape. To enable the Backup System to factor in filemark size as it
540 writes a dump, you can record the filemark size in a configuration file; see <link linkend="HDRWQ258">Configuring the
541 tapeconfig File</link>.</para>
542 </sect2>
543
544 <sect2 id="HDRWQ255">
545 <title>Tape Coordinator Machines, Port Offsets, and Backup Data Files</title>
546
547 <indexterm>
548 <primary>Tape Coordinator (Backup System)</primary>
549
550 <secondary>described</secondary>
551 </indexterm>
552
553 <indexterm>
554 <primary>Backup System</primary>
555
556 <secondary>Tape Coordinator</secondary>
557
558 <see>Tape Coordinator</see>
559 </indexterm>
560
561 <indexterm>
562 <primary>Backup System</primary>
563
564 <secondary>port offsets</secondary>
565
566 <see>Tape Coordinator</see>
567 </indexterm>
568
569 <indexterm>
570 <primary>Tape Coordinator (Backup System)</primary>
571
572 <secondary>port offset number</secondary>
573
574 <tertiary>defined</tertiary>
575 </indexterm>
576
577 <para>A <emphasis>Tape Coordinator machine</emphasis> is a machine that drives one or more attached tape devices used for
578 backup operations. It must run the AFS client software (the Cache Manager) but reside in a physically secure location to
579 prevent unauthorized access to its console. Before backup operations can run on a Tape Coordinator machine, each tape device
580 on the machine must be registered in the Backup Database, and certain files and directories must exist on the machine's local
581 disk; for instructions, see <link linkend="HDRWQ262">To configure a Tape Coordinator machine</link>.</para>
582
583 <para>Each tape device on a Tape Coordinator machine listens for backup requests on a different UNIX port. You pick the port
584 indirectly by assigning a <emphasis>port offset number</emphasis> to the tape device. The Backup System sets the device's
585 actual port by adding the port offset to a base port number that it determines internally. For instructions on assigning port
586 offset numbers, see <link linkend="HDRWQ258">Configuring the tapeconfig File</link>.</para>
587
588 <para>For a tape device to perform backup operations, a Backup Tape Coordinator (<emphasis role="bold">butc</emphasis>)
589 process dedicated to the device must be running actively on the Tape Coordinator machine. You then direct backup requests to
590 the device's Tape Coordinator by specifying its port offset number with the <emphasis role="bold">-portoffset</emphasis>
591 argument to the <emphasis role="bold">backup</emphasis> command.</para>
592
593 <para>In addition to writing backup data to tape, you can direct it to a <emphasis>backup data file</emphasis> on the local
594 disk of a Tape Coordinator machine. You can then to transfer the data to a data-archiving system, such as a hierarchical
595 storage management (HSM) system, that you use in conjunction with AFS and the Backup System. A backup data file has a port
596 offset like a tape device. For instructions on configuring backup data files, see <link linkend="HDRWQ282">Dumping Data to a
597 Backup Data File</link>.</para>
598 </sect2>
599
600 <sect2 id="HDRWQ256">
601 <title>The Backup Database and Backup Server Process</title>
602
603 <indexterm>
604 <primary>Backup Database</primary>
605
606 <secondary>described</secondary>
607 </indexterm>
608
609 <indexterm>
610 <primary>Backup System</primary>
611
612 <secondary>Backup Database</secondary>
613
614 <see>Backup Database</see>
615 </indexterm>
616
617 <para>The <emphasis>Backup Database</emphasis> is a replicated administrative database maintained by the Backup Server process
618 on the cell's database server machines. Like the other AFS database server processes, the <emphasis>Backup Server</emphasis>
619 uses the Ubik utility to keep the various copies of the database synchronized (for a discussion of Ubik, see <link
620 linkend="HDRWQ52">Replicating the OpenAFS Administrative Databases</link>).</para>
621
622 <para>The Backup Database records the following information: <itemizedlist>
623 <listitem>
624 <para>The Tape Coordinator machine's hostname and the port offset number for each tape device used for backup
625 operations</para>
626 </listitem>
627
628 <listitem>
629 <para>The dump hierarchy, which consists of its component dump levels and their associated expiration dates</para>
630 </listitem>
631
632 <listitem>
633 <para>The volume sets and their component volume entries</para>
634 </listitem>
635
636 <listitem>
637 <para>A record for each dump, which includes the name of each tape it appears on, a list of the volumes from which data
638 is included, the dump level, the expiration date, and the dump ID of the initial dump with which the dump is
639 associated</para>
640 </listitem>
641
642 <listitem>
643 <para>A record for each tape that houses dumped data</para>
644 </listitem>
645 </itemizedlist></para>
646 </sect2>
647
648 <sect2 id="Header_280">
649 <title>Interfaces to the Backup System</title>
650
651 <para>The <emphasis role="bold">backup</emphasis> suite of commands is the administrative interface to the Backup System. You
652 can issue the commands in a command shell (or invoke them in a shell script) on any AFS client or server machine from which
653 you can access the <emphasis role="bold">backup</emphasis> binary. In the conventional configuration, the binary resides on
654 the local disk.</para>
655
656 <para>The <emphasis role="bold">backup</emphasis> command suite provides an <emphasis>interactive mode</emphasis>, in which
657 you can issue multiple commands over a persistent connection to the Backup Server and the Volume Location (VL) Server.
658 Interactive mode has several convenient features, including the following: <itemizedlist>
659 <listitem>
660 <para>You need to type only the operation code, omitting the initial <emphasis role="bold">backup</emphasis>
661 string.</para>
662 </listitem>
663
664 <listitem>
665 <para>If you assume another AFS identity or specify a foreign cell as you enter interactive mode, it applies to all
666 subsequent commands.</para>
667 </listitem>
668
669 <listitem>
670 <para>You do not need to enclose shell metacharacters in double quotes.</para>
671 </listitem>
672
673 <listitem>
674 <para>You can track current and pending operations with the <emphasis role="bold">(backup) jobs</emphasis> command,
675 which is available only in this mode.</para>
676 </listitem>
677
678 <listitem>
679 <para>You can cancel current and pending operations with the <emphasis role="bold">(backup) kill</emphasis> command,
680 which is available only in this mode.</para>
681 </listitem>
682 </itemizedlist></para>
683
684 <para>Before issuing a command that requires reading or writing a tape (or backup data file), you must also open a connection
685 to the Tape Coordinator machine that is attached to the relevant tape device (or that has the backup data file on its local
686 disk), and issue the <emphasis role="bold">butc</emphasis> command to initialize the Tape Coordinator process. The process
687 must continue to run and the connection remain open as long as you need to use the tape device or file for backup
688 operations.</para>
689
690 <para>For further discussion and instructions, see <link linkend="HDRWQ286">Using the Backup System's
691 Interfaces</link>.</para>
692 </sect2>
693 </sect1>
694
695 <sect1 id="HDRWQ257">
696 <title>Overview of Backup System Configuration</title>
697
698 <indexterm>
699 <primary>Backup System</primary>
700
701 <secondary>configuration overview</secondary>
702 </indexterm>
703
704 <para>Before you can use the Backup System to back up and restore data, you must configure several of its basic components. The
705 indicated sections of this chapter explain how to perform the following configuration tasks: <itemizedlist>
706 <listitem>
707 <para>Determining a tape's capacity and a tape device's filemark size, and recording them in the <emphasis
708 role="bold">/usr/afs/backup/tapeconfig</emphasis> file (see <link linkend="HDRWQ258">Configuring the tapeconfig
709 File</link>)</para>
710 </listitem>
711
712 <listitem>
713 <para>Determining how to grant administrative privilege to backup operators (see <link linkend="HDRWQ260">Granting
714 Administrative Privilege to Backup Operators</link>)</para>
715 </listitem>
716
717 <listitem>
718 <para>Configuring Tape Coordinator machines, tape devices, and backup data files (see <link linkend="HDRWQ261">Configuring
719 Tape Coordinator Machines and Tape Devices</link>)</para>
720 </listitem>
721
722 <listitem>
723 <para>Defining volume sets and volume entries (see <link linkend="HDRWQ265">Defining and Displaying Volume Sets and Volume
724 Entries</link>)</para>
725 </listitem>
726
727 <listitem>
728 <para>Defining dump levels to create a dump hierarchy (see <link linkend="HDRWQ267">Defining and Displaying the Dump
729 Hierarchy</link>)</para>
730 </listitem>
731
732 <listitem>
733 <para>Labeling tapes (see <link linkend="HDRWQ272">Writing and Reading Tape Labels</link>)</para>
734 </listitem>
735
736 <listitem>
737 <para>Creating a device configuration file to automate the backup process (see <link linkend="HDRWQ275">Automating and
738 Increasing the Efficiency of the Backup Process</link>)</para>
739 </listitem>
740 </itemizedlist></para>
741
742 <para>If you have already configured all of the components required for performing a backup dump or restore operation, you can
743 proceed to the instructions in <link linkend="HDRWQ296">Backing Up Data</link> and <link linkend="HDRWQ306">Restoring and
744 Recovering Data</link>.</para>
745 </sect1>
746
747 <sect1 id="HDRWQ258">
748 <title>Configuring the tapeconfig File</title>
749
750 <indexterm>
751 <primary>tapes (Backup System)</primary>
752
753 <secondary>capacity</secondary>
754
755 <tertiary>determining</tertiary>
756 </indexterm>
757
758 <indexterm>
759 <primary>Tape Coordinator (Backup System)</primary>
760
761 <secondary>filemark</secondary>
762
763 <tertiary>determining size</tertiary>
764 </indexterm>
765
766 <indexterm>
767 <primary>Tape Coordinator (Backup System)</primary>
768
769 <secondary>port offset number</secondary>
770
771 <tertiary>assigning</tertiary>
772 </indexterm>
773
774 <indexterm>
775 <primary>files</primary>
776
777 <secondary>tapeconfig</secondary>
778 </indexterm>
779
780 <indexterm>
781 <primary>tapeconfig file</primary>
782 </indexterm>
783
784 <para>Several factors interact to determine how much data the Tape Coordinator can fit on a tape: <itemizedlist>
785 <listitem>
786 <para>The tape's capacity (size), as set by the tape manufacturer.</para>
787 </listitem>
788
789 <listitem>
790 <para>The tape device's filemark size, as set by the tape device's manufacturer. Recall from <link linkend="HDRWQ254">Tape
791 Labels, Dump Labels, and EOF Markers</link> that the Tape Coordinator writes a filemark between the data from each volume
792 in a dump. If a dump contains a small amount of data from each of a large number of volumes, as incremental dumps often
793 do, then the filemark size can significantly affect how much volume data fits on the tape.</para>
794 </listitem>
795
796 <listitem>
797 <para>Whether or not you use the tape device's compression mode.</para>
798 </listitem>
799 </itemizedlist></para>
800
801 <para>(The amount of data that can fit in a backup data file is determined by amount of space available on the partition, and
802 the operating system's maximum file size. The Tape Coordinator does not write filemarks when writing to a backup data file. For
803 further information about configuring a Tape Coordinator to write to a backup data file, see <link linkend="HDRWQ282">Dumping
804 Data to a Backup Data File</link>.)</para>
805
806 <para>As the Tape Coordinator (<emphasis role="bold">butc</emphasis>) process initializes, it reads the <emphasis
807 role="bold">/usr/afs/backup/tapeconfig</emphasis> file on its local disk to learn the tape capacity and filemark size (for a
808 tape device) or the file size (for a backup data file) to use for dump operations. When you begin a dump operation, the Tape
809 Coordinator also reads the tape or backup data file's label to see if you have recorded a different tape capacity or file size.
810 If you have, the value on the label overrides the default value from the <emphasis role="bold">tapeconfig</emphasis>
811 file.</para>
812
813 <para>As the Tape Coordinator writes data to a tape during a dump operation, it uses the capacity and filemark information to
814 track how much tape it has used and how much remains before the physical end-of-tape (EOT). Shortly before reaching EOT, the
815 Tape Coordinator stops writing and requests a new tape. Similarly, it uses a backup data file's size to know when it is about to
816 exhaust the space in the file. If the Tape Coordinator reaches the EOT unexpectedly, it recovers by obtaining a new tape and
817 writing to it the entire contents of the volume it was writing when it reached EOT. The interrupted volume remains on the first
818 tape, but is never used.</para>
819
820 <para>Many tape devices use tapes that can accommodate multiple gigabytes, or even multiple terabytes, of backup data,
821 especially if you use the device's compression mode. When writing to such devices and tapes, allowing the Tape Coordinator to
822 hit the EOT unexpectedly is generally recommended. The devices write data so quickly that it usually does not take much extra
823 time to rewrite the interrupted volume on the new tape. Similarly, they compress data so well that the data abandoned on the
824 first tape from the interrupted volume does not constitute a waste of much tape.</para>
825
826 <para>When writing to tapes that accommodate a smaller amount of data (say, less than two GB), it is better to avoid having the
827 Tape Coordinator hit EOT unexpectedly. AFS supports volumes up to 2 GB in size, so an interrupted volume can in fact take up
828 most of the tape. For such tapes, recording accurate values for tape capacity and filemark size, if possible, helps to maximize
829 both use of tape and the efficiency of dump operations. The following discussion of the fields in the <emphasis
830 role="bold">tapeconfig</emphasis> file explains how to determine the appropriate values.</para>
831
832 <para>Use a text editor to create an entry in a Tape Coordinator's <emphasis role="bold">tapeconfig</emphasis> file for each
833 tape device or backup data file that it uses. Each device or file's entry is on its own line and has the following
834 format:</para>
835
836 <programlisting>
837 [capacity filemark_size] device_name port_offset
838</programlisting>
839
840 <para>where <variablelist>
841 <varlistentry>
842 <term><emphasis role="bold">capacity</emphasis></term>
843
844 <listitem>
845 <para>Specifies the capacity of the tapes used with a tape device, or the amount of data to write into a backup data
846 file. Specify an integer value followed by a letter that indicates units, with no intervening space. The letter
847 <emphasis role="bold">k</emphasis> or <emphasis role="bold">K</emphasis> indicates kilobytes, <emphasis
848 role="bold">m</emphasis> or <emphasis role="bold">M</emphasis> indicates megabytes, <emphasis role="bold">g</emphasis>
849 or <emphasis role="bold">G</emphasis> indicates gigabytes, and <emphasis role="bold">t</emphasis> or <emphasis
850 role="bold">T</emphasis> indicates terabytes. If the units letter is omitted, the default is kilobytes.</para>
851
852 <para>To determine the capacity of a tape under two GB in size that you are going to use in regular (noncompression)
853 mode, you can either use the value that the tape's manufacturer specifies on the tape's packaging or use the <emphasis
854 role="bold">fms</emphasis> command to calculate the capacity, as described later in this section. To avoid having the
855 Tape Coordinator reach the EOT unexpectedly, it is best to record in the <emphasis role="bold">tapeconfig</emphasis>
856 file or on the label a capacity that is about 10% smaller than the actual capacity of the tape. To calculate the
857 appropriate value for a small tape used in compression mode, one method is to multiply the tape capacity (as recorded by
858 the manufacturer) by the device's compression ratio.</para>
859
860 <para>For tapes that hold multiple gigabytes or terabytes of data, or if using a tape drive's compression mode, the
861 recommended configuration is to record a value quite a bit (for instance, two times) larger than the maximum amount you
862 believe can fit on the tape. It is not generally worthwhile to run the <emphasis role="bold">fms</emphasis> command on
863 large tapes, even in noncompression mode. The command definitely does not yield accurate results in compression mode.
864 The Tape Coordinator is likely to reach the EOT unexpectedly, but compression mode fits so much data on the tape that
865 the data abandoned from an interrupted volume does not represent much of the tape's capacity.</para>
866
867 <para>For a backup data file, record a value slightly smaller than the amount of space available on the partition, and
868 definitely smaller than the operating system's maximum file size. It is also best to limit the ability of other
869 processes to write to the partition, to prevent them from using up the space in the partition.</para>
870
871 <para>If this field is empty, the Tape Coordinator uses the maximum acceptable value (2048 GB or 2 TB). Either leave
872 both this field and the filemark_size field empty, or provide a value in both of them.</para>
873 </listitem>
874 </varlistentry>
875
876 <varlistentry>
877 <term><emphasis role="bold">filemark_size</emphasis></term>
878
879 <listitem>
880 <para>Specifies the tape device's filemark size, which usually falls between 2 KB and 2 MB. Use the same notation as for
881 the capacity field, but note that if you omit the units letter, the default unit is bytes rather than kilobytes.</para>
882
883 <para>For a tape device in regular (noncompression) mode, you can use the <emphasis role="bold">fms</emphasis> command
884 to determine filemark size, or use the value reported by the device's manufacturer. To help the Tape Coordinator avoid
885 reaching EOT unexpectedly, increase the value by about 10% when recording it in the <emphasis
886 role="bold">tapeconfig</emphasis> file.</para>
887
888 <para>The recommended value for a tape device in compression mode is <emphasis role="bold">0</emphasis> (zero). The
889 <emphasis role="bold">fms</emphasis> command does not yield accurate results in compression mode, so you cannot use it
890 to determine the filemark size.</para>
891
892 <para>The recommended value for a backup data file is also <emphasis role="bold">0</emphasis> (zero). The Tape
893 Coordinator does not use filemarks when writing to a file, but a value must appear in this field nevertheless if there
894 is also a value in the capacity field.</para>
895
896 <para>If this field is empty, the Tape Coordinator uses the value <emphasis role="bold">0</emphasis> (zero). Either
897 leave both this field and the capacity field empty, or provide a value in both of them.</para>
898 </listitem>
899 </varlistentry>
900
901 <varlistentry>
902 <term><emphasis role="bold">device_name</emphasis></term>
903
904 <listitem>
905 <para>Specifies the complete pathname of the tape device or backup data file. The format of tape device names depends on
906 the operating system, but on UNIX systems, device names generally begin with the string <emphasis
907 role="bold">/dev/</emphasis>. For a backup data file, this field defines the complete pathname, but for suggestions on
908 how to name a backup data file, see <link linkend="HDRWQ282">Dumping Data to a Backup Data File</link>.</para>
909 </listitem>
910 </varlistentry>
911
912 <varlistentry>
913 <term><emphasis role="bold">port_offset</emphasis></term>
914
915 <listitem>
916 <para>Specifies the port offset number for a specific tape device or backup data file. Each tape device listens for
917 backup requests on a different UNIX port. You pick the port indirectly by recording a value in this field. The Backup
918 System sets the device's actual port by adding the port offset to a base port number that it determines
919 internally.</para>
920
921 <para>Legal values are the integers <emphasis role="bold">0</emphasis> through <emphasis role="bold">58510</emphasis>
922 (the Backup System can track a maximum of 58,511 port offset numbers). Each value must be unique among the cell's Tape
923 Coordinators, but you do not have to assign port offset numbers sequentially, and you can associate any number of them
924 with a single machine or even tape device. For example, if you plan to use a device in both compression and
925 noncompression mode, assign it two different port offsets with appropriate tape capacity and filemark values for the
926 different modes.</para>
927
928 <para>Assign port offset <emphasis role="bold">0</emphasis> (zero) to the Tape Coordinator for the tape device or backup
929 data file that you use most often for backup operations; doing so enables you to omit the <emphasis
930 role="bold">-portoffset</emphasis> argument from the largest possible number of <emphasis role="bold">backup</emphasis>
931 commands.</para>
932 </listitem>
933 </varlistentry>
934 </variablelist></para>
935
936 <para>The following example <emphasis role="bold">tapeconfig</emphasis> file includes entries for two tape devices, <emphasis
937 role="bold">/dev/rmt0h</emphasis> and <emphasis role="bold">/dev/rmt1h</emphasis>. Each one uses tapes with a capacity of 2 GB
938 and has a filemark size of 1 MB. Their port offset numbers are <computeroutput>0</computeroutput> and
939 <computeroutput>1</computeroutput>.</para>
940
941 <programlisting>
942 2g 1m /dev/rmt0h 0
943 2G 1M /dev/rmt1h 1
944</programlisting>
945
946 <para>The <emphasis role="bold">fms</emphasis> command reports the capacity of the tape you have inserted and the tape device's
947 filemark size, both on the standard output stream (stdout) and in its <emphasis role="bold">fms.log</emphasis> file, which it
948 writes in the current working directory. The command interpreter must write data to the entire tape, so running the command can
949 take from several hours to more than a day, depending on the size of the tape.</para>
950
951 <sect2 id="HDRWQ259">
952 <title>To run the fms command on a noncompressing tape device</title>
953
954 <indexterm>
955 <primary>fms.log file</primary>
956 </indexterm>
957
958 <indexterm>
959 <primary>files</primary>
960
961 <secondary>fms.log</secondary>
962 </indexterm>
963
964 <indexterm>
965 <primary>log files</primary>
966
967 <secondary>fms.log</secondary>
968 </indexterm>
969
970 <indexterm>
971 <primary>commands</primary>
972
973 <secondary>fms</secondary>
974 </indexterm>
975
976 <indexterm>
977 <primary>fms command</primary>
978 </indexterm>
979
980 <orderedlist>
981 <listitem>
982 <para>If an <emphasis role="bold">fms.log</emphasis> file does not already exist in the current directory, verify that you
983 can insert and write to files in the current directory. If the log file already exists, you must be able to write to the
984 file.</para>
985 </listitem>
986
987 <listitem>
988 <para>Insert a tape into the drive. Running the command completely overwrites the tape, so use a blank tape or one that
989 you want to recycle.</para>
990 </listitem>
991
992 <listitem>
993 <para>Issue the <emphasis role="bold">fms</emphasis> command. <programlisting>
994 % <emphasis role="bold">fms</emphasis> &lt;<replaceable>tape special file</replaceable>&gt;
995</programlisting></para>
996
997 <para>where <variablelist>
998 <varlistentry>
999 <term><emphasis role="bold">fms</emphasis></term>
1000
1001 <listitem>
1002 <para>Must be typed in full.</para>
1003 </listitem>
1004 </varlistentry>
1005
1006 <varlistentry>
1007 <term><emphasis role="bold">tape special file</emphasis></term>
1008
1009 <listitem>
1010 <para>Specifies the tape device's UNIX device name, such as <emphasis role="bold">/dev/rmt0h</emphasis>.</para>
1011 </listitem>
1012 </varlistentry>
1013 </variablelist></para>
1014 </listitem>
1015 </orderedlist>
1016
1017 <para>The following example output reports that the tape in the device with device name <emphasis
1018 role="bold">/dev/rmt0h</emphasis> has a capacity of 2136604672 bytes (about 2 GB), and that the device's filemark size is
1019 1910205 bytes (close to 2 MB).</para>
1020
1021 <programlisting>
1022 % <emphasis role="bold">fms /dev/rmt0h</emphasis>
1023 wrote block: 130408
1024 Finished data capacity test - rewinding
1025 wrote 1109 blocks, 1109 file marks
1026 Finished file mark test
1027 Tape capacity is 2136604672 bytes
1028 File marks are 1910205 bytes
1029</programlisting>
1030 </sect2>
1031 </sect1>
1032
1033 <sect1 id="HDRWQ260">
1034 <title>Granting Administrative Privilege to Backup Operators</title>
1035
1036 <para>Each person who issues the <emphasis role="bold">backup</emphasis> and <emphasis role="bold">butc</emphasis> commands in
1037 your cell must be listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis> file on every database server machine
1038 that stores the Backup Database and Volume Location Database (VLDB), and every machine that houses a volume included in a volume
1039 set. By convention, the <emphasis role="bold">UserList</emphasis> file is the same on every server machine in the cell; the
1040 instructions in this document assume that your cell is configured in this way. To edit the <emphasis
1041 role="bold">UserList</emphasis> file, use the <emphasis role="bold">bos adduser</emphasis> and <emphasis role="bold">bos
1042 removeuser</emphasis> commands as described in <link linkend="HDRWQ592">Administering the UserList File</link>.</para>
1043
1044 <para>In addition to being listed in the <emphasis role="bold">UserList</emphasis> file, backup operators who issue the
1045 <emphasis role="bold">butc</emphasis> command must be able to write to the files stored in each Tape Coordinator machine's local
1046 <emphasis role="bold">/usr/afs/backup</emphasis> directory, which are protected by UNIX mode bits. Before configuring your
1047 cell's first Tape Coordinator machine, decide which local user and group to designate as the owner of the directory and the
1048 files in it. Among the possible ownership options are the following: <itemizedlist>
1049 <listitem>
1050 <para>The local superuser <emphasis role="bold">root</emphasis>. With this option, the issuer of the <emphasis
1051 role="bold">butc</emphasis> command must log onto the local file system as the local superuser <emphasis
1052 role="bold">root</emphasis>. If the Tape Coordinator is also a server machine, the <emphasis
1053 role="bold">-localauth</emphasis> flag is used on the <emphasis role="bold">butc</emphasis> command to construct a server
1054 ticket from the local <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file. On non-server machine, the issuer must
1055 issue the <emphasis role="bold">klog</emphasis> command to authenticate as an AFS administrator while logged in as
1056 <emphasis role="bold">root</emphasis>.</para>
1057 </listitem>
1058
1059 <listitem>
1060 <para>A single AFS administrator. Logging in and authenticating are a single step if an AFS-modified login utility is
1061 used. The administrator is the only user who can start the Tape Coordinator.</para>
1062 </listitem>
1063
1064 <listitem>
1065 <para>An administrative account for which several operators know the password. This allows them all to start the Tape
1066 Coordinator.</para>
1067 </listitem>
1068 </itemizedlist></para>
1069
1070 <para>Another option is to define a group in the local group file (<emphasis role="bold">/etc/group</emphasis> or equivalent) to
1071 which all backup operators belong. Then turn on the <emphasis role="bold">w</emphasis> mode bit (<emphasis
1072 role="bold">write</emphasis> permission) in the group mode bits rather than the user mode bits of the <emphasis
1073 role="bold">/usr/afs/backup</emphasis> directory and files in it. An advantage over the methods listed previously is that each
1074 operator can retain an individual administrative account for finer granularity in auditing.</para>
1075
1076 <para>For instructions on implementing your choice of protection methods, see <link linkend="HDRWQ261">Configuring Tape
1077 Coordinator Machines and Tape Devices</link>.</para>
1078 </sect1>
1079
1080 <sect1 id="HDRWQ261">
1081 <title>Configuring Tape Coordinator Machines and Tape Devices</title>
1082
1083 <indexterm>
1084 <primary>Tape Coordinator (Backup System)</primary>
1085
1086 <secondary>configuring</secondary>
1087
1088 <tertiary>machine</tertiary>
1089 </indexterm>
1090
1091 <indexterm>
1092 <primary>Tape Coordinator (Backup System)</primary>
1093
1094 <secondary>configuring</secondary>
1095
1096 <tertiary>tape device</tertiary>
1097 </indexterm>
1098
1099 <indexterm>
1100 <primary>Tape Coordinator (Backup System)</primary>
1101
1102 <secondary>configuring</secondary>
1103
1104 <tertiary>AIX system</tertiary>
1105 </indexterm>
1106
1107 <indexterm>
1108 <primary>AIX</primary>
1109
1110 <secondary>configuring tape device</secondary>
1111 </indexterm>
1112
1113 <para>This section explains how to configure a machine as a Tape Coordinator machine, and how to configure or remove the Tape
1114 Coordinator associated with a single tape device or backup data file.</para>
1115
1116 <note>
1117 <para>When configuring a tape device attached to an AIX system, you must set the device's tape block size to <emphasis
1118 role="bold">0</emphasis> (zero) to indicate variable block size. If you do not, it is possible that devices attached to
1119 machines of other system types cannot read the tapes made on the AIX system. Use the AIX <emphasis role="bold">smit</emphasis>
1120 program to verify or change the value of the tape block size for a tape device, as instructed in Sep <link
1121 linkend="LIWQ263">3</link>.</para>
1122 </note>
1123
1124 <sect2 id="HDRWQ262">
1125 <title>To configure a Tape Coordinator machine</title>
1126
1127 <orderedlist>
1128 <listitem>
1129 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
1130 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
1131 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
1132 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
1133</programlisting></para>
1134 </listitem>
1135
1136 <listitem>
1137 <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1138 the <emphasis role="bold">su</emphasis> command. <programlisting>
1139 % <emphasis role="bold">su root</emphasis>
1140 Password: &lt;<replaceable>root_password</replaceable>&gt;
1141</programlisting></para>
1142 </listitem>
1143
1144 <listitem id="LIWQ263">
1145 <para>Install one or more tape devices on the Tape Coordinator machine according to the
1146 manufacturer's instructions. The Backup System can track a maximum of 58,511 tape devices or backup data files per
1147 cell.</para>
1148
1149 <para>If the Tape Coordinator machine is an AIX system, issue the following command to change the tape device's tape block
1150 size to <emphasis role="bold">0</emphasis> (zero), which indicates variable block size. Repeat for each tape
1151 device.</para>
1152
1153 <programlisting>
1154 # <emphasis role="bold">chdev -l '</emphasis>device_name<emphasis role="bold">' -a block_size='0'</emphasis>
1155</programlisting>
1156
1157 <para>where device_name is the tape device's device name (for example, <emphasis
1158 role="bold">/dev/rmt0h</emphasis>).</para>
1159 </listitem>
1160
1161 <listitem>
1162 <para>Verify that the binary files for the <emphasis role="bold">backup</emphasis>, <emphasis role="bold">butc</emphasis>,
1163 and <emphasis role="bold">fms</emphasis> commands are available on the local disk. If the machine is an AFS client, the
1164 conventional location is the <emphasis role="bold">/usr/afsws/etc</emphasis> directory. <programlisting>
1165 # <emphasis role="bold">ls /usr/afsws/etc</emphasis>
1166</programlisting></para>
1167 </listitem>
1168
1169 <listitem>
1170 <para>Create the <emphasis role="bold">/usr/afs</emphasis> directory. (If the Tape Coordinator machine is also configured
1171 as a file server machine, this directory already exists.) Then create the <emphasis role="bold">/usr/afs/backup</emphasis>
1172 directory. <programlisting>
1173 # <emphasis role="bold">mkdir /usr/afs</emphasis>
1174 # <emphasis role="bold">mkdir /usr/afs/backup</emphasis>
1175</programlisting></para>
1176 </listitem>
1177
1178 <listitem>
1179 <para>Use a text editor to create the <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis> file. Include a single
1180 line for each tape device or backup data file, specifying the following information in the indicated order. For syntax
1181 details and suggestions on the values to use in each field, see <link linkend="HDRWQ258">Configuring the tapeconfig
1182 File</link>. <itemizedlist>
1183 <listitem>
1184 <para>The capacity of tapes to be used in the device, or the size of the backup data file</para>
1185 </listitem>
1186
1187 <listitem>
1188 <para>The device's filemark size</para>
1189 </listitem>
1190
1191 <listitem>
1192 <para>The device's device name, starting with the string <emphasis role="bold">/dev/</emphasis></para>
1193 </listitem>
1194
1195 <listitem>
1196 <para>The device's port offset number</para>
1197 </listitem>
1198 </itemizedlist></para>
1199
1200 <indexterm>
1201 <primary>Tape Coordinator (Backup System)</primary>
1202
1203 <secondary>assigning file ownership</secondary>
1204 </indexterm>
1205
1206 <indexterm>
1207 <primary>usr/afs/backup directory</primary>
1208
1209 <secondary>ownership, assigning</secondary>
1210 </indexterm>
1211
1212 <indexterm>
1213 <primary>tapeconfig file</primary>
1214
1215 <secondary>ownership, assigning</secondary>
1216 </indexterm>
1217
1218 <indexterm>
1219 <primary>directories</primary>
1220
1221 <secondary>/usr/afs/backup</secondary>
1222 </indexterm>
1223 </listitem>
1224
1225 <listitem>
1226 <para>Decide which user and group are to own the <emphasis role="bold">/usr/afs/backup</emphasis> directory and <emphasis
1227 role="bold">/usr/afs/backup/tapeconfig</emphasis> file, based on the suggestions in <link linkend="HDRWQ260">Granting
1228 Administrative Privilege to Backup Operators</link>. Correct the UNIX mode bits on the directory and file, if necessary.
1229 <programlisting>
1230 # <emphasis role="bold">chown</emphasis> admin_owner <emphasis role="bold">/usr/afs/backup</emphasis>
1231 # <emphasis role="bold">chown</emphasis> admin_owner <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis>
1232 # <emphasis role="bold">chgrp</emphasis> admin_group <emphasis role="bold">/usr/afs/backup</emphasis>
1233 # <emphasis role="bold">chgrp</emphasis> admin_group <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis>
1234 # <emphasis role="bold">chmod 774 /usr/afs/backup</emphasis>
1235 # <emphasis role="bold">chmod 664 /usr/afs/backup/tapeconfig</emphasis>
1236</programlisting></para>
1237
1238 <indexterm>
1239 <primary>commands</primary>
1240
1241 <secondary>backup addhost</secondary>
1242 </indexterm>
1243
1244 <indexterm>
1245 <primary>backup commands</primary>
1246
1247 <secondary>addhost</secondary>
1248 </indexterm>
1249
1250 <indexterm>
1251 <primary>Tape Coordinator (Backup System)</primary>
1252
1253 <secondary>adding to Backup Database</secondary>
1254 </indexterm>
1255
1256 <indexterm>
1257 <primary>Backup Database</primary>
1258
1259 <secondary>Tape Coordinator</secondary>
1260
1261 <tertiary>adding entry</tertiary>
1262 </indexterm>
1263 </listitem>
1264
1265 <listitem id="LICONFTC-ADDHOST">
1266 <para>Issue the <emphasis role="bold">backup addhost</emphasis> command to create a Tape
1267 Coordinator entry in the Backup Database. Repeat the command for each Tape Coordinator. <programlisting>
1268 # <emphasis role="bold">backup addhost</emphasis> &lt;<replaceable>tape machine name</replaceable>&gt; [&lt;<replaceable>TC port offset</replaceable>&gt;]
1269</programlisting></para>
1270
1271 <para>where <variablelist>
1272 <varlistentry>
1273 <term><emphasis role="bold">addh</emphasis></term>
1274
1275 <listitem>
1276 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">addhost</emphasis>.</para>
1277 </listitem>
1278 </varlistentry>
1279
1280 <varlistentry>
1281 <term><emphasis role="bold">tape machine name</emphasis></term>
1282
1283 <listitem>
1284 <para>Specifies the Tape Coordinator machine's fully qualified hostname.</para>
1285 </listitem>
1286 </varlistentry>
1287
1288 <varlistentry>
1289 <term><emphasis role="bold">TC port offset</emphasis></term>
1290
1291 <listitem>
1292 <para>Specifies the tape device's port offset number. Provide the same value as you specified for the device in
1293 the <emphasis role="bold">tapeconfig</emphasis> file. You must provide this argument unless the default value of 0
1294 (zero) is appropriate.</para>
1295 </listitem>
1296 </varlistentry>
1297 </variablelist></para>
1298 </listitem>
1299 </orderedlist>
1300 </sect2>
1301
1302 <sect2 id="Header_287">
1303 <title>To configure an additional Tape Coordinator on an existing Tape Coordinator machine</title>
1304
1305 <orderedlist>
1306 <listitem>
1307 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
1308 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
1309 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
1310 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
1311</programlisting></para>
1312 </listitem>
1313
1314 <listitem>
1315 <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
1316 the <emphasis role="bold">su</emphasis> command. <programlisting>
1317 % <emphasis role="bold">su root</emphasis>
1318 Password: &lt;<replaceable>root_password</replaceable>&gt;
1319</programlisting></para>
1320 </listitem>
1321
1322 <listitem>
1323 <para>Install the tape device on the Tape Coordinator machine according to the manufacturer's instructions.</para>
1324
1325 <para>If the Tape Coordinator machine is an AIX system, issue the following command to change the tape device's tape block
1326 size to <emphasis role="bold">0</emphasis> (zero), which indicates variable block size.</para>
1327
1328 <programlisting>
1329 # <emphasis role="bold">chdev -l '</emphasis>device_name<emphasis role="bold">' -a block_size='0'</emphasis>
1330</programlisting>
1331 </listitem>
1332
1333 <listitem>
1334 <para>Choose the port offset number to assign to the tape device. If necessary, use the <emphasis role="bold">backup
1335 listhosts</emphasis> command to display the port offset numbers that are already used; for a discussion of the output, see
1336 <link linkend="HDRWQ264">To display the list of configured Tape Coordinators</link>. <programlisting>
1337 # <emphasis role="bold">backup listhosts</emphasis>
1338</programlisting></para>
1339
1340 <para>where <emphasis role="bold">listh</emphasis> is the shortest acceptable abbreviation of <emphasis
1341 role="bold">listhosts</emphasis>.</para>
1342 </listitem>
1343
1344 <listitem>
1345 <para>Use a text editor to add one or more entries for the device to the <emphasis
1346 role="bold">/usr/afs/backup/tapeconfig</emphasis> file. Specify the following information in the indicated order. For
1347 syntax details and suggestions on the values to use in each field, see <link linkend="HDRWQ258">Configuring the tapeconfig
1348 File</link>. <itemizedlist>
1349 <listitem>
1350 <para>The capacity of tapes to be used in the device, or the size of the backup data file</para>
1351 </listitem>
1352
1353 <listitem>
1354 <para>The device's filemark size</para>
1355 </listitem>
1356
1357 <listitem>
1358 <para>The device's device name, starting with the string <emphasis role="bold">/dev/</emphasis></para>
1359 </listitem>
1360
1361 <listitem>
1362 <para>The device's port offset number</para>
1363 </listitem>
1364 </itemizedlist></para>
1365 </listitem>
1366
1367 <listitem>
1368 <para>Issue the <emphasis role="bold">backup addhost</emphasis> command to create an entry in the Backup Database for the
1369 Tape Coordinator. For complete syntax, see Step <link linkend="LICONFTC-ADDHOST">8</link> in <link linkend="HDRWQ262">To
1370 configure a Tape Coordinator machine</link>. <programlisting>
1371 # <emphasis role="bold">backup addhost</emphasis> &lt;<replaceable>tape machine name</replaceable>&gt; [&lt;<replaceable>TC port offset</replaceable>&gt;]
1372</programlisting></para>
1373 </listitem>
1374 </orderedlist>
1375
1376 <indexterm>
1377 <primary>backup commands</primary>
1378
1379 <secondary>delhost</secondary>
1380 </indexterm>
1381
1382 <indexterm>
1383 <primary>commands</primary>
1384
1385 <secondary>backup delhost</secondary>
1386 </indexterm>
1387
1388 <indexterm>
1389 <primary>Tape Coordinator (Backup System)</primary>
1390
1391 <secondary>removing from Backup Database</secondary>
1392 </indexterm>
1393
1394 <indexterm>
1395 <primary>Backup Database</primary>
1396
1397 <secondary>Tape Coordinator</secondary>
1398
1399 <tertiary>removing entry</tertiary>
1400 </indexterm>
1401 </sect2>
1402
1403 <sect2 id="Header_288">
1404 <title>To unconfigure a Tape Coordinator</title>
1405
1406 <orderedlist>
1407 <listitem>
1408 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
1409 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
1410 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
1411 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
1412</programlisting></para>
1413 </listitem>
1414
1415 <listitem>
1416 <para>Using a text editor, remove each of the Tape Coordinator's entries from the <emphasis
1417 role="bold">/usr/afs/backup/tapeconfig</emphasis> file.</para>
1418 </listitem>
1419
1420 <listitem>
1421 <para>Issue the <emphasis role="bold">backup delhost</emphasis> command to delete the Tape Coordinator's Backup Database
1422 entry. <programlisting>
1423 % <emphasis role="bold">backup delhost</emphasis> &lt;<replaceable>tape machine name</replaceable>&gt; [&lt;<replaceable>TC port offset</replaceable>&gt;]
1424</programlisting></para>
1425
1426 <para>where <variablelist>
1427 <varlistentry>
1428 <term><emphasis role="bold">delh</emphasis></term>
1429
1430 <listitem>
1431 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">delhost</emphasis>.</para>
1432 </listitem>
1433 </varlistentry>
1434
1435 <varlistentry>
1436 <term><emphasis role="bold">tape machine name</emphasis></term>
1437
1438 <listitem>
1439 <para>Is the complete Internet host name of the Tape Coordinator machine.</para>
1440 </listitem>
1441 </varlistentry>
1442
1443 <varlistentry>
1444 <term><emphasis role="bold">TC port offset</emphasis></term>
1445
1446 <listitem>
1447 <para>Is the same port offset number removed from the <emphasis role="bold">tapeconfig</emphasis> file. You must
1448 provide this argument unless the default value of <emphasis role="bold">0</emphasis> (zero) is appropriate.</para>
1449 </listitem>
1450 </varlistentry>
1451 </variablelist></para>
1452 </listitem>
1453 </orderedlist>
1454
1455 <indexterm>
1456 <primary>Tape Coordinator (Backup System)</primary>
1457
1458 <secondary>port offset number</secondary>
1459
1460 <tertiary>displaying</tertiary>
1461 </indexterm>
1462
1463 <indexterm>
1464 <primary>Backup Database</primary>
1465
1466 <secondary>port offset numbers</secondary>
1467
1468 <tertiary>displaying</tertiary>
1469 </indexterm>
1470
1471 <indexterm>
1472 <primary>backup commands</primary>
1473
1474 <secondary>listhosts</secondary>
1475 </indexterm>
1476
1477 <indexterm>
1478 <primary>commands</primary>
1479
1480 <secondary>backup listhosts</secondary>
1481 </indexterm>
1482 </sect2>
1483
1484 <sect2 id="HDRWQ264">
1485 <title>To display the list of configured Tape Coordinators</title>
1486
1487 <orderedlist>
1488 <listitem>
1489 <para>Issue the <emphasis role="bold">backup listhosts</emphasis> command to list the Tape Coordinators and port offset
1490 numbers currently configured in the Backup Database. <programlisting>
1491 % <emphasis role="bold">backup listhosts</emphasis>
1492</programlisting></para>
1493
1494 <para>where <variablelist>
1495 <varlistentry>
1496 <term><emphasis role="bold">listh</emphasis></term>
1497
1498 <listitem>
1499 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">listhosts</emphasis>.</para>
1500 </listitem>
1501 </varlistentry>
1502 </variablelist></para>
1503 </listitem>
1504 </orderedlist>
1505
1506 <para>The output lists each Tape Coordinator machine and the port offset numbers currently allocated to it in the Backup
1507 Database. The appearance of a port offset number does not imply that the associated Tape Coordinator is actually running.
1508 Machine names appear in the format in which they were specified with the <emphasis role="bold">backup addhost</emphasis>
1509 command.</para>
1510
1511 <para>The following example output lists the Tape Coordinators currently defined in the Backup Database of the Example Corporation
1512 cell:</para>
1513
1514 <programlisting>
1515 % <emphasis role="bold">backup listhosts</emphasis>
1516 Tape hosts:
1517 Host backup1.example.com, port offset 0
1518 Host backup1.example.com, port offset 2
1519 Host backup2.example.com, port offset 1
1520 Host backup2.example.com, port offset 3
1521</programlisting>
1522 </sect2>
1523 </sect1>
1524
1525 <sect1 id="HDRWQ265">
1526 <title>Defining and Displaying Volume Sets and Volume Entries</title>
1527
1528 <para>The Backup System handles data at the level of volumes rather than individual files. You must define groups of volumes
1529 called <emphasis>volume sets</emphasis> before performing backup operations, by using the <emphasis role="bold">backup
1530 addvolset</emphasis> command. A volume set name can be up to 31 characters long and can include any character other than the
1531 period (<emphasis role="bold">.</emphasis>), but avoid using metacharacters that have special meanings to the shell.</para>
1532
1533 <para>After creating a volume set, use the <emphasis role="bold">backup addvolentry</emphasis> command to place one or more
1534 <emphasis>volume entries</emphasis> in it. They define the volumes that belong to it in terms of their location (file server
1535 machine and partition) and name. Use the command's required <emphasis role="bold">-server</emphasis> argument to designate the
1536 file server machine that houses the volumes of interest and its required <emphasis role="bold">-partition</emphasis> argument to
1537 designate the partition. Two types of values are acceptable: <itemizedlist>
1538 <listitem>
1539 <para>The fully qualified hostname of one machine or full name of one partition (such as <emphasis
1540 role="bold">/vicepm</emphasis>)</para>
1541 </listitem>
1542
1543 <listitem>
1544 <para>The regular expression <emphasis role="bold">.*</emphasis> (period and asterisk), which matches every machine name
1545 or partition name in the VLDB</para>
1546 </listitem>
1547 </itemizedlist></para>
1548
1549 <indexterm>
1550 <primary>regular expression</primary>
1551
1552 <secondary>Backup System</secondary>
1553 </indexterm>
1554
1555 <indexterm>
1556 <primary>Backup System</primary>
1557
1558 <secondary>regular expressions</secondary>
1559 </indexterm>
1560
1561 <para>For the volume name (the required <emphasis role="bold">-volume</emphasis> argument), specify a combination of
1562 alphanumeric characters and one or more metacharacters to specify part or all of the volume name with a wildcard. You can use
1563 any of the following metacharacters in the volume name field: <variablelist>
1564 <varlistentry>
1565 <term><emphasis role="bold">.</emphasis></term>
1566
1567 <listitem>
1568 <para>The period matches any single character.</para>
1569 </listitem>
1570 </varlistentry>
1571
1572 <varlistentry>
1573 <term><emphasis role="bold">*</emphasis></term>
1574
1575 <listitem>
1576 <para>The asterisk matches zero or more instances of the preceding character. Combine it with any other alphanumeric
1577 character or metacharacter.</para>
1578 </listitem>
1579 </varlistentry>
1580
1581 <varlistentry>
1582 <term><emphasis role="bold">[ ]</emphasis></term>
1583
1584 <listitem>
1585 <para>Square brackets around a list of characters match a single instance of any of the characters, but no other
1586 characters; for example, <emphasis role="bold">[abc]</emphasis> matches a single <emphasis role="bold">a</emphasis> or
1587 <emphasis role="bold">b</emphasis> or <emphasis role="bold">c</emphasis>, but not <emphasis role="bold">d</emphasis> or
1588 <emphasis role="bold">A</emphasis>. You can combine this expression with the asterisk.</para>
1589 </listitem>
1590 </varlistentry>
1591
1592 <varlistentry>
1593 <term><emphasis role="bold">^</emphasis></term>
1594
1595 <listitem>
1596 <para>The caret, when used as the first character in a square-bracketed set, designates a match with any single
1597 character other than the characters that follow it; for example, <emphasis role="bold">[^a]</emphasis> matches any
1598 single character except lowercase <emphasis role="bold">a</emphasis>. You can combine this expression with the
1599 asterisk.</para>
1600 </listitem>
1601 </varlistentry>
1602
1603 <varlistentry>
1604 <term><emphasis role="bold">\</emphasis></term>
1605
1606 <listitem>
1607 <para>A backslash preceding any of the metacharacters in this list makes it match its literal value only. For example,
1608 the expression <emphasis role="bold">\.</emphasis> (backslash and period) matches a single period, <emphasis
1609 role="bold">\*</emphasis> matches a single asterisk, and <emphasis role="bold">\\</emphasis> matches a single backslash.
1610 You can combine such expressions with the asterisk (for example, <emphasis role="bold">\.*</emphasis> matches any number
1611 of periods).</para>
1612 </listitem>
1613 </varlistentry>
1614 </variablelist></para>
1615
1616 <para>Perhaps the most common regular expression is the period followed by an asterisk (<emphasis role="bold">.*</emphasis>).
1617 This expression matches any string of any length, because the period matches any character and the asterisk means any number of
1618 that character. As mentioned, it is the only acceptable regular expression in the file server and partition fields of a volume
1619 entry. In the volume name field, it can stand alone (in which case it matches every volume listed in the VLDB), or can combine
1620 with alphanumeric characters. For example, the string <emphasis role="bold">user.*\.backup</emphasis> matches any volume name
1621 that begins with the string <emphasis role="bold">user</emphasis> and ends with <emphasis role="bold">.backup</emphasis>.</para>
1622
1623 <para>Issuing the <emphasis role="bold">backup addvolentry</emphasis> command in interactive mode is simplest. If you issue it
1624 at the shell prompt, you must surround any string that includes a regular expression with double quotes (<emphasis role="bold">"
1625 "</emphasis>) so that the shell passes them uninterpreted to the <emphasis role="bold">backup</emphasis> command interpreter
1626 rather than resolving them.</para>
1627
1628 <para>To define various combinations of volumes, provide the following types of values for the <emphasis role="bold">backup
1629 addvolentry</emphasis> command's three arguments. The list uses the notation appropriate for interactive mode; if you issue the
1630 command at the shell prompt instead, place double quotes around any string that includes a regular expression. To create a
1631 volume entry that includes: <itemizedlist>
1632 <listitem>
1633 <para>All volumes listed in the VLDB, use the regular expression <emphasis role="bold">.*</emphasis> for all three
1634 arguments (<emphasis role="bold">-server .* -partition .* -volume .*</emphasis>)</para>
1635 </listitem>
1636
1637 <listitem>
1638 <para>Every volume on a specific file server machine, specify its fully qualified hostname as the <emphasis
1639 role="bold">-server</emphasis> argument and use the regular expression <emphasis role="bold">.*</emphasis> for the
1640 <emphasis role="bold">-partition</emphasis> and -<emphasis role="bold">volume</emphasis> arguments (for example: <emphasis
1641 role="bold">-server fs1.example.com -partition .* -volume .*</emphasis>)</para>
1642 </listitem>
1643
1644 <listitem>
1645 <para>All volumes that reside on a partition with the same name on various file server machines, specify the complete
1646 partition name as the <emphasis role="bold">-partition</emphasis> argument and use the regular expression <emphasis
1647 role="bold">.*</emphasis> for the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-volume</emphasis>
1648 arguments (for example: <emphasis role="bold">-server .* -partition /vicepd -volume .*</emphasis>)</para>
1649 </listitem>
1650
1651 <listitem>
1652 <para>Every volume with a common string in its name, use the regular expression <emphasis role="bold">.*</emphasis> for
1653 the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis> arguments, and provide a
1654 combination of alphanumeric characters and metacharacters as the <emphasis role="bold">-volume</emphasis> argument (for
1655 example: <emphasis role="bold">-server .* -partition .* -volume .*\.backup</emphasis> includes all volumes whose names end
1656 in the string <emphasis role="bold">.backup</emphasis>).</para>
1657 </listitem>
1658
1659 <listitem>
1660 <para>All volumes on one partition, specify the machine's fully qualified hostname as the <emphasis
1661 role="bold">-server</emphasis> argument and the full partition name as the <emphasis role="bold">-partition</emphasis>
1662 argument, and use the regular expression <emphasis role="bold">.*</emphasis> for the <emphasis
1663 role="bold">-volume</emphasis> argument (for example: <emphasis role="bold">-server fs2.example.com -partition /vicepb -volume
1664 .*</emphasis>).</para>
1665 </listitem>
1666
1667 <listitem>
1668 <para>A single volume, specify its complete name as the <emphasis role="bold">-volume</emphasis> argument. To bypass the
1669 potentially time-consuming search through the VLDB for matching entries, you can specify an actual machine and partition
1670 name for the <emphasis role="bold">-server</emphasis> and <emphasis role="bold">-partition</emphasis> arguments
1671 respectively. However, if it is possible that you need to move the volume in future, it is best to use the regular
1672 expression <emphasis role="bold">.*</emphasis> for the machine and partition name.</para>
1673 </listitem>
1674 </itemizedlist></para>
1675
1676 <para>As you create volume sets, define groups of volumes you want to dump to the same tape at the same time (for example,
1677 weekly or daily) and in the same manner (fully or incrementally). In general, a volume set that includes volumes with similar
1678 contents (as indicated by similar names) is more useful than one that includes volumes that share a common location, especially
1679 if you often move volumes for load-balancing or space reasons. Most often, then, it is appropriate to use the regular expression
1680 <emphasis role="bold">.*</emphasis> (period followed by a backslash) for the <emphasis role="bold">-server</emphasis> and
1681 <emphasis role="bold">-partition</emphasis> arguments to the <emphasis role="bold">backup addvolentry</emphasis> command.</para>
1682
1683 <para>It is generally more efficient to include a limited number of volumes in a volume entry. Dumps of a volume set that
1684 includes a large number of volume can take a long time to complete, increasing the possibility that the operation fails due to a
1685 service interruption or outage.</para>
1686
1687 <para>To remove a volume entry from a volume set, use the <emphasis role="bold">backup delvolentry</emphasis> command. To remove
1688 a volume set and all of its component volume entries from the Backup Database, use the <emphasis role="bold">backup
1689 delvolset</emphasis> command. To display the volume entries in a volume set, use the <emphasis role="bold">backup
1690 listvolsets</emphasis> command.</para>
1691
1692 <para>By default, a Backup Database record is created for the new volume set. Sometimes it is convenient to create volume sets
1693 without recording them permanently in the Backup Database, for example when using the <emphasis role="bold">backup
1694 volsetrestore</emphasis> command to restore a group of volumes that were not necessarily backed up together (for further
1695 discussion, see <link linkend="HDRWQ312">Using the backup volsetrestore Command</link>). To create a
1696 <emphasis>temporary</emphasis> volume set, include the <emphasis role="bold">-temporary</emphasis> flag to the <emphasis
1697 role="bold">backup addvolset</emphasis> command. A temporary volume set exists only during the lifetime of the current
1698 interactive session, so the flag is effective only when used during an interactive session (opened by issuing the <emphasis
1699 role="bold">backup (interactive)</emphasis> command). You can use the <emphasis role="bold">backup delvolset</emphasis> command
1700 to delete a temporary volume set before the interactive session ends, if you wish, but as noted it is automatically deleted when
1701 you end the session. One advantage of temporary volume sets is that the <emphasis role="bold">backup addvolset</emphasis>
1702 command, and any <emphasis role="bold">backup addvolentry</emphasis> commands subsequently used to add volume entries to it,
1703 complete more quickly than for regular volume sets, because you are not creating any Backup Database records.</para>
1704
1705 <indexterm>
1706 <primary>Backup Database</primary>
1707
1708 <secondary>volume set</secondary>
1709
1710 <tertiary>creating</tertiary>
1711 </indexterm>
1712
1713 <indexterm>
1714 <primary>volume set (Backup System)</primary>
1715
1716 <secondary>creating</secondary>
1717 </indexterm>
1718
1719 <indexterm>
1720 <primary>commands</primary>
1721
1722 <secondary>backup addvolset</secondary>
1723 </indexterm>
1724
1725 <indexterm>
1726 <primary>backup commands</primary>
1727
1728 <secondary>addvolset</secondary>
1729 </indexterm>
1730
1731 <sect2 id="Header_291">
1732 <title>To create a volume set</title>
1733
1734 <orderedlist>
1735 <listitem>
1736 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
1737 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
1738 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
1739 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
1740</programlisting></para>
1741 </listitem>
1742
1743 <listitem>
1744 <para><emphasis role="bold">(Optional)</emphasis> Issue the <emphasis role="bold">backup</emphasis> command to enter
1745 interactive mode. If you are going to define volume entries right away with the <emphasis role="bold">backup
1746 addvolentry</emphasis> command, this eliminates the need to surround metacharacter expressions with double quotes. You
1747 must enter interactive mode if creating a temporary volume set. <programlisting>
1748 % <emphasis role="bold">backup</emphasis>
1749</programlisting></para>
1750 </listitem>
1751
1752 <listitem>
1753 <para>Issue the <emphasis role="bold">(backup) addvolset</emphasis> command to create the volume set. You must then issue
1754 the <emphasis role="bold">(backup) addvolentry</emphasis> command to define volume entries in it. <programlisting>
1755 backup&gt; <emphasis role="bold">addvolset</emphasis> &lt;<replaceable>volume set name</replaceable>&gt; [<emphasis role="bold">-temporary</emphasis>]
1756</programlisting></para>
1757
1758 <para>where <variablelist>
1759 <varlistentry>
1760 <term><emphasis role="bold">addvols</emphasis></term>
1761
1762 <listitem>
1763 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">addvolset</emphasis>.</para>
1764 </listitem>
1765 </varlistentry>
1766
1767 <varlistentry>
1768 <term><emphasis role="bold">volume set name</emphasis></term>
1769
1770 <listitem>
1771 <para>Names the volume set. The name can include no more than 31 characters, cannot include periods, and must be
1772 unique within the Backup Database. (A temporary volume set can have the same name as an existing permanent volume
1773 set, but this is not recommended because of the confusion it can cause.)</para>
1774 </listitem>
1775 </varlistentry>
1776
1777 <varlistentry>
1778 <term><emphasis role="bold">-temporary</emphasis></term>
1779
1780 <listitem>
1781 <para>Creates a temporary volume set, which exists only during the current interactive session.</para>
1782 </listitem>
1783 </varlistentry>
1784 </variablelist></para>
1785 </listitem>
1786 </orderedlist>
1787
1788 <indexterm>
1789 <primary>volume entry (Backup System)</primary>
1790
1791 <secondary>creating</secondary>
1792 </indexterm>
1793
1794 <indexterm>
1795 <primary>Backup Database</primary>
1796
1797 <secondary>volume entry</secondary>
1798
1799 <tertiary>creating</tertiary>
1800 </indexterm>
1801
1802 <indexterm>
1803 <primary>commands</primary>
1804
1805 <secondary>backup addvolentry</secondary>
1806 </indexterm>
1807
1808 <indexterm>
1809 <primary>backup commands</primary>
1810
1811 <secondary>addvolentry</secondary>
1812 </indexterm>
1813 </sect2>
1814
1815 <sect2 id="Header_292">
1816 <title>To add a volume entry to a volume set</title>
1817
1818 <orderedlist>
1819 <listitem>
1820 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
1821 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
1822 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
1823 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
1824</programlisting></para>
1825 </listitem>
1826
1827 <listitem>
1828 <para><emphasis role="bold">(Optional)</emphasis> Issue the <emphasis role="bold">backup</emphasis> command to enter
1829 interactive mode if you have not already. This makes it simpler to use metacharacter expressions, because you do not need
1830 to surround them with double quotes. If you are adding entries to a temporary volume set, you must already have entered
1831 interactive mode before creating the volume set. <programlisting>
1832 % <emphasis role="bold">backup</emphasis>
1833</programlisting></para>
1834 </listitem>
1835
1836 <listitem>
1837 <para>Issue the <emphasis role="bold">(backup) addvolentry</emphasis> command to define volume entries in an existing
1838 volume set. The Backup System assigns each volume entry an index within the volume set, starting with 1 (one).
1839 <programlisting>
1840 backup&gt; <emphasis role="bold">addvolentry -name</emphasis> &lt;<replaceable>volume set name</replaceable>&gt; \
1841 <emphasis role="bold">-server</emphasis> &lt;<replaceable>machine name</replaceable>&gt; \
1842 <emphasis role="bold">-partition</emphasis> &lt;<replaceable>partition name</replaceable>&gt; \
1843 <emphasis role="bold">-volumes</emphasis> &lt;<replaceable>volume name (regular expression)</replaceable>&gt;
1844</programlisting></para>
1845
1846 <para>where <variablelist>
1847 <varlistentry>
1848 <term><emphasis role="bold">addvole</emphasis></term>
1849
1850 <listitem>
1851 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">addvolentry</emphasis>.</para>
1852 </listitem>
1853 </varlistentry>
1854
1855 <varlistentry>
1856 <term><emphasis role="bold">-name</emphasis></term>
1857
1858 <listitem>
1859 <para>Names the volume set to which to add the volume entry. It must already exist (use the <emphasis
1860 role="bold">backup addvolset</emphasis> command to create it).</para>
1861 </listitem>
1862 </varlistentry>
1863
1864 <varlistentry>
1865 <term><emphasis role="bold">-server</emphasis></term>
1866
1867 <listitem>
1868 <para>Defines the set of one or more file server machines that house the volumes in the volume entry. Provide
1869 either one fully-qualified hostname (such as <emphasis role="bold">fs1.example.com</emphasis>) or the metacharacter
1870 expression <emphasis role="bold">.*</emphasis> (period and asterisk), which matches all machine names in the
1871 VLDB.</para>
1872 </listitem>
1873 </varlistentry>
1874
1875 <varlistentry>
1876 <term><emphasis role="bold">-partition</emphasis></term>
1877
1878 <listitem>
1879 <para>Defines the set of one or more partitions that house the volumes in the volume entry. Provide either one
1880 complete partition name (such as <emphasis role="bold">/vicepa</emphasis>) or the metacharacter expression
1881 <emphasis role="bold">.*</emphasis> (period and asterisk), which matches all partition names.</para>
1882 </listitem>
1883 </varlistentry>
1884
1885 <varlistentry>
1886 <term><emphasis role="bold">-volumes</emphasis></term>
1887
1888 <listitem>
1889 <para>Defines the set of one or more volumes included in the volume entry, identifying them by name. This argument
1890 can include a combination of alphanumeric characters and one or more of the metacharacter expressions discussed in
1891 the introductory material in this section.</para>
1892 </listitem>
1893 </varlistentry>
1894 </variablelist></para>
1895 </listitem>
1896 </orderedlist>
1897
1898 <indexterm>
1899 <primary>Backup Database</primary>
1900
1901 <secondary>volume set</secondary>
1902
1903 <tertiary>displaying</tertiary>
1904 </indexterm>
1905
1906 <indexterm>
1907 <primary>Backup Database</primary>
1908
1909 <secondary>volume entry</secondary>
1910
1911 <tertiary>displaying</tertiary>
1912 </indexterm>
1913
1914 <indexterm>
1915 <primary>volume set (Backup System)</primary>
1916
1917 <secondary>displaying</secondary>
1918 </indexterm>
1919
1920 <indexterm>
1921 <primary>volume entry (Backup System)</primary>
1922
1923 <secondary>displaying</secondary>
1924 </indexterm>
1925
1926 <indexterm>
1927 <primary>backup commands</primary>
1928
1929 <secondary>listvolsets</secondary>
1930 </indexterm>
1931
1932 <indexterm>
1933 <primary>commands</primary>
1934
1935 <secondary>backup listvolsets</secondary>
1936 </indexterm>
1937 </sect2>
1938
1939 <sect2 id="HDRWQ266">
1940 <title>To display volume sets and volume entries</title>
1941
1942 <orderedlist>
1943 <listitem>
1944 <para>Issue the <emphasis role="bold">backup listvolsets</emphasis> command to display the volume entries in a specific
1945 volume set or all of them. If you are displaying a temporary volume set, you must still be in the interactive session in
1946 which you created it. <programlisting>
1947 % <emphasis role="bold">backup listvolsets</emphasis> [&lt;<replaceable>volume set name</replaceable>&gt;]
1948</programlisting></para>
1949
1950 <para>where <variablelist>
1951 <varlistentry>
1952 <term><emphasis role="bold">listv</emphasis></term>
1953
1954 <listitem>
1955 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">listvolsets</emphasis>.</para>
1956 </listitem>
1957 </varlistentry>
1958
1959 <varlistentry>
1960 <term><emphasis role="bold">volume set name</emphasis></term>
1961
1962 <listitem>
1963 <para>Names the volume set to display. Omit this argument to display all defined volume sets.</para>
1964 </listitem>
1965 </varlistentry>
1966 </variablelist></para>
1967
1968 <para>The output from the command uses the wildcard notation used when the volume entries were created. The string
1969 <computeroutput>(temporary)</computeroutput> marks a temporary volume set. The following example displays all three of the
1970 volume sets defined in a cell's Backup Database, plus a temporary volume set <emphasis role="bold">pat+jones</emphasis>
1971 created during the current interactive session:</para>
1972
1973 <programlisting>
1974 backup&gt; <emphasis role="bold">listv</emphasis>
1975 Volume set pat+jones (temporary):
1976 Entry 1: server fs1.example.com, partition /vicepe, volumes: user.pat.backup
1977 Entry 2: server fs5.example.com, partition /viceph, volumes: user.jones.backup
1978 Volume set user:
1979 Entry 1: server .*, partition .*, volumes: user.*\.backup
1980 Volume set sun:
1981 Entry 1: server .*, partition .*, volumes: sun4x_55\..*
1982 Entry 2: server .*, partition .*, volumes: sun4x_56\..*
1983 Volume set rs:
1984 Entry 1: server .*, partition .*, volumes: rs_aix42\..*
1985</programlisting>
1986 </listitem>
1987 </orderedlist>
1988
1989 <indexterm>
1990 <primary>Backup Database</primary>
1991
1992 <secondary>volume set</secondary>
1993
1994 <tertiary>deleting</tertiary>
1995 </indexterm>
1996
1997 <indexterm>
1998 <primary>volume set (Backup System)</primary>
1999
2000 <secondary>deleting</secondary>
2001 </indexterm>
2002
2003 <indexterm>
2004 <primary>commands</primary>
2005
2006 <secondary>backup delvolset</secondary>
2007 </indexterm>
2008
2009 <indexterm>
2010 <primary>backup commands</primary>
2011
2012 <secondary>delvolset</secondary>
2013 </indexterm>
2014 </sect2>
2015
2016 <sect2 id="Header_294">
2017 <title>To delete a volume set</title>
2018
2019 <orderedlist>
2020 <listitem>
2021 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
2022 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
2023 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
2024 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
2025</programlisting></para>
2026 </listitem>
2027
2028 <listitem>
2029 <para>Issue the <emphasis role="bold">backup delvolset</emphasis> command to delete one or more volume sets and all of the
2030 component volume entries in them. If you are deleting a temporary volume set, you must still be in the interactive session
2031 in which you created it. <programlisting>
2032 % <emphasis role="bold">backup delvolset</emphasis> &lt;<replaceable>volume set name</replaceable>&gt;+
2033</programlisting></para>
2034
2035 <para>where <variablelist>
2036 <varlistentry>
2037 <term><emphasis role="bold">delvols</emphasis></term>
2038
2039 <listitem>
2040 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">delvolset</emphasis>.</para>
2041 </listitem>
2042 </varlistentry>
2043
2044 <varlistentry>
2045 <term><emphasis role="bold">volume set name</emphasis></term>
2046
2047 <listitem>
2048 <para>Names each volume set to delete.</para>
2049 </listitem>
2050 </varlistentry>
2051 </variablelist></para>
2052 </listitem>
2053 </orderedlist>
2054
2055 <indexterm>
2056 <primary>Backup Database</primary>
2057
2058 <secondary>volume entry</secondary>
2059
2060 <tertiary>deleting from volume set</tertiary>
2061 </indexterm>
2062
2063 <indexterm>
2064 <primary>volume set (Backup System)</primary>
2065
2066 <secondary>deleting volume entry</secondary>
2067 </indexterm>
2068
2069 <indexterm>
2070 <primary>volume entry (Backup System)</primary>
2071
2072 <secondary>deleting</secondary>
2073 </indexterm>
2074
2075 <indexterm>
2076 <primary>commands</primary>
2077
2078 <secondary>backup delvolentry</secondary>
2079 </indexterm>
2080
2081 <indexterm>
2082 <primary>backup commands</primary>
2083
2084 <secondary>delvolentry</secondary>
2085 </indexterm>
2086 </sect2>
2087
2088 <sect2 id="Header_295">
2089 <title>To delete a volume entry from a volume set</title>
2090
2091 <orderedlist>
2092 <listitem>
2093 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
2094 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
2095 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
2096 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
2097</programlisting></para>
2098 </listitem>
2099
2100 <listitem>
2101 <para>Issue the <emphasis role="bold">backup</emphasis> command to enter interactive mode. <programlisting>
2102 % <emphasis role="bold">backup</emphasis>
2103</programlisting></para>
2104 </listitem>
2105
2106 <listitem>
2107 <para>If the volume set includes more than one volume entry, issue the <emphasis role="bold">(backup)
2108 listvolsets</emphasis> command to display the index number associated with each one (if there is only one volume entry,
2109 its index is 1). For a more detailed description of the command's output, see <link linkend="HDRWQ266">To display volume
2110 sets and volume entries</link>. <programlisting>
2111 backup&gt; <emphasis role="bold">listvolsets</emphasis> &lt;<replaceable>volume set name</replaceable>&gt;
2112</programlisting></para>
2113
2114 <para>where <variablelist>
2115 <varlistentry>
2116 <term><emphasis role="bold">listv</emphasis></term>
2117
2118 <listitem>
2119 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">listvolsets</emphasis>.</para>
2120 </listitem>
2121 </varlistentry>
2122
2123 <varlistentry>
2124 <term><emphasis role="bold">volume set name</emphasis></term>
2125
2126 <listitem>
2127 <para>Names the volume set for which to display volume entries.</para>
2128 </listitem>
2129 </varlistentry>
2130 </variablelist></para>
2131 </listitem>
2132
2133 <listitem>
2134 <para>Issue the <emphasis role="bold">(backup) delvolentry</emphasis> command to delete the volume entry. <programlisting>
2135 backup&gt; <emphasis role="bold">delvolentry</emphasis> &lt;<replaceable>volume set name</replaceable>&gt; &lt;<replaceable>volume entry index</replaceable>&gt;
2136</programlisting></para>
2137
2138 <para>where <variablelist>
2139 <varlistentry>
2140 <term><emphasis role="bold">delvole</emphasis></term>
2141
2142 <listitem>
2143 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">delvolentry</emphasis>.</para>
2144 </listitem>
2145 </varlistentry>
2146
2147 <varlistentry>
2148 <term><emphasis role="bold">volume set name</emphasis></term>
2149
2150 <listitem>
2151 <para>Names the volume set from which to delete a volume entry.</para>
2152 </listitem>
2153 </varlistentry>
2154
2155 <varlistentry>
2156 <term><emphasis role="bold">volume entry index</emphasis></term>
2157
2158 <listitem>
2159 <para>Specifies the index number of the volume entry to delete.</para>
2160 </listitem>
2161 </varlistentry>
2162 </variablelist></para>
2163 </listitem>
2164 </orderedlist>
2165 </sect2>
2166 </sect1>
2167
2168 <sect1 id="HDRWQ267">
2169 <title>Defining and Displaying the Dump Hierarchy</title>
2170
2171 <indexterm>
2172 <primary>dump hierarchy (Backup System)</primary>
2173
2174 <secondary>creating</secondary>
2175 </indexterm>
2176
2177 <indexterm>
2178 <primary>dump hierarchy (Backup System)</primary>
2179
2180 <secondary>expiration dates</secondary>
2181
2182 <tertiary>assigning to dump levels</tertiary>
2183 </indexterm>
2184
2185 <para>A dump hierarchy is a logical structure in the Backup Database that defines the relationship between full and incremental
2186 dumps; that is, it defines which dump serves as the parent for an incremental dump. Each individual component of a hierarchy is
2187 a dump level.</para>
2188
2189 <para>As you define dump levels with the <emphasis role="bold">backup adddump</emphasis> command, keep the following rules and
2190 suggestions in mind: <itemizedlist>
2191 <listitem>
2192 <para>Each full dump level is the top level of a hierarchy. You can create as many hierarchies as you need to dump
2193 different volume sets on different schedules.</para>
2194 </listitem>
2195
2196 <listitem>
2197 <para>The name of a full dump level consists of an initial slash (<emphasis role="bold">/</emphasis>), followed by a
2198 string of up to 28 alphanumeric characters.</para>
2199 </listitem>
2200
2201 <listitem>
2202 <para>The name of an incremental dump level resembles a pathname, starting with the name of a full dump level, then the
2203 first incremental level, and so on, down to the final incremental level. Precede each level name with a slash to separate
2204 it from the preceding level. Like the full level, each component level in the name can have up to 28 alphanumeric
2205 characters, not including the slash.</para>
2206 </listitem>
2207
2208 <listitem>
2209 <para>A hierarchy can have any have any number of levels, but the maximum length of a complete dump level name is 256
2210 characters, including the slashes.</para>
2211 </listitem>
2212
2213 <listitem>
2214 <para>Before defining a given incremental level, you must define all of the levels above it in the hierarchy.</para>
2215 </listitem>
2216
2217 <listitem>
2218 <para>Do not use the period (<emphasis role="bold">.</emphasis>) in dump level names. The Backup System uses the period as
2219 the separator between a dump's volume set name and dump level name when it creates the dump name and AFS tape name. Any
2220 other alphanumeric and punctuation characters are allowed, but it is best to avoid metacharacters. If you include a
2221 metacharacter, you must precede it with a backslash (<emphasis role="bold">\</emphasis>) or surround the entire dump level
2222 name with double quotes (<emphasis role="bold">" "</emphasis>).</para>
2223 </listitem>
2224
2225 <listitem>
2226 <para>Naming dump levels for days or other actual time points reminds you when to perform dumps, and makes it easier to
2227 track the relationship between dumps performed at different levels. However, the names have no meaning to the Backup
2228 System: it does not automatically create dumps according to the names, and does not prevent you from, for example, using
2229 the <emphasis role="bold">/sunday</emphasis> level when creating a dump on a Tuesday.</para>
2230 </listitem>
2231
2232 <listitem>
2233 <para>It is best not to use the same name for more than one component level in a hierarchy, because it means the resulting
2234 dump name no longer indicates which level was used. For example, if you name a dump level <emphasis
2235 role="bold">/full/incr/incr</emphasis>, then the dump name and AFS tape name that result from dumping a volume set at the
2236 first incremental level (<emphasis role="bold">/full/incr</emphasis>) look the same as the names that result from dumping
2237 at the second incremental level (<emphasis role="bold">/full/incr/incr</emphasis>).</para>
2238 </listitem>
2239
2240 <listitem>
2241 <para>Individual levels in different hierarchies can have the same name, but the complete pathnames must be unique. For
2242 example, <emphasis role="bold">/sunday1/monday</emphasis> and <emphasis role="bold">/sunday2/monday</emphasis> share the
2243 same name at the final level, but are unique because they have different names at the full level (belong to different
2244 hierarchies). However, using the same name in multiple hierarchies means that dump and AFS tape names do not unambiguously
2245 indicate which hierarchy was used.</para>
2246 </listitem>
2247 </itemizedlist></para>
2248
2249 <para>The following example shows three hierarchies. Each begins with a full dump at the top: <emphasis
2250 role="bold">sunday1</emphasis> for the first hierarchy, <emphasis role="bold">sunday2</emphasis> for the second hierarchy, and
2251 <emphasis role="bold">sunday_bin</emphasis> for the third hierarchy. In all three hierarchies, each of the other dump levels is
2252 an incremental level.</para>
2253
2254 <programlisting>
2255 /sunday1
2256 /monday
2257 /tuesday
2258 /wednesday
2259 /thursday
2260 /friday
2261 /sunday2
2262 /monday
2263 /tuesday
2264 /wednesday
2265 /thursday
2266 /friday
2267 /sunday_bin
2268 /monday
2269 /wednesday
2270 /friday
2271</programlisting>
2272
2273 <para>In the first hierarchy, each incremental dump level refers to the full level <emphasis role="bold">/sunday1</emphasis> as
2274 its parent. When (for example) you dump a volume set at the <emphasis role="bold">/sunday1/wednesday</emphasis> level, it
2275 includes data that has changed since the volume set was dumped at the <emphasis role="bold">/sunday1</emphasis> level.</para>
2276
2277 <para>In contrast, each incremental dump level in the second hierarchy refers to the immediately preceding dump level as its
2278 parent. When you dump a volume set at the corresponding level in the second hierarchy (<emphasis
2279 role="bold">/sunday2/monday/tuesday/wednesday</emphasis>), the dump includes only data that has changed since the volume set was
2280 dumped at the <emphasis role="bold">/sunday2/monday/tuesday</emphasis> level (presumably the day before). Assuming you create
2281 dumps on the indicated days, an incremental dump made using this hierarchy contains less data than an incremental dump made at
2282 the corresponding level in the first hierarchy.</para>
2283
2284 <para>The third hierarchy is more appropriate for dumping volumes for which a daily backup is excessive because the data does
2285 not change often (for example, system binaries).</para>
2286
2287 <sect2 id="HDRWQ268">
2288 <title>Creating a Tape Recycling Schedule</title>
2289
2290 <indexterm>
2291 <primary>expiration dates</primary>
2292 </indexterm>
2293
2294 <indexterm>
2295 <primary>Backup Database</primary>
2296
2297 <secondary>expiration dates</secondary>
2298 </indexterm>
2299
2300 <indexterm>
2301 <primary>dump hierarchy (Backup System)</primary>
2302
2303 <secondary>expiration dates</secondary>
2304 </indexterm>
2305
2306 <indexterm>
2307 <primary>dump levels</primary>
2308
2309 <secondary>expiration dates</secondary>
2310 </indexterm>
2311
2312 <indexterm>
2313 <primary>expiration dates</primary>
2314
2315 <secondary>absolute</secondary>
2316 </indexterm>
2317
2318 <indexterm>
2319 <primary>expiration dates</primary>
2320
2321 <secondary>relative</secondary>
2322 </indexterm>
2323
2324 <indexterm>
2325 <primary>Backup System</primary>
2326
2327 <secondary>recycling schedule for tapes</secondary>
2328 </indexterm>
2329
2330 <indexterm>
2331 <primary>tape recycling schedules</primary>
2332 </indexterm>
2333
2334 <para>If your cell is like most cells, you have a limited amount of room for storing backup tapes and a limited budget for new
2335 tapes. The easiest solution is to recycle tapes by overwriting them when you no longer need the backup data on them. The
2336 Backup System helps you implement a recycling schedule by enabling you to associate an expiration date with each dump level.
2337 The expiration date defines when a dump created at that level expires. Until that time the Backup System refuses to overwrite
2338 a tape that contains the dump. Thus, assigning expiration dates automatically determines how you recycle tapes.</para>
2339
2340 <para>When designing a tape-recycling schedule, you must decide how far in the past and to what level of precision you want to
2341 guarantee access to backed up data. For instance, if you decide to guarantee that you can restore a user's home volume to its
2342 state on any given day in the last two weeks, you cannot recycle the tape that contains a given daily dump for at least two
2343 weeks after you create it. Similarly, if you decide to guarantee that you can restore home volumes to their state at the
2344 beginning of any given week in the last month, you cannot recycle the tapes in a dump set containing a weekly dump for at
2345 least four weeks. The following example dump hierarchy implements this recycling schedule by setting the expiration date for
2346 each daily incremental dump to 13 days and the expiration date of the weekly full dumps to 27 days.</para>
2347
2348 <para>The tapes used to store dumps created at the daily incremental levels in the <emphasis role="bold">/sunday1</emphasis>
2349 hierarchy expire just in time to be recycled for daily dumps in the <emphasis role="bold">/sunday3</emphasis> hierarchy (and
2350 vice versa), and there is a similar relationship between the <emphasis role="bold">/sunday2</emphasis> and <emphasis
2351 role="bold">/sunday4</emphasis> hierarchies. Similarly, the tape that houses a full dump at the <emphasis
2352 role="bold">/sunday1</emphasis> level expires just in time to be used for a full dump on the first Sunday of the following
2353 month.</para>
2354
2355 <programlisting>
2356 /sunday1 expires in 27d
2357 /monday1 expires in 13d
2358 /tuesday1 expires in 13d
2359 /wednesday1 expires in 13d
2360 /thursday1 expires in 13d
2361 /friday1 expires in 13d
2362 /sunday2 expires in 27d
2363 /monday2 expires in 13d
2364 /tuesday2 expires in 13d
2365 /wednesday2 expires in 13d
2366 /thursday2 expires in 13d
2367 /friday2 expires in 13d
2368 /sunday3 expires in 27d
2369 /monday1 expires in 13d
2370 /tuesday1 expires in 13d
2371 /wednesday1 expires in 13d
2372 /thursday1 expires in 13d
2373 /friday1 expires in 13d
2374 /sunday4 expires in 27d
2375 /monday2 expires in 13d
2376 /tuesday2 expires in 13d
2377 /wednesday2 expires in 13d
2378 /thursday2 expires in 13d
2379 /friday2 expires in 13d
2380</programlisting>
2381
2382 <para>If you use appended dumps in your cell, keep in mind that all dumps in a dump set are subject to the latest (furthest
2383 into the future) expiration date associated with any of the constituent dumps. You cannot recycle any of the tapes that
2384 contain a dump set until all of the dumps have reached their expiration date. See also <link linkend="HDRWQ299">Appending
2385 Dumps to an Existing Dump Set</link>.</para>
2386
2387 <para>Most tape manufacturers recommend that you write to a tape a limited number of times, and it is best not to exceed this
2388 limit when recycling tapes. To help you track tape usage, the Backup System records a
2389 <computeroutput>useCount</computeroutput> counter on the tape's label. It increments the counter each time the tape's label is
2390 rewritten (each time you use the <emphasis role="bold">backup labeltape</emphasis> or <emphasis role="bold">backup
2391 dump</emphasis> command). To display the <computeroutput>useCount</computeroutput> counter, use the <emphasis
2392 role="bold">backup readlabel</emphasis> or <emphasis role="bold">backup scantape</emphasis> command or include the <emphasis
2393 role="bold">-id</emphasis> and <emphasis role="bold">-verbose</emphasis> options when you issue the <emphasis
2394 role="bold">backup dumpinfo</emphasis> command. For instructions see <link linkend="HDRWQ272">Writing and Reading Tape
2395 Labels</link> or <link linkend="HDRWQ302">Displaying Backup Dump Records</link>.</para>
2396
2397 <indexterm>
2398 <primary>useCount counter on tape label (Backup System)</primary>
2399 </indexterm>
2400
2401 <indexterm>
2402 <primary>Backup System</primary>
2403
2404 <secondary>useCount counter on tape label</secondary>
2405 </indexterm>
2406
2407 <indexterm>
2408 <primary>recycling</primary>
2409
2410 <secondary>useCounts of tapes (Backup System)</secondary>
2411 </indexterm>
2412
2413 <indexterm>
2414 <primary>tape labels</primary>
2415
2416 <secondary>useCounts of tapes</secondary>
2417 </indexterm>
2418 </sect2>
2419
2420 <sect2 id="HDRWQ269">
2421 <title>Archiving Tapes</title>
2422
2423 <indexterm>
2424 <primary>archiving</primary>
2425
2426 <secondary>tapes in Backup System</secondary>
2427 </indexterm>
2428
2429 <indexterm>
2430 <primary>tapes (Backup System)</primary>
2431
2432 <secondary>archiving</secondary>
2433 </indexterm>
2434
2435 <para>Even if you make extensive use of tape recycling, there is probably some backup data that you need to archive for a long
2436 (or even an indefinite) period of time. You can use the Backup System to archive data on a regular schedule, and you can also
2437 choose to archive data on tapes that you previously expected to recycle.</para>
2438
2439 <para>If you want to archive data on a regular basis, you can create date-specific dump levels in the dump hierarchy. For
2440 example, if you decide to archive a full dump of all data in your cell at the beginning of each quarter in the year 2000, you
2441 can define the following levels in the dump hierarchy:</para>
2442
2443 <programlisting>
2444 /1Q2000
2445 /2Q2000
2446 /3Q2000
2447 /4Q2000
2448</programlisting>
2449
2450 <para>If you decide to archive data that is on tapes you previously planned to recycle, you must gather all of the tapes that
2451 contain the relevant dumps, both full and incremental. To avoid accidental erasure, it is best to set the switch on the tapes
2452 that makes them read-only, before placing them in your archive storage area. If the tapes also contain a large amount of
2453 extraneous data that you do not want to archive, you can restore just the relevant data into a new temporary volume, and back
2454 up that volume to the smallest number of tapes possible. One reason to keep a dump set small is to minimize the amount of
2455 irrelevant data in a dump set you end up needing to archive.</para>
2456
2457 <para>If you do not expect to restore archived data to the file system, you can consider using the <emphasis
2458 role="bold">backup deletedump</emphasis> command to remove the associated dump records from the Backup Database, which helps
2459 keep it to an efficient size. If you ever need to restore the data, you can use the <emphasis role="bold">-dbadd</emphasis>
2460 flag to the <emphasis role="bold">backup scantape</emphasis> command to reinsert the dump records into the database. For
2461 instructions, see <link linkend="HDRWQ305">To scan the contents of a tape</link>.</para>
2462 </sect2>
2463
2464 <sect2 id="HDRWQ270">
2465 <title>Defining Expiration Dates</title>
2466
2467 <para>To associate an expiration date with a dump level as you create it, use the <emphasis role="bold">-expires</emphasis>
2468 argument to the <emphasis role="bold">backup adddump</emphasis> command. To change an existing dump level's expiration date,
2469 use the <emphasis role="bold">-expires</emphasis> argument to the <emphasis role="bold">backup setexp</emphasis> command.
2470 (Note that it is not possible to change the expiration date of an actual dump that has already been created at that level).
2471 With both commands, you can define an expiration date either in absolute terms (for example, 13 January 2000) or relative
2472 terms (for example, 30 days from when the dump is created). <itemizedlist>
2473 <listitem>
2474 <para>To define an absolute expiration date, provide a value for the <emphasis role="bold">-expires</emphasis> argument
2475 with the following format: <programlisting>
2476 [<emphasis role="bold">at</emphasis>] mm<emphasis role="bold">/</emphasis>dd<emphasis role="bold">/</emphasis>yyyy [hh<emphasis
2477 role="bold">:</emphasis>MM]
2478</programlisting></para>
2479
2480 <para>where mm indicates the month, dd the day, and yyyy the year when the dump expires. Valid values for the year fall
2481 in the range <emphasis role="bold">1970</emphasis> through <emphasis role="bold">2037</emphasis> (the latest possible
2482 date that the UNIX time representation can express is in early 2038). If you provide a time, it must be in 24-hour
2483 format with hh the hours and MM the minutes (for example, <emphasis role="bold">21:50</emphasis> is 9:50 p.m.). If you
2484 omit the time, the default is 00:00 hours (12:00 midnight) on the indicated date.</para>
2485 </listitem>
2486
2487 <listitem>
2488 <para>To define a relative expiration date, provide a value for the <emphasis role="bold">-expires</emphasis> argument
2489 with the following format: <programlisting>
2490 [<emphasis role="bold">in</emphasis>] [years<emphasis role="bold">y</emphasis>] [months<emphasis role="bold">m</emphasis>] [days<emphasis
2491 role="bold">d</emphasis>]
2492</programlisting></para>
2493
2494 <para>where each of years, months, and days is an integer. Provide at least one of them together with the corresponding
2495 units letter (<emphasis role="bold">y</emphasis>, <emphasis role="bold">m</emphasis>, or <emphasis
2496 role="bold">d</emphasis> respectively), with no intervening space. If you provide more than one of the three, list them
2497 in the indicated order.</para>
2498
2499 <para>The Backup System calculates a dump's actual expiration date by adding the indicated relative value to the start
2500 time of the dump operation. For example, it assigns an expiration date 1 year, 6 months, and 2 days in the future to a
2501 dump created at a dump level with associated expiration date <emphasis role="bold">in 1y 6m 2d</emphasis>.</para>
2502 </listitem>
2503
2504 <listitem>
2505 <para>To indicate that a dump backed up at the corresponding dump level never expires, provide the value <emphasis
2506 role="bold">NEVER</emphasis> instead of a date and time. To recycle tapes that contain dumps created at such a level,
2507 you must use the <emphasis role="bold">backup readlabel</emphasis> command to overwrite the tape's label.</para>
2508 </listitem>
2509 </itemizedlist></para>
2510
2511 <para>If you omit the <emphasis role="bold">-expires</emphasis> argument to the <emphasis role="bold">backup
2512 adddump</emphasis> command, then the expiration date is set to UNIX time zero (00:00 hours on 1 January 1970). The Backup
2513 System considers dumps created at such a dump level to expire at their creation time. If no dumps in a dump set have an
2514 expiration date, then the Backup System does not impose any restriction on recycling the tapes that contain the dump set. If
2515 you need to prevent premature recycling of the tapes that contain the dump set, you must use a manual tracking system.</para>
2516
2517 <indexterm>
2518 <primary>Backup Database</primary>
2519
2520 <secondary>dump levels</secondary>
2521
2522 <tertiary>adding</tertiary>
2523 </indexterm>
2524
2525 <indexterm>
2526 <primary>dump levels</primary>
2527
2528 <secondary>in Backup Database</secondary>
2529
2530 <tertiary>adding</tertiary>
2531 </indexterm>
2532
2533 <indexterm>
2534 <primary>dump hierarchy (Backup System)</primary>
2535
2536 <secondary>dump levels</secondary>
2537
2538 <tertiary>adding</tertiary>
2539 </indexterm>
2540
2541 <indexterm>
2542 <primary>expiration dates</primary>
2543
2544 <secondary>setting</secondary>
2545 </indexterm>
2546
2547 <indexterm>
2548 <primary>Backup Database</primary>
2549
2550 <secondary>expiration dates</secondary>
2551
2552 <tertiary>setting</tertiary>
2553 </indexterm>
2554
2555 <indexterm>
2556 <primary>dump hierarchy (Backup System)</primary>
2557
2558 <secondary>expiration dates</secondary>
2559
2560 <tertiary>setting</tertiary>
2561 </indexterm>
2562
2563 <indexterm>
2564 <primary>dump levels</primary>
2565
2566 <secondary>expiration dates</secondary>
2567
2568 <tertiary>setting</tertiary>
2569 </indexterm>
2570
2571 <indexterm>
2572 <primary>backup commands</primary>
2573
2574 <secondary>adddump</secondary>
2575 </indexterm>
2576
2577 <indexterm>
2578 <primary>commands</primary>
2579
2580 <secondary>backup adddump</secondary>
2581 </indexterm>
2582 </sect2>
2583
2584 <sect2 id="Header_300">
2585 <title>To add a dump level to the dump hierarchy</title>
2586
2587 <orderedlist>
2588 <listitem>
2589 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
2590 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
2591 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
2592 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
2593</programlisting></para>
2594 </listitem>
2595
2596 <listitem>
2597 <para><emphasis role="bold">Optional</emphasis>. Issue the <emphasis role="bold">backup</emphasis> command to enter
2598 interactive mode. <programlisting>
2599 % <emphasis role="bold">backup</emphasis>
2600</programlisting></para>
2601 </listitem>
2602
2603 <listitem>
2604 <para>Issue the <emphasis role="bold">backup adddump</emphasis> command to define one or more dump levels. If you are
2605 defining an incremental level, then all of the parent levels that precede it in its pathname must either already exist or
2606 precede it on the command line. <programlisting>
2607 backup&gt; <emphasis role="bold">adddump -dump</emphasis> &lt;<replaceable>dump level name</replaceable>&gt;+ [<emphasis
2608 role="bold">-expires</emphasis> &lt;<replaceable>expiration date</replaceable>&gt;+]
2609</programlisting></para>
2610
2611 <para>where <variablelist>
2612 <varlistentry>
2613 <term><emphasis role="bold">addd</emphasis></term>
2614
2615 <listitem>
2616 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">adddump</emphasis>.</para>
2617 </listitem>
2618 </varlistentry>
2619
2620 <varlistentry>
2621 <term><emphasis role="bold">-dump</emphasis></term>
2622
2623 <listitem>
2624 <para>Names each dump level to added. If you specify more than one dump level name, you must include the <emphasis
2625 role="bold">-dump</emphasis> switch.</para>
2626
2627 <para>Provide the entire pathname of the dump level, preceding each level in the pathname with a slash (<emphasis
2628 role="bold">/</emphasis>). Each component level can be up to 28 characters in length, and the pathname can include
2629 up to 256 characters including the slashes.</para>
2630 </listitem>
2631 </varlistentry>
2632
2633 <varlistentry>
2634 <term><emphasis role="bold">-expires</emphasis></term>
2635
2636 <listitem>
2637 <para>Sets the expiration date associated with each dump level. Specify either a relative or absolute expiration
2638 date, as described in <link linkend="HDRWQ270">Defining Expiration Dates</link>, or omit this argument to assign
2639 no expiration date to the dump levels.</para>
2640
2641 <note>
2642 <para>A plus sign follows this argument in the command's syntax statement because it accepts a multiword value
2643 which does not need to be enclosed in double quotes or other delimiters, not because it accepts multiple dates.
2644 Provide only one date (and optionally, time) definition to be associated with each dump level specified by the
2645 <emphasis role="bold">-dump</emphasis> argument.</para>
2646 </note>
2647 </listitem>
2648 </varlistentry>
2649 </variablelist></para>
2650 </listitem>
2651 </orderedlist>
2652
2653 <indexterm>
2654 <primary>expiration dates</primary>
2655
2656 <secondary>changing</secondary>
2657 </indexterm>
2658
2659 <indexterm>
2660 <primary>Backup Database</primary>
2661
2662 <secondary>expiration dates</secondary>
2663
2664 <tertiary>changing</tertiary>
2665 </indexterm>
2666
2667 <indexterm>
2668 <primary>dump hierarchy (Backup System)</primary>
2669
2670 <secondary>expiration dates</secondary>
2671
2672 <tertiary>changing</tertiary>
2673 </indexterm>
2674
2675 <indexterm>
2676 <primary>dump levels</primary>
2677
2678 <secondary>expiration dates</secondary>
2679
2680 <tertiary>changing</tertiary>
2681 </indexterm>
2682
2683 <indexterm>
2684 <primary>backup commands</primary>
2685
2686 <secondary>setexp</secondary>
2687 </indexterm>
2688
2689 <indexterm>
2690 <primary>commands</primary>
2691
2692 <secondary>backup setexp</secondary>
2693 </indexterm>
2694 </sect2>
2695
2696 <sect2 id="Header_301">
2697 <title>To change a dump level's expiration date</title>
2698
2699 <orderedlist>
2700 <listitem>
2701 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
2702 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
2703 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
2704 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
2705</programlisting></para>
2706 </listitem>
2707
2708 <listitem>
2709 <para><emphasis role="bold">Optional</emphasis>. Issue the <emphasis role="bold">backup</emphasis> command to enter
2710 interactive mode. <programlisting>
2711 % <emphasis role="bold">backup</emphasis>
2712</programlisting></para>
2713 </listitem>
2714
2715 <listitem>
2716 <para>Issue the <emphasis role="bold">(backup) setexp</emphasis> command to change the expiration date associated with one
2717 or more dump levels. <programlisting>
2718 backup&gt; <emphasis role="bold">setexp -dump</emphasis> &lt;<replaceable>dump level name</replaceable>&gt;+ [<emphasis
2719 role="bold">-expires</emphasis> &lt;<replaceable>expiration date</replaceable>&gt;+]
2720</programlisting></para>
2721
2722 <para>where <variablelist>
2723 <varlistentry>
2724 <term><emphasis role="bold">se</emphasis></term>
2725
2726 <listitem>
2727 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">setexp</emphasis>.</para>
2728 </listitem>
2729 </varlistentry>
2730
2731 <varlistentry>
2732 <term><emphasis role="bold">-dump</emphasis></term>
2733
2734 <listitem>
2735 <para>Names each existing dump level for which to change the expiration date.</para>
2736 </listitem>
2737 </varlistentry>
2738
2739 <varlistentry>
2740 <term><emphasis role="bold">-expires</emphasis></term>
2741
2742 <listitem>
2743 <para>Sets the expiration date associated with each dump level. Specify either a relative or absolute expiration
2744 date, as described in <link linkend="HDRWQ270">Defining Expiration Dates</link>; omit this argument to remove the
2745 expiration date currently associated with each dump level.</para>
2746
2747 <note>
2748 <para>A plus sign follows this argument in the command's syntax statement because it accepts a multiword value
2749 which does not need to be enclosed in double quotes or other delimiters, not because it accepts multiple dates.
2750 Provide only one date (and optionally, time) definition to be associated with each dump level specified by the
2751 <emphasis role="bold">-dump</emphasis> argument.</para>
2752 </note>
2753 </listitem>
2754 </varlistentry>
2755 </variablelist></para>
2756 </listitem>
2757 </orderedlist>
2758
2759 <indexterm>
2760 <primary>Backup Database</primary>
2761
2762 <secondary>dump levels</secondary>
2763
2764 <tertiary>deleting</tertiary>
2765 </indexterm>
2766
2767 <indexterm>
2768 <primary>dump levels</primary>
2769
2770 <secondary>in Backup Database</secondary>
2771
2772 <tertiary>deleting</tertiary>
2773 </indexterm>
2774
2775 <indexterm>
2776 <primary>dump hierarchy (Backup System)</primary>
2777
2778 <secondary>dump levels</secondary>
2779
2780 <tertiary>deleting</tertiary>
2781 </indexterm>
2782
2783 <indexterm>
2784 <primary>backup commands</primary>
2785
2786 <secondary>deldump</secondary>
2787 </indexterm>
2788
2789 <indexterm>
2790 <primary>commands</primary>
2791
2792 <secondary>backup deldump</secondary>
2793 </indexterm>
2794 </sect2>
2795
2796 <sect2 id="Header_302">
2797 <title>To delete a dump level from the dump hierarchy</title>
2798
2799 <orderedlist>
2800 <listitem>
2801 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
2802 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
2803 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
2804 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
2805</programlisting></para>
2806 </listitem>
2807
2808 <listitem>
2809 <para><emphasis role="bold">Optional</emphasis>. Issue the <emphasis role="bold">backup</emphasis> command to enter
2810 interactive mode. <programlisting>
2811 % <emphasis role="bold">backup</emphasis>
2812</programlisting></para>
2813 </listitem>
2814
2815 <listitem>
2816 <para>Issue the <emphasis role="bold">(backup) deldump</emphasis> command to delete the dump level. Note that the command
2817 automatically removes all incremental dump levels for which the specified level serves as parent, either directly or
2818 indirectly. <programlisting>
2819 backup&gt; <emphasis role="bold">deldump</emphasis> &lt;<replaceable>dump level name</replaceable>&gt;
2820</programlisting></para>
2821
2822 <para>where <variablelist>
2823 <varlistentry>
2824 <term><emphasis role="bold">deld</emphasis></term>
2825
2826 <listitem>
2827 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">deldump</emphasis>.</para>
2828 </listitem>
2829 </varlistentry>
2830
2831 <varlistentry>
2832 <term><emphasis role="bold">dump level name</emphasis></term>
2833
2834 <listitem>
2835 <para>Specifies the complete pathname of the dump level to delete.</para>
2836 </listitem>
2837 </varlistentry>
2838 </variablelist></para>
2839 </listitem>
2840 </orderedlist>
2841
2842 <indexterm>
2843 <primary>Backup Database</primary>
2844
2845 <secondary>dump hierarchy</secondary>
2846
2847 <tertiary>displaying</tertiary>
2848 </indexterm>
2849
2850 <indexterm>
2851 <primary>Backup Database</primary>
2852
2853 <secondary>dump levels</secondary>
2854
2855 <tertiary>displaying</tertiary>
2856 </indexterm>
2857
2858 <indexterm>
2859 <primary>dump hierarchy (Backup System)</primary>
2860
2861 <secondary>displaying</secondary>
2862 </indexterm>
2863
2864 <indexterm>
2865 <primary>dump levels</primary>
2866
2867 <secondary>in Backup Database</secondary>
2868
2869 <tertiary>displaying</tertiary>
2870 </indexterm>
2871
2872 <indexterm>
2873 <primary>backup commands</primary>
2874
2875 <secondary>listdumps</secondary>
2876 </indexterm>
2877
2878 <indexterm>
2879 <primary>commands</primary>
2880
2881 <secondary>backup listdumps</secondary>
2882 </indexterm>
2883 </sect2>
2884
2885 <sect2 id="HDRWQ271">
2886 <title>To display the dump hierarchy</title>
2887
2888 <orderedlist>
2889 <listitem>
2890 <para>Issue the <emphasis role="bold">backup listdumps</emphasis> command to display the dump hierarchy. <programlisting>
2891 % <emphasis role="bold">backup listdumps</emphasis>
2892</programlisting></para>
2893
2894 <para>where <emphasis role="bold">listd</emphasis> is the shortest acceptable abbreviation of <emphasis
2895 role="bold">listdumps</emphasis>.</para>
2896
2897 <para>The output from this command displays the dump hierarchy, reporting the expiration date associated with each dump
2898 level, as in the following example.</para>
2899
2900 <programlisting>
2901 % <emphasis role="bold">backup listdumps</emphasis>
2902 /week1 expires in 27d
2903 /tuesday expires in 13d
2904 /thursday expires in 13d
2905 /sunday expires in 13d
2906 /tuesday expires in 13d
2907 /thursday expires in 13d
2908 /week3 expires in 27d
2909 /tuesday expires in 13d
2910 /thursday expires in 13d
2911 /sunday expires in 13d
2912 /tuesday expires in 13d
2913 /thursday expires in 13d
2914 sunday1 expires in 27d
2915 /monday1 expires in 13d
2916 /tuesday1 expires in 13d
2917 /wednesday1 expires in 13d
2918 /thursday1 expires in 13d
2919 /friday1 expires in 13d
2920 sunday2 expires in 27d
2921 /monday2 expires in 13d
2922 /tuesday2 expires in 13d
2923 /wednesday2 expires in 13d
2924 /thursday2 expires in 13d
2925 /friday2 expires in 13d
2926 sunday3 expires in 27d
2927 /monday1 expires in 13d
2928 /tuesday1 expires in 13d
2929 /wednesday1 expires in 13d
2930 /thursday1 expires in 13d
2931 /friday1 expires in 13d
2932 sunday4 expires in 27d
2933 /monday2 expires in 13d
2934 /tuesday2 expires in 13d
2935 /wednesday2 expires in 13d
2936 /thursday2 expires in 13d
2937 /friday2 expires in 13d
2938</programlisting>
2939 </listitem>
2940 </orderedlist>
2941 </sect2>
2942 </sect1>
2943
2944 <sect1 id="HDRWQ272">
2945 <title>Writing and Reading Tape Labels</title>
2946
2947 <indexterm>
2948 <primary>tapes (Backup System)</primary>
2949
2950 <secondary>label</secondary>
2951
2952 <tertiary>creating</tertiary>
2953 </indexterm>
2954
2955 <indexterm>
2956 <primary>tapes (Backup System)</primary>
2957
2958 <secondary>label</secondary>
2959
2960 <tertiary>displaying</tertiary>
2961 </indexterm>
2962
2963 <indexterm>
2964 <primary>tapes (Backup System)</primary>
2965
2966 <secondary>capacity</secondary>
2967
2968 <tertiary>recording on label</tertiary>
2969 </indexterm>
2970
2971 <indexterm>
2972 <primary>tapes (Backup System)</primary>
2973
2974 <secondary>names</secondary>
2975
2976 <tertiary>assigning</tertiary>
2977 </indexterm>
2978
2979 <indexterm>
2980 <primary>creating</primary>
2981
2982 <secondary>tape label (Backup System)</secondary>
2983 </indexterm>
2984
2985 <indexterm>
2986 <primary>displaying</primary>
2987
2988 <secondary>tape label (Backup System)</secondary>
2989 </indexterm>
2990
2991 <para>As described in <link linkend="HDRWQ253">Dump Names and Tape Names</link> and <link linkend="HDRWQ254">Tape Labels, Dump
2992 Labels, and EOF Markers</link>, you can assign either a permanent name or an AFS tape name to a tape that you use in the Backup
2993 System. The names are recorded on the tape's magnetic label, along with an indication of the tape's capacity (size).</para>
2994
2995 <para>You can assign either a permanent name or an AFS tape name, but not both. In general, assigning permanent names rather
2996 than AFS tape names simplifies the backup process, because the Backup System does not dictate the format of permanent names. If
2997 a tape does not have a permanent name, then by default the Backup System accepts only three strictly defined values in the AFS
2998 tape name field, and refuses to write a dump to a tape with an inappropriate AFS tape name. The acceptable values are a name
2999 that matches the volume set and dump level of the initial dump, the value <computeroutput>&lt;NULL&gt;</computeroutput>, and no
3000 value in the field at all.</para>
3001
3002 <para>If a tape has a permanent name, the Backup System does not check the AFS tape name, and as part of the dump operation
3003 constructs the appropriate AFS tape name itself and records it on the label. This means that if you assign a permanent name, the
3004 Backup System assigns an AFS tape name itself and the tape has both types of name. In contrast, if a tape has an AFS tape name
3005 but not a permanent name, you cannot assign a permanent name without first erasing the AFS tape name.</para>
3006
3007 <para>(You can also suppress the Backup System's check of a tape's AFS tape name, even it does not have a permanent name, by
3008 assigning the value <emphasis role="bold">NO</emphasis> to the <emphasis role="bold">NAME_CHECK</emphasis> instruction in the
3009 <emphasis>device configuration file</emphasis>. See <link linkend="HDRWQ280">Eliminating the AFS Tape Name Check</link>.)</para>
3010
3011 <para>Because the Backup System accepts unlabeled tapes, you do not have to label a tape before using it for the first time.
3012 After the first use, there are a couple of cases in which you must relabel a tape in order to write a dump to it: <itemizedlist>
3013 <listitem>
3014 <para>The tape does not have a permanent name, and the AFS tape name on it does not match the new initial dump set you
3015 want to create (the volume set and dump level names are different, or the index is incorrect).</para>
3016 </listitem>
3017
3018 <listitem>
3019 <para>You want to recycle a tape before all of the dumps on it have expired. The Backup System does not overwrite a tape
3020 with any unexpired dumps. Keep in mind, though, that if you relabel the tape to making recycling possible, you erase all
3021 the dump records for the tape from the Backup Database, which makes it impossible to restore any data from the
3022 tape.</para>
3023 </listitem>
3024 </itemizedlist></para>
3025
3026 <note>
3027 <para>Labeling a tape that contains dump data makes it impossible to use that data in a restore operation, because the
3028 labeling operation removes the dump's records from the Backup Database. If you want to record a permanent name on a tape
3029 label, you must do it before dumping any data to the tape.</para>
3030 </note>
3031
3032 <sect2 id="Header_305">
3033 <title>Recording a Name on the Label</title>
3034
3035 <para>To write a permanent name on a tape's label, include the <emphasis role="bold">-pname</emphasis> argument to specify a
3036 string of up to 32 characters. Check that no other tape used with the Backup System in your cell already has the permanent
3037 name you are assigning, because the Backup System does not prevent you from assigning the same name to multiple tapes. The
3038 Backup System overwrites the existing AFS tape name, if any, with the value <computeroutput>&lt;NULL&gt;</computeroutput>.
3039 When a tape has a permanent name, the Backup System uses it instead of the AFS tape name in most prompts and when referring to
3040 the tape in output from <emphasis role="bold">backup</emphasis> commands. The permanent name persists until you again include
3041 the <emphasis role="bold">-pname</emphasis> argument to the <emphasis role="bold">backup labeltape</emphasis> command,
3042 regardless of the tape's contents and of how often you recycle the tape or use the <emphasis role="bold">backup
3043 labeltape</emphasis> command without the <emphasis role="bold">-pname</emphasis> argument.</para>
3044
3045 <para>To write an AFS tape name on the label, provide a value for the <emphasis role="bold">-name</emphasis> argument that
3046 matches the volume set name and the final element in the dump level pathname of the initial dump that you plan to write to the
3047 tape, and an index that indicates the tape's place in the sequence of tapes for the dump set. The format is as follows:</para>
3048
3049 <programlisting>
3050 volume_set_name<emphasis role="bold">.</emphasis>dump_level_name<emphasis role="bold">.</emphasis>tape_index
3051</programlisting>
3052
3053 <para>If you omit the <emphasis role="bold">-name</emphasis> argument, the Backup System sets the AFS tape name to
3054 <computeroutput>&lt;NULL&gt;</computeroutput>. The Backup System automatically constructs and records the appropriate name
3055 when you later write an initial dump to the tape by using the <emphasis role="bold">backup dump</emphasis> or <emphasis
3056 role="bold">backup savedb</emphasis> command.</para>
3057
3058 <para>You cannot use the <emphasis role="bold">-name</emphasis> argument if the tape already has a permanent name. To erase a
3059 tape's permanent name, provide a null value to the <emphasis role="bold">-pname</emphasis> argument by issuing the following
3060 command:</para>
3061
3062 <programlisting>
3063 % <emphasis role="bold">backup labeltape -pname ""</emphasis>
3064</programlisting>
3065 </sect2>
3066
3067 <sect2 id="Header_306">
3068 <title>Recording a Capacity on the Label</title>
3069
3070 <para>To record the tape's capacity on the label, specify a number of kilobytes as the <emphasis role="bold">-size</emphasis>
3071 argument. If you omit this argument the first time you label a tape, the Backup System records the default tape capacity
3072 associated with the specified port offset in the <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis> file on the Tape
3073 Coordinator machine. If the tape's capacity is different (in particular, larger) than the capacity recorded in the <emphasis
3074 role="bold">tapeconfig</emphasis> file, it is best to record a capacity on the label before using the tape. Once set, the
3075 value in the label's capacity field persists until you again use the <emphasis role="bold">-size</emphasis> argument to the
3076 <emphasis role="bold">backup labeltape</emphasis> command. For a discussion of the appropriate capacity to record for tapes,
3077 see <link linkend="HDRWQ258">Configuring the tapeconfig File</link>.</para>
3078
3079 <para>To read a tape's label, use the <emphasis role="bold">backup readlabel</emphasis> command.</para>
3080
3081 <para>Most tapes also come with an adhesive label you can apply to the exterior casing. To help you easily identify a tape,
3082 record at least the tape's permanent and AFS tape names on the adhesive label. Depending on the recycling scheme you use, it
3083 can be useful to record other information, such as the dump ID, dump creation date, and expiration date of each dump you write
3084 to the tape.</para>
3085
3086 <indexterm>
3087 <primary>backup commands</primary>
3088
3089 <secondary>labeltape</secondary>
3090 </indexterm>
3091
3092 <indexterm>
3093 <primary>commands</primary>
3094
3095 <secondary>backup labeltape</secondary>
3096 </indexterm>
3097 </sect2>
3098
3099 <sect2 id="HDRWQ273">
3100 <title>To label a tape</title>
3101
3102 <orderedlist>
3103 <listitem>
3104 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
3105 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
3106 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
3107 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
3108</programlisting></para>
3109 </listitem>
3110
3111 <listitem>
3112 <para>If the Tape Coordinator for the tape device that is to perform the operation is not already running, open a
3113 connection to the appropriate Tape Coordinator machine and issue the <emphasis role="bold">butc</emphasis> command, for
3114 which complete instructions appear in <link linkend="HDRWQ292">To start a Tape Coordinator process</link>.
3115 <programlisting>
3116 % <emphasis role="bold">butc</emphasis> [&lt;<replaceable>port offset</replaceable>&gt;] [<emphasis role="bold">-noautoquery</emphasis>]
3117</programlisting></para>
3118 </listitem>
3119
3120 <listitem>
3121 <para>Place the tape in the device.</para>
3122 </listitem>
3123
3124 <listitem>
3125 <para><emphasis role="bold">Optional</emphasis>. Issue the <emphasis role="bold">backup</emphasis> command to enter
3126 interactive mode, if you want to label multiple tapes or issue additional commands after labeling the tape. The
3127 interactive prompt appears in the following step. <programlisting>
3128 % <emphasis role="bold">backup</emphasis>
3129</programlisting></para>
3130 </listitem>
3131
3132 <listitem>
3133 <para>Issue the <emphasis role="bold">(backup) labeltape</emphasis> command to label the tape. <programlisting>
3134 backup&gt; <emphasis role="bold">labeltape</emphasis> [<emphasis role="bold">-name</emphasis> &lt;<replaceable>tape name, defaults to NULL</replaceable>&gt;] \
3135 [<emphasis role="bold">-size</emphasis> &lt;<replaceable>tape size in Kbytes, defaults to size in tapeconfig</replaceable>&gt;] \
3136 [<emphasis role="bold">-portoffset</emphasis> &lt;<replaceable>TC port offset</replaceable>&gt;] [<emphasis role="bold">-pname</emphasis> &lt;<replaceable>permanent tape name</replaceable>&gt;]
3137</programlisting></para>
3138
3139 <para>where <variablelist>
3140 <varlistentry>
3141 <term><emphasis role="bold">la</emphasis></term>
3142
3143 <listitem>
3144 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">labeltape</emphasis>.</para>
3145 </listitem>
3146 </varlistentry>
3147
3148 <varlistentry>
3149 <term><emphasis role="bold">-name</emphasis></term>
3150
3151 <listitem>
3152 <para>Specifies the AFS tape name to record on the label. Include this argument or the <emphasis
3153 role="bold">-pname</emphasis> argument, but not both. If you omit this argument, the AFS tape name is set to
3154 &lt;<replaceable>NULL</replaceable>&gt;. If you provide it, it must have the following format. <programlisting>
3155volume_set_name<emphasis role="bold">.</emphasis>dump_level_name<emphasis role="bold">.</emphasis>tape_index
3156</programlisting></para>
3157
3158 <para>for the tape to be acceptable for use in a future <emphasis role="bold">backup dump</emphasis> operation.
3159 The volume_set_name must match the volume set name of the initial dump to be written to the tape, dump_level_name
3160 must match the last element of the dump level pathname at which the volume set is to be dumped, and tape_index
3161 must correctly indicate the tape's place in the sequence of tapes that house the dump set; indexing begins with
3162 the number 1 (one).</para>
3163 </listitem>
3164 </varlistentry>
3165
3166 <varlistentry>
3167 <term><emphasis role="bold">-size</emphasis></term>
3168
3169 <listitem>
3170 <para>Specifies the tape capacity to record on the label. If you are labeling the tape for the first time, you
3171 need to include this argument only if the tape's capacity differs from the capacity associated with the specified
3172 port offset in the <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis> file on the Tape Coordinator
3173 machine.</para>
3174
3175 <para>If you provide a value, it is an integer value followed by a letter that indicates units, with no
3176 intervening space. A unit value of <emphasis role="bold">k</emphasis> or <emphasis role="bold">K</emphasis>
3177 indicates kilobytes, <emphasis role="bold">m</emphasis> or <emphasis role="bold">M</emphasis> indicates megabytes,
3178 and <emphasis role="bold">g</emphasis> or <emphasis role="bold">G</emphasis> indicates gigabytes. If you omit the
3179 units letter, the default is kilobytes.</para>
3180 </listitem>
3181 </varlistentry>
3182
3183 <varlistentry>
3184 <term><emphasis role="bold">-portoffset</emphasis></term>
3185
3186 <listitem>
3187 <para>Specifies the port offset number of the Tape Coordinator handling the tape or backup data file for this
3188 operation. You must provide this argument unless the default value of <emphasis role="bold">0</emphasis> (zero) is
3189 appropriate.</para>
3190 </listitem>
3191 </varlistentry>
3192
3193 <varlistentry>
3194 <term><emphasis role="bold">-pname</emphasis></term>
3195
3196 <listitem>
3197 <para>Specifies the permanent name to record on the label. It can be up to 32 characters in length, and include
3198 any alphanumeric characters. Avoid metacharacters that have a special meaning to the shell, to avoid having to
3199 mark them as literal in commands issued at the shell prompt.</para>
3200
3201 <para>Include this argument or the <emphasis role="bold">-name</emphasis> argument, but not both. When you provide
3202 this argument, the AFS tape name is set to <computeroutput>&lt;NULL&gt;</computeroutput>. If you omit this
3203 argument, any existing permanent name is retained.</para>
3204 </listitem>
3205 </varlistentry>
3206 </variablelist></para>
3207 </listitem>
3208
3209 <listitem>
3210 <para>If you did not include the <emphasis role="bold">-noautoquery</emphasis> flag when you issued the <emphasis
3211 role="bold">butc</emphasis> command, or if the device's device configuration file includes the instruction <emphasis
3212 role="bold">AUTOQUERY YES</emphasis>, then the Tape Coordinator prompts you to place the tape in the device's drive. You
3213 have already done so, but you must now press <emphasis role="bold">&lt;Return&gt;</emphasis> to indicate that the tape is
3214 ready for labeling.</para>
3215 </listitem>
3216 </orderedlist>
3217
3218 <indexterm>
3219 <primary>backup commands</primary>
3220
3221 <secondary>readlabel</secondary>
3222 </indexterm>
3223
3224 <indexterm>
3225 <primary>commands</primary>
3226
3227 <secondary>backup readlabel</secondary>
3228 </indexterm>
3229 </sect2>
3230
3231 <sect2 id="HDRWQ274">
3232 <title>To read the label on a tape</title>
3233
3234 <orderedlist>
3235 <listitem>
3236 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
3237 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
3238 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
3239 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
3240</programlisting></para>
3241 </listitem>
3242
3243 <listitem>
3244 <para>If the Tape Coordinator for the tape device that is to perform the operation is not already running, open a
3245 connection to the appropriate Tape Coordinator machine and issue the <emphasis role="bold">butc</emphasis> command, for
3246 which complete instructions appear in <link linkend="HDRWQ292">To start a Tape Coordinator process</link>.
3247 <programlisting>
3248 % <emphasis role="bold">butc</emphasis> [&lt;<replaceable>port offset</replaceable>&gt;] [<emphasis role="bold">-noautoquery</emphasis>]
3249</programlisting></para>
3250 </listitem>
3251
3252 <listitem>
3253 <para>Place the tape in the device.</para>
3254 </listitem>
3255
3256 <listitem>
3257 <para><emphasis role="bold">Optional</emphasis>. Issue the <emphasis role="bold">backup</emphasis> command to enter
3258 interactive mode, if you want to label multiple tapes or issue additional commands after labeling the tape. The
3259 interactive prompt appears in the following step. <programlisting>
3260 % <emphasis role="bold">backup</emphasis>
3261</programlisting></para>
3262 </listitem>
3263
3264 <listitem>
3265 <para>Issue the <emphasis role="bold">(backup) readlabel</emphasis> command to read the label on the tape.
3266 <programlisting>
3267 backup&gt; <emphasis role="bold">readlabel</emphasis> [&lt;<replaceable>TC port offset</replaceable>&gt;]
3268</programlisting></para>
3269
3270 <para>where <variablelist>
3271 <varlistentry>
3272 <term><emphasis role="bold">rea</emphasis></term>
3273
3274 <listitem>
3275 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">readlabel</emphasis>.</para>
3276 </listitem>
3277 </varlistentry>
3278
3279 <varlistentry>
3280 <term><emphasis role="bold">TC port offset</emphasis></term>
3281
3282 <listitem>
3283 <para>Specifies the port offset number of Tape Coordinator handling the tape or backup data file for this
3284 operation. You must provide this argument unless the default value of <emphasis role="bold">0</emphasis> (zero) is
3285 appropriate.</para>
3286 </listitem>
3287 </varlistentry>
3288 </variablelist></para>
3289 </listitem>
3290
3291 <listitem>
3292 <para>If you did not include the <emphasis role="bold">-noautoquery</emphasis> flag when you issued the <emphasis
3293 role="bold">butc</emphasis> command, or the device's device configuration file includes the instruction <emphasis
3294 role="bold">AUTOQUERY YES</emphasis> instruction, then the Tape Coordinator prompts you to place the tape in the device's
3295 drive. You have already done so, but you must now press <emphasis role="bold">&lt;Return&gt;</emphasis> to indicate that
3296 the tape is ready for reading.</para>
3297 </listitem>
3298 </orderedlist>
3299
3300 <para>Information from the tape label appears both in the <emphasis role="bold">backup</emphasis> command window and in the
3301 Tape Coordinator window. The output in the command window has the following format:</para>
3302
3303 <programlisting>
3304 Tape read was labelled: tape_name (initial_dump_ID)
3305 size: size KBytes
3306</programlisting>
3307
3308 <para>where tape_name is the tape's permanent name (if it has one) or AFS tape name, initial_dump_ID is the dump ID of the
3309 initial dump on the tape, and size is the capacity recorded on the label, in kilobytes.</para>
3310
3311 <para>The information in the Tape Coordinator window is more extensive. The tape's permanent name appears in the
3312 <computeroutput>tape name</computeroutput> field and its AFS tape name in the <computeroutput>AFS tape name</computeroutput>
3313 field. If either name is undefined, a value of <computeroutput>&lt;NULL&gt;</computeroutput> appears in the field instead. The
3314 capacity recorded on the label appears in the <computeroutput>size</computeroutput> field. Other fields in the output report
3315 the creation time, dump level name, and dump ID of the initial dump on the tape
3316 (<computeroutput>creationTime</computeroutput>, <computeroutput>dump path</computeroutput>, and <computeroutput>dump
3317 id</computeroutput> respectively). The <computeroutput>cell</computeroutput> field reports the cell in which the dump
3318 operation was performed, and the <computeroutput>useCount</computeroutput> field reports the number of times the tape has been
3319 relabeled, either with the <emphasis role="bold">backup labeltape</emphasis> command or during a dump operation. For further
3320 details, see the command's reference page in the <emphasis>OpenAFS Administration Reference</emphasis>.</para>
3321
3322 <para>If the tape has no label, or if the drive is empty, the following message appears at the command shell:</para>
3323
3324 <programlisting>
3325 Failed to read tape label.
3326</programlisting>
3327
3328 <para>The following example illustrates the output in the command shell for a tape in the device with port offset 1:</para>
3329
3330 <programlisting>
3331 % <emphasis role="bold">backup readlabel 1</emphasis>
3332 Tape read was labelled: monthly_guest (917860000)
3333 size: 2150000 KBytes
3334</programlisting>
3335
3336 <para>The following output appears in the Tape Coordinator window at the same time:</para>
3337
3338 <programlisting>
3339 Tape label
3340 ----------
3341 tape name = monthly_guest
3342 AFS tape name = guests.monthly.3
3343 creationTime = Mon Feb 1 04:06:40 1999
3344 cell = example.com
3345 size = 2150000 Kbytes
3346 dump path = /monthly
3347 dump id = 917860000
3348 useCount = 44
3349 -- End of tape label --
3350</programlisting>
3351 </sect2>
3352 </sect1>
3353
3354 <sect1 id="HDRWQ275">
3355 <title>Automating and Increasing the Efficiency of the Backup Process</title>
3356
3357 <indexterm>
3358 <primary>Backup System</primary>
3359
3360 <secondary>automating operations</secondary>
3361 </indexterm>
3362
3363 <indexterm>
3364 <primary>Backup System</primary>
3365
3366 <secondary>reducing operator intervention</secondary>
3367 </indexterm>
3368
3369 <para>The Backup System includes several optional features to help you automate the backup process in your cell and make it more
3370 efficient. By combining several of the features, you can dump volume data to tape with minimal human intervention in most cases.
3371 To take advantage of many of the features, you create a device configuration file in the <emphasis
3372 role="bold">/usr/afs/backup</emphasis> directory for each tape device that participates in automated operations. For general
3373 instructions on creating the device configuration file, see <link linkend="HDRWQ276">Creating a Device Configuration
3374 File</link>. The following list refers you to sections that describe each feature in greater detail. <itemizedlist>
3375 <listitem>
3376 <para>You can use tape stackers and jukeboxes to perform backup operations. These are tape drives with an attached unit
3377 that stores several tapes and can physically insert and remove them from the tape reader (tape drive) without human
3378 intervention, meaning that no operator has to be present even for backup operations that require several tapes. To use a
3379 stacker or jukebox with the Backup System, include the <emphasis role="bold">MOUNT</emphasis> and <emphasis
3380 role="bold">UNMOUNT</emphasis> instructions in its device configuration file. See <link linkend="HDRWQ277">Invoking a
3381 Device's Tape Mounting and Unmounting Routines</link>.</para>
3382 </listitem>
3383
3384 <listitem>
3385 <para>You can suppress the Tape Coordinator's default prompt for the initial tape that it needs for a backup operation,
3386 again eliminating the need for a human operator to be present when a backup operation begins. (You must still insert the
3387 correct tape in the drive at some point before the operation begins.) To suppress the initial prompt, include the
3388 <emphasis role="bold">-noautoquery</emphasis> flag on the <emphasis role="bold">butc</emphasis> command, or assign the
3389 value <emphasis role="bold">NO</emphasis> to the <emphasis role="bold">AUTOQUERY</emphasis> instruction in the device
3390 configuration file. See <link linkend="HDRWQ278">Eliminating the Search or Prompt for the Initial Tape</link>.</para>
3391 </listitem>
3392
3393 <listitem>
3394 <para>You can suppress the prompts that the Tape Coordinator otherwise generates when it encounters several types of
3395 errors. When you use this feature, the Tape Coordinator instead responds to the errors in a default manner, which
3396 generally allows the operation to continue without human intervention. To suppress prompts about error conditions, assign
3397 the value <emphasis role="bold">NO</emphasis> to the <emphasis role="bold">ASK</emphasis> instruction in the device
3398 configuration file. See <link linkend="HDRWQ279">Enabling Default Responses to Error Conditions</link>.</para>
3399 </listitem>
3400
3401 <listitem>
3402 <para>You can suppress the Backup System's default verification that the AFS tape name on a tape that has no permanent
3403 name matches the name derived from the volume set and dump level names of the initial dump the Backup System is writing to
3404 the tape. This enables you to recycle a tape without first relabeling it, as long as all dumps on it are expired. To
3405 suppress name checking, assign the value <emphasis role="bold">NO</emphasis> to the <emphasis
3406 role="bold">NAME_CHECK</emphasis> instruction in the device configuration file. See <link linkend="HDRWQ280">Eliminating
3407 the AFS Tape Name Check</link>.</para>
3408 </listitem>
3409
3410 <listitem>
3411 <para>You can promote tape streaming (the most efficient way for a tape device to operate) by setting the size of the
3412 memory buffer the Tape Coordinator uses when transferring volume data between the file system and the device. To set the
3413 buffer size, include the <emphasis role="bold">BUFFERSIZE</emphasis> instruction in the device configuration file. See
3414 <link linkend="HDRWQ281">Setting the Memory Buffer Size to Promote Tape Streaming</link>.</para>
3415 </listitem>
3416
3417 <listitem>
3418 <para>You can write dumps to a <emphasis>backup data file</emphasis> on the local disk of the Tape Coordinator machine,
3419 rather than to tape. You can then transfer the backup data file to a data-archiving system, such as a hierarchical storage
3420 management (HSM) system, that you use in conjunction with AFS and the Backup System. Writing a dump to a file is usually
3421 more efficient that issuing the equivalent <emphasis role="bold">vos dump</emphasis> commands individually. To write dumps
3422 to a file, include the <emphasis role="bold">FILE</emphasis> instruction in the device configuration file. See <link
3423 linkend="HDRWQ282">Dumping Data to a Backup Data File</link>.</para>
3424 </listitem>
3425 </itemizedlist></para>
3426
3427 <para>There are two additional ways to increase backup automation and efficiency that do not involve the device configuration
3428 file: <itemizedlist>
3429 <listitem>
3430 <para>You can schedule one or more <emphasis role="bold">backup dump</emphasis> commands to run at specified times. This
3431 enables you to create backups at times of low system usage, without requiring a human operator to be present. You can
3432 schedule a single dump operation for a future time, or multiple operations to run at various future times. See <link
3433 linkend="HDRWQ300">Scheduling Dumps</link>.</para>
3434 </listitem>
3435
3436 <listitem>
3437 <para>You can append dumps to a tape that already has other dumps on it. This enables you to use as much of a tape's
3438 capacity as possible. The appended dumps do not have be related in any way to one another or to the initial dump on the
3439 tape, but grouping dumps appropriately can reduce the number of necessary tape changes during a restore operation. To
3440 append a dump, include the <emphasis role="bold">-append</emphasis> argument to the <emphasis role="bold">backup
3441 dump</emphasis> command. See <link linkend="HDRWQ299">Appending Dumps to an Existing Dump Set</link>.</para>
3442 </listitem>
3443 </itemizedlist></para>
3444
3445 <sect2 id="HDRWQ276">
3446 <title>Creating a Device Configuration File</title>
3447
3448 <indexterm>
3449 <primary>CFG_<emphasis>device_name</emphasis> file</primary>
3450 </indexterm>
3451
3452 <indexterm>
3453 <primary>files</primary>
3454
3455 <secondary>CFG_&lt;device_name&gt;</secondary>
3456 </indexterm>
3457
3458 <indexterm>
3459 <primary>Tape Coordinator (Backup System)</primary>
3460
3461 <secondary>device configuration file (CFG)</secondary>
3462 </indexterm>
3463
3464 <indexterm>
3465 <primary>configuration file</primary>
3466
3467 <secondary></secondary>
3468
3469 <see>CFG_&lt;device_name&gt; configuration file</see>
3470 </indexterm>
3471
3472 <para>To use many of the features that automate backup operations, create a configuration file for each tape device in the
3473 <emphasis role="bold">/usr/afs/backup</emphasis> directory on the local disk of the Tape Coordinator machine that drives the
3474 device. The filename has the following form:</para>
3475
3476 <para><emphasis role="bold">CFG_</emphasis>device_name</para>
3477
3478 <para>where device_name represents the name of the tape device or backup data file (see <link linkend="HDRWQ282">Dumping Data
3479 to a Backup Data File</link> to learn about writing dumps to a file rather than to tape).</para>
3480
3481 <para>For a tape device, construct the device_name portion of the name by stripping off the initial <emphasis
3482 role="bold">/dev/</emphasis> string with which all UNIX device names conventionally begin, and replacing any other slashes in
3483 the name with underscores. For example, <emphasis role="bold">CFG_rmt_4m</emphasis> is the appropriate filename for a device
3484 called <emphasis role="bold">/dev/rmt/4m</emphasis>.</para>
3485
3486 <para>For a backup data file, construct the device_name portion by stripping off the initial slash (<emphasis
3487 role="bold">/</emphasis>) and replacing any other slashes (<emphasis role="bold">/</emphasis>) in the name with underscores.
3488 For example, <emphasis role="bold">CFG_var_tmp_FILE</emphasis> is the appropriate filename for a backup data file called
3489 <emphasis role="bold">/var/tmp/FILE</emphasis>.</para>
3490
3491 <para>Creating a device configuration file is optional. If you do not want to take advantage of any of the features that the
3492 file provides, you do not have to create it.</para>
3493
3494 <para>You can include one of each of the following instructions in any order in a device configuration file. All are optional.
3495 Place each instruction on its own line, but do not include any newline (<emphasis role="bold">&lt;Return&gt;</emphasis>)
3496 characters within an instruction. <variablelist>
3497 <varlistentry>
3498 <term><emphasis role="bold">MOUNT and UNMOUNT</emphasis></term>
3499
3500 <listitem>
3501 <para>Identify a script of routines for mounting and unmounting tapes in a tape stacker or jukebox's drive as needed.
3502 See <link linkend="HDRWQ277">Invoking a Device's Tape Mounting and Unmounting Routines</link>.</para>
3503 </listitem>
3504 </varlistentry>
3505
3506 <varlistentry>
3507 <term><emphasis role="bold">AUTOQUERY</emphasis></term>
3508
3509 <listitem>
3510 <para>Controls whether the Tape Coordinator prompts for the first tape it needs for a backup operation. See <link
3511 linkend="HDRWQ278">Eliminating the Search or Prompt for the Initial Tape</link>.</para>
3512 </listitem>
3513 </varlistentry>
3514
3515 <varlistentry>
3516 <term><emphasis role="bold">ASK</emphasis></term>
3517
3518 <listitem>
3519 <para>Controls whether the Tape Coordinator asks you how to respond to certain error conditions. See <link
3520 linkend="HDRWQ279">Enabling Default Responses to Error Conditions</link>.</para>
3521 </listitem>
3522 </varlistentry>
3523
3524 <varlistentry>
3525 <term><emphasis role="bold">NAME_CHECK</emphasis></term>
3526
3527 <listitem>
3528 <para>Controls whether the Tape Coordinator verifies that an AFS tape name matches the initial dump you are writing to
3529 the tape. See <link linkend="HDRWQ280">Eliminating the AFS Tape Name Check</link>.</para>
3530 </listitem>
3531 </varlistentry>
3532
3533 <varlistentry>
3534 <term><emphasis role="bold">BUFFERSIZE</emphasis></term>
3535
3536 <listitem>
3537 <para>Sets the size of the memory buffer the Tape Coordinator uses when transferring data between a tape device and a
3538 volume. See <link linkend="HDRWQ281">Setting the Memory Buffer Size to Promote Tape Streaming</link>.</para>
3539 </listitem>
3540 </varlistentry>
3541
3542 <varlistentry>
3543 <term><emphasis role="bold">FILE</emphasis></term>
3544
3545 <listitem>
3546 <para>Controls whether the Tape Coordinator writes dumps to, and restores data from, a tape device or a backup data
3547 file. See <link linkend="HDRWQ282">Dumping Data to a Backup Data File</link>.</para>
3548 </listitem>
3549 </varlistentry>
3550 </variablelist></para>
3551
3552 <indexterm>
3553 <primary>UNMOUNT instruction in CFG_<emphasis>device_name</emphasis> file</primary>
3554 </indexterm>
3555
3556 <indexterm>
3557 <primary>MOUNT instruction in CFG_<emphasis>device_name</emphasis> file</primary>
3558 </indexterm>
3559
3560 <indexterm>
3561 <primary>Backup System</primary>
3562
3563 <secondary>automating tape mounting and unmounting</secondary>
3564 </indexterm>
3565
3566 <indexterm>
3567 <primary>tape (Backup System)</primary>
3568
3569 <secondary>automating mounting and unmounting</secondary>
3570 </indexterm>
3571
3572 <indexterm>
3573 <primary>Tape Coordinator (Backup System)</primary>
3574
3575 <secondary>automating tape mounting and unmounting</secondary>
3576 </indexterm>
3577
3578 <indexterm>
3579 <primary>automating</primary>
3580
3581 <secondary>tape mounting and unmounting by Backup System</secondary>
3582 </indexterm>
3583 </sect2>
3584
3585 <sect2 id="HDRWQ277">
3586 <title>Invoking a Device's Tape Mounting and Unmounting Routines</title>
3587
3588 <para>A tape stacker or jukebox helps you automate backup operations because it can switch between multiple tapes during an
3589 operation without human intervention. To take advantage of this feature, include the <emphasis role="bold">MOUNT</emphasis>
3590 and optionally <emphasis role="bold">UNMOUNT</emphasis> instructions in the device configuration file that you write for the
3591 stacker or jukebox. The instructions share the same syntax:</para>
3592
3593 <programlisting><emphasis role="bold">MOUNT</emphasis> filename
3594 <emphasis role="bold">UNMOUNT</emphasis> filename
3595</programlisting>
3596
3597 <para>where filename is the pathname on the local disk of a script or program you have written that invokes the routines
3598 defined by the device's manufacturer for mounting or unmounting a tape in the device's tape drive. (For convenience, the
3599 following discussion uses the term <emphasis>script</emphasis> to refers to both scripts and programs.) The script usually
3600 also contains additional logic that handles error conditions or modifies the script's behavior depending on which backup
3601 operation is being performed.</para>
3602
3603 <para>You can refer to different scripts with the <emphasis role="bold">MOUNT</emphasis> or <emphasis
3604 role="bold">UNMOUNT</emphasis> instructions, or to a single script that invokes both mounting and unmounting routines. The
3605 scripts inherit the local identity and AFS tokens associated with to the issuer of the <emphasis role="bold">butc</emphasis>
3606 command.</para>
3607
3608 <para>You need to include a <emphasis role="bold">MOUNT</emphasis> instruction in the device configuration file for all tape
3609 devices, but the need for an <emphasis role="bold">UNMOUNT</emphasis> instruction depends on the tape-handling routines that
3610 the device's manufacturer provides. Some devices, usually stackers, have only a single routine for mounting tapes, which also
3611 automatically unmounts a tape whose presence prevents insertion of the required new tape. In this case, an <emphasis
3612 role="bold">UNMOUNT</emphasis> instruction is not necessary. For devices that have separate mounting and unmounting routines,
3613 you must include an <emphasis role="bold">UNMOUNT</emphasis> instruction to remove a tape when the Tape Coordinator is
3614 finished with it; otherwise, subsequent attempts to run the <emphasis role="bold">MOUNT</emphasis> instruction fail with an
3615 error.</para>
3616
3617 <para>When the device configuration file includes a <emphasis role="bold">MOUNT</emphasis> instruction, you must stock the
3618 stacker or jukebox with the necessary tapes before running a backup operation. Many jukeboxes are able to search for the
3619 required tape by reading external labels (such as barcodes) on the tapes, but many stackers can only switch between tapes in
3620 sequence and sometimes only in one direction. In the latter case, you must also stock the tapes in the correct order.</para>
3621
3622 <para>To obtain a list of the tapes required for a restore operation so that you can prestock them in the tape device, include
3623 the <emphasis role="bold">-n</emphasis> flag on the appropriate <emphasis role="bold">backup</emphasis> command (<emphasis
3624 role="bold">backup diskrestore</emphasis>, <emphasis role="bold">backup volrestore</emphasis>, or <emphasis role="bold">backup
3625 volsetrestore</emphasis>). For a dump operation, it is generally sufficient to stock the device with more tapes than the
3626 operation is likely to require. You can prelabel the tapes with permanent names or AFS tape names, or not prelabel them at
3627 all. If you prelabel the tapes for a dump operation with AFS tape names, then it is simplest to load them into the stacker in
3628 sequential order by tape index. But it is probably simpler still to prelabel tapes with permanent tape names or use unlabeled
3629 tapes, in which case the Backup System generates and applies the appropriately indexed AFS tape name itself during the dump
3630 operation.</para>
3631
3632 <sect3 id="Header_312">
3633 <title>How the Tape Coordinator Uses the MOUNT and UNMOUNT Instructions</title>
3634
3635 <para>When you issue the <emphasis role="bold">butc</emphasis> command to initialize the Tape Coordinator for a given tape
3636 device, the Tape Coordinator looks for the device configuration file called <emphasis
3637 role="bold">/usr/afs/backup/CFG_</emphasis>device_name on its local disk, where device_name has the format described in
3638 <link linkend="HDRWQ276">Creating a Device Configuration File</link>. If the file exists and contains a <emphasis
3639 role="bold">MOUNT</emphasis> instruction, then whenever the Tape Coordinator needs a tape, it executes the script named by
3640 the instruction's filename argument.</para>
3641
3642 <para>If the device configuration file does not exist, or does not include a <emphasis role="bold">MOUNT</emphasis>
3643 instruction, then whenever the Tape Coordinator needs a tape, it generates a prompt in its window instructing the operator
3644 to insert the necessary tape. The operator must insert the tape and press <emphasis role="bold">&lt;Return&gt;</emphasis>
3645 before the Tape Coordinator continues the backup operation.</para>
3646
3647 <para>Note, however, that you can modify the Tape Coordinator's behavior with respect to the first tape needed for an
3648 operation, by setting the <emphasis role="bold">AUTOQUERY</emphasis> instruction in the device configuration file to
3649 <emphasis role="bold">NO</emphasis>, or including the <emphasis role="bold">-noautoquery</emphasis> flag to the <emphasis
3650 role="bold">butc</emphasis> command. In this case, the Tape Coordinator does not execute the <emphasis
3651 role="bold">MOUNT</emphasis> instruction or prompt for a tape at the start of an operation, because it expects to find the
3652 required first tape in the drive. See <link linkend="HDRWQ278">Eliminating the Search or Prompt for the Initial
3653 Tape</link>.</para>
3654
3655 <para>If there is an <emphasis role="bold">UNMOUNT</emphasis> instruction in the device configuration file, then whenever
3656 the Tape Coordinator closes the tape device, it executes the script named by the instruction's filename argument. It
3657 executes the script only once, and regardless of whether the <emphasis role="bold">close</emphasis> operation on the device
3658 succeeded or not. If the device configuration file does not include an <emphasis role="bold">UNMOUNT</emphasis> instruction,
3659 then the Tape Coordinator takes no action.</para>
3660 </sect3>
3661
3662 <sect3 id="Header_313">
3663 <title>The Available Parameters and Required Exit Codes</title>
3664
3665 <para>When the Tape Coordinator executes the <emphasis role="bold">MOUNT</emphasis> script, it passes in five parameters,
3666 ordered as follows. You can use the parameters in your script to refine its response to varying circumstances that can arise
3667 during a backup operation. <orderedlist>
3668 <listitem>
3669 <para>The tape device or backup data file's pathname, as recorded in the <emphasis
3670 role="bold">/usr/afs/backup/tapeconfig</emphasis> file.</para>
3671 </listitem>
3672
3673 <listitem>
3674 <para>The tape operation, which (except for the exceptions noted in the following list) matches the <emphasis
3675 role="bold">backup</emphasis> command operation code used to initiate the operation: <itemizedlist>
3676 <listitem>
3677 <para><emphasis role="bold">appenddump</emphasis> (when a <emphasis role="bold">backup dump</emphasis> command
3678 includes the <emphasis role="bold">-append</emphasis> flag)</para>
3679 </listitem>
3680
3681 <listitem>
3682 <para><emphasis role="bold">dump</emphasis> (when a <emphasis role="bold">backup dump</emphasis> command does
3683 not include the <emphasis role="bold">-append</emphasis> flag)</para>
3684 </listitem>
3685
3686 <listitem>
3687 <para><emphasis role="bold">labeltape</emphasis></para>
3688 </listitem>
3689
3690 <listitem>
3691 <para><emphasis role="bold">readlabel</emphasis></para>
3692 </listitem>
3693
3694 <listitem>
3695 <para><emphasis role="bold">restore</emphasis> (for a <emphasis role="bold">backup diskrestore</emphasis>,
3696 <emphasis role="bold">backup volrestore</emphasis>, or <emphasis role="bold">backup volsetrestore</emphasis>
3697 command)</para>
3698 </listitem>
3699
3700 <listitem>
3701 <para><emphasis role="bold">restoredb</emphasis></para>
3702 </listitem>
3703
3704 <listitem>
3705 <para><emphasis role="bold">savedb</emphasis></para>
3706 </listitem>
3707
3708 <listitem>
3709 <para><emphasis role="bold">scantape</emphasis></para>
3710 </listitem>
3711 </itemizedlist></para>
3712 </listitem>
3713
3714 <listitem>
3715 <para>The number of times the Tape Coordinator has attempted to open the tape device or backup data file. If the open
3716 attempt returns an error, the Tape Coordinator increments this value by one and again invokes the <emphasis
3717 role="bold">MOUNT</emphasis> instruction.</para>
3718 </listitem>
3719
3720 <listitem>
3721 <para>The tape name. For some operations, the Tape Coordinator passes the string
3722 <computeroutput>none</computeroutput>, because it does not know the tape name (when running the <emphasis
3723 role="bold">backup scantape</emphasis> or <emphasis role="bold">backup readlabel</emphasis>, for example), or because
3724 the tape does not necessarily have a name (when running the <emphasis role="bold">backup labeltape</emphasis> command,
3725 for example).</para>
3726 </listitem>
3727
3728 <listitem>
3729 <para>The tape ID recorded in the Backup Database. As with the tape name, the Backup System passes the string
3730 <computeroutput>none</computeroutput> for operations where it does not know the tape ID or the tape does not
3731 necessarily have an ID.</para>
3732 </listitem>
3733 </orderedlist></para>
3734
3735 <para>Your <emphasis role="bold">MOUNT</emphasis> script must return one of the following exit codes to tell the Tape
3736 Coordinator whether or not it mounted the tape successfully: <itemizedlist>
3737 <listitem>
3738 <para>Code <emphasis role="bold">0</emphasis> (zero) indicates a successful mount, and the Tape Coordinator continues
3739 the backup operation. If the script or program called by the <emphasis role="bold">MOUNT</emphasis> instruction does
3740 not return this exit code, the Tape Coordinator never calls the <emphasis role="bold">UNMOUNT</emphasis>
3741 instruction.</para>
3742 </listitem>
3743
3744 <listitem>
3745 <para>Code <emphasis role="bold">1</emphasis> indicates that mount attempt failed. The Tape Coordinator terminates the
3746 backup operation.</para>
3747 </listitem>
3748
3749 <listitem>
3750 <para>Any other code indicates that the script was unable to access the correct tape. The Tape Coordinator prompts the
3751 operator to insert it.</para>
3752 </listitem>
3753 </itemizedlist></para>
3754
3755 <para>When the Tape Coordinator executes the <emphasis role="bold">UNMOUNT</emphasis> script, it passes in two parameters in
3756 the following order. <orderedlist>
3757 <listitem>
3758 <para>The tape device's pathname (as specified in the <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis>
3759 file)</para>
3760 </listitem>
3761
3762 <listitem>
3763 <para>The tape operation, which is always <emphasis role="bold">unmount</emphasis>.</para>
3764 </listitem>
3765 </orderedlist></para>
3766
3767 <para>The following example script uses two of the parameters passed to it by the Backup System:
3768 <computeroutput>tries</computeroutput> and <computeroutput>operation</computeroutput>. It follows the recommended practice
3769 of exiting if the value of the <computeroutput>tries</computeroutput> parameter exceeds one, because that implies that the
3770 stacker is out of tapes.</para>
3771
3772 <para>For a <emphasis role="bold">backup dump</emphasis> or <emphasis role="bold">backup savedb</emphasis> operation, the
3773 routine calls the example <emphasis role="bold">stackerCmd_NextTape</emphasis> function provided by the stacker's
3774 manufacturer. Note that the final lines in the file return the exit code that prompts the operator to insert a tape; these
3775 lines are invoked when either the stacker cannot load a tape or a the operation being performed is not one of those
3776 explicitly mentioned in the file (is a restore operation, for example).</para>
3777
3778 <programlisting>
3779 #! /bin/csh -f
3780 set devicefile = $1
3781 set operation = $2
3782 set tries = $3
3783 set tapename = $4
3784 set tapeid = $5
3785 set exit_continue = 0
3786 set exit_abort = 1
3787 set exit_interactive = 2
3788 #--------------------------------------------
3789 if (${tries} &gt; 1) then
3790 echo "Too many tries"
3791 exit ${exit_interactive}
3792 endif
3793 if (${operation} == "unmount") then
3794 echo "UnMount: Will leave tape in drive"
3795 exit ${exit_continue}
3796 endif
3797 if ((${operation} == "dump") |\
3798 (${operation} == "appenddump") |\
3799 (${operation} == "savedb")) then
3800 stackerCmd_NextTape ${devicefile}
3801 if (${status} != 0)exit${exit_interactive}
3802 echo "Will continue"
3803 exit ${exit_continue}
3804 endif
3805 if ((${operation} == "labeltape") |\
3806 (${operation} == "readlabel")) then
3807 echo "Will continue"
3808 exit ${exit_continue}
3809 endif
3810 echo "Prompt for tape"
3811 exit ${exit_interactive}
3812</programlisting>
3813
3814 <indexterm>
3815 <primary>Backup System</primary>
3816
3817 <secondary>eliminating search/prompt for initial tape</secondary>
3818 </indexterm>
3819
3820 <indexterm>
3821 <primary>Tape Coordinator (Backup System)</primary>
3822
3823 <secondary>eliminating search/prompt for initial tape</secondary>
3824 </indexterm>
3825
3826 <indexterm>
3827 <primary>tapes (Backup System)</primary>
3828
3829 <secondary>eliminating search/prompt for initial</secondary>
3830 </indexterm>
3831
3832 <indexterm>
3833 <primary>AUTOQUERY instruction in CFG_<emphasis>device_name</emphasis> file</primary>
3834 </indexterm>
3835 </sect3>
3836 </sect2>
3837
3838 <sect2 id="HDRWQ278">
3839 <title>Eliminating the Search or Prompt for the Initial Tape</title>
3840
3841 <para>By default, the Tape Coordinator obtains the first tape it needs for a backup operation by reading the device
3842 configuration file for the appropriate tape device. If there is a <emphasis role="bold">MOUNT</emphasis> instruction in the
3843 file, the Tape Coordinator executes the referenced script. If the device configuration file does not exist or does not have a
3844 <emphasis role="bold">MOUNT</emphasis> instruction in it, the Tape Coordinator prompts you to insert the correct tape and
3845 press <emphasis role="bold">&lt;Return&gt;</emphasis>.</para>
3846
3847 <para>If you know in advance that an operation requires a tape, you can increase efficiency by placing the required tape in
3848 the drive before issuing the <emphasis role="bold">backup</emphasis> command and telling the Tape Coordinator's to skip its
3849 initial tape-acquisition steps. This both enables the operation to begin more quickly and eliminates that need for you to be
3850 present to insert a tape.</para>
3851
3852 <para>There are two ways to bypass the Tape Coordinator's initial tape-acquisition steps: <orderedlist>
3853 <listitem>
3854 <para>Include the instruction <emphasis role="bold">AUTOQUERY NO</emphasis> in the device configuration file</para>
3855 </listitem>
3856
3857 <listitem>
3858 <para>Include the <emphasis role="bold">-noautoquery</emphasis> flag to the <emphasis role="bold">butc</emphasis>
3859 command</para>
3860 </listitem>
3861 </orderedlist></para>
3862
3863 <para>To avoid any error conditions that require operator attention, be sure that the tape you are placing in the drive does
3864 not contain any unexpired dumps and is not write protected. If there is no permanent name on the tape's label and you are
3865 creating an initial dump, make sure that the AFS tape name either matches the volume set and dump set names or is
3866 <computeroutput>&lt;NULL&gt;</computeroutput>. Alternatively, suppress the Tape Coordinator's name verification step by
3867 assigning the value <emphasis role="bold">NO</emphasis> to the <emphasis role="bold">NAME_CHECK</emphasis> instruction in the
3868 device configuration file, as described in <link linkend="HDRWQ280">Eliminating the AFS Tape Name Check</link>.</para>
3869
3870 <indexterm>
3871 <primary>ASK instruction in CFG_<emphasis>device_name</emphasis> file</primary>
3872 </indexterm>
3873
3874 <indexterm>
3875 <primary>Backup System</primary>
3876
3877 <secondary>using default responses to errors</secondary>
3878 </indexterm>
3879
3880 <indexterm>
3881 <primary>Tape Coordinator (Backup System)</primary>
3882
3883 <secondary>using default responses to errors</secondary>
3884 </indexterm>
3885 </sect2>
3886
3887 <sect2 id="HDRWQ279">
3888 <title>Enabling Default Responses to Error Conditions</title>
3889
3890 <para>By default, the Tape Coordinator asks you how to respond when it encounters certain error conditions. To suppress the
3891 prompts and cause the Tape Coordinator to handle the errors in a predetermined manner, include the instruction <emphasis
3892 role="bold">ASK NO</emphasis> in the device configuration file. If you assign the value <emphasis role="bold">YES</emphasis>,
3893 or omit the <emphasis role="bold">ASK</emphasis> instruction completely, the Tape Coordinator prompts you for direction when
3894 it encounters one of the errors.</para>
3895
3896 <para>The following list describes the error conditions and the Tape Coordinator's response to them. <itemizedlist>
3897 <listitem>
3898 <para>The Backup System is unable to dump a volume while running the <emphasis role="bold">backup dump</emphasis>
3899 command. When you assign the value <emphasis role="bold">NO</emphasis>, the Tape Coordinator omits the volume from the
3900 dump and continues the operation. When you assign the value <emphasis role="bold">YES</emphasis>, it prompts to ask if
3901 you want to try to dump the volume again immediately, to omit the volume from the dump but continue the operation, or to
3902 terminate the operation.</para>
3903 </listitem>
3904
3905 <listitem>
3906 <para>The Backup System is unable to restore a volume while running the <emphasis role="bold">backup
3907 diskrestore</emphasis>, <emphasis role="bold">backup volrestore</emphasis>, or <emphasis role="bold">backup
3908 volsetrestore</emphasis> command. When you assign the value <emphasis role="bold">NO</emphasis>, the Tape Coordinator
3909 continues the operation, omitting the problematic volume but restoring the remaining ones. When you assign the value
3910 <emphasis role="bold">YES</emphasis>, it prompts to ask if you want to omit the volume and continue the operation, or to
3911 terminate the operation.</para>
3912 </listitem>
3913
3914 <listitem>
3915 <para>The Backup System cannot determine if the dump set includes any more tapes while running the <emphasis
3916 role="bold">backup scantape</emphasis> command (the command's reference page in the <emphasis>OpenAFS Administration
3917 Reference</emphasis> discusses possible reasons for this problem). When you assign the value <emphasis
3918 role="bold">NO</emphasis>, the Tape Coordinator proceeds as though there are more tapes and invokes the <emphasis
3919 role="bold">MOUNT</emphasis> script named in the device configuration file, or prompts the operator to insert the next
3920 tape. When you assign the value <emphasis role="bold">YES</emphasis>, it prompts to ask if there are more tapes to
3921 scan.</para>
3922 </listitem>
3923
3924 <listitem>
3925 <para>The Backup System determines that the tape contains an unexpired dump while running the <emphasis
3926 role="bold">backup labeltape</emphasis> command. When you assign the value <emphasis role="bold">NO</emphasis>, it
3927 terminates the operation without relabeling the tape. With a <emphasis role="bold">YES</emphasis> value, the Tape
3928 Coordinator prompts to ask if you want to relabel the tape anyway.</para>
3929 </listitem>
3930 </itemizedlist></para>
3931
3932 <indexterm>
3933 <primary>NAME_CHECK instruction in CFG_<emphasis>device_name</emphasis> file</primary>
3934 </indexterm>
3935
3936 <indexterm>
3937 <primary>Backup System</primary>
3938
3939 <secondary>eliminating check for proper tape name</secondary>
3940 </indexterm>
3941
3942 <indexterm>
3943 <primary>tape (Backup System)</primary>
3944
3945 <secondary>eliminating check for proper name</secondary>
3946 </indexterm>
3947
3948 <indexterm>
3949 <primary>Tape Coordinator (Backup System)</primary>
3950
3951 <secondary>eliminating check for proper tape name</secondary>
3952 </indexterm>
3953 </sect2>
3954
3955 <sect2 id="HDRWQ280">
3956 <title>Eliminating the AFS Tape Name Check</title>
3957
3958 <para>If a tape does not have a permanent name and you are writing an initial dump to it, then by default the Backup System
3959 verifies that the tape's AFS tape name is acceptable. It accepts three types of values: <itemizedlist>
3960 <listitem>
3961 <para>A name that reflects the volume set and dump level of the initial dump and the tape's place in the sequence of
3962 tapes for the dump set, as described in <link linkend="HDRWQ253">Dump Names and Tape Names</link>. If the tape does not
3963 already have a permanent name, you can assign the AFS tape name by using the <emphasis role="bold">-name</emphasis>
3964 argument to the <emphasis role="bold">backup labeltape</emphasis> command.</para>
3965 </listitem>
3966
3967 <listitem>
3968 <para>A <computeroutput>&lt;NULL&gt;</computeroutput> value, which results when you assign a permanent name, or provide
3969 no value for the <emphasis role="bold">backup labeltape</emphasis> command's <emphasis role="bold">-name</emphasis>
3970 argument.</para>
3971 </listitem>
3972
3973 <listitem>
3974 <para>No AFS tape name at all, indicating that you have never labeled the tape or written a dump to it.</para>
3975 </listitem>
3976 </itemizedlist></para>
3977
3978 <para>To bypass the name check, include the <emphasis role="bold">NAME_CHECK NO</emphasis> instruction in the device
3979 configuration file. This enables you to recycle a tape without first relabeling it, as long as all dumps on it are expired.
3980 (If a tape has unexpired dumps on it but you want to recycle it anyway, you must use the <emphasis role="bold">backup
3981 labeltape</emphasis> command to relabel it first. For this to work, the <emphasis role="bold">ASK NO</emphasis> instruction
3982 cannot appear in the device configuration file.)</para>
3983 </sect2>
3984
3985 <sect2 id="HDRWQ281">
3986 <title>Setting the Memory Buffer Size to Promote Tape Streaming</title>
3987
3988 <para>By default, the Tape Coordinator uses a 16-KB memory buffer during dump operations. As it receives volume data from the
3989 Volume Server, the Tape Coordinator gathers 16 KB of data in the buffer before transferring the entire 16 KB to the tape
3990 device. Similarly, during a restore operation the Tape Coordinator by default buffers 32 KB of data from the tape device
3991 before transferring the entire 32 KB to the Volume Server for restoration into the file system. Buffering makes the volume of
3992 data flowing to and from a tape device more even and so promotes tape streaming, which is the most efficient way for a tape
3993 device to operate.</para>
3994
3995 <para>In a normal network configuration, the default buffer sizes are usually large enough to promote tape streaming. If the
3996 network between the Tape Coordinator machine and file server machines is slow, it can help to increase the buffer size.</para>
3997
3998 <para>To determine if altering the buffer size is helpful for your configuration, observe the tape device in operation to see
3999 if it is streaming, or consult the manufacturer. To set the buffer size, include the <emphasis
4000 role="bold">BUFFERSIZE</emphasis> instruction in the device configuration file. It takes an integer value, and optionally
4001 units, in the following format:</para>
4002
4003 <programlisting><emphasis role="bold">BUFFERSIZE</emphasis> size[{<emphasis role="bold">k</emphasis> | <emphasis role="bold">K</emphasis> | <emphasis
4004 role="bold">m</emphasis> | <emphasis role="bold">M</emphasis> | <emphasis role="bold">g</emphasis> | <emphasis role="bold">G</emphasis>}]
4005</programlisting>
4006
4007 <para>where size specifies the amount of memory the Tape Coordinator allocates to use as a buffer during both dump and restore
4008 operations. The default unit is bytes, but use <emphasis role="bold">k</emphasis> or <emphasis role="bold">K</emphasis> to
4009 specify kilobytes, <emphasis role="bold">m</emphasis> or <emphasis role="bold">M</emphasis> for megabytes, and <emphasis
4010 role="bold">g</emphasis> or <emphasis role="bold">G</emphasis> for gigabytes. There is no space between the size value and the
4011 units letter.</para>
4012 </sect2>
4013
4014 <sect2 id="HDRWQ282">
4015 <title>Dumping Data to a Backup Data File</title>
4016
4017 <para>You can write dumps to a <emphasis>backup data file</emphasis> rather than to tape. This is useful if, for example, you
4018 want to transfer the data to a data-archiving system, such as a hierarchical storage management (HSM) system, that you use in
4019 conjunction with AFS and the Backup System. You can restore data from a backup data file into the file system as well. Using a
4020 backup data file is usually more efficient than issuing the equivalent <emphasis role="bold">vos dump</emphasis> and <emphasis
4021 role="bold">vos restore</emphasis> commands individually for multiple volumes.</para>
4022
4023 <para>Writing to a backup data file is simplest if it is on the local disk of the Tape Coordinator machine, but you can also
4024 write the file to an NFS-mounted partition that resides on a remote machine. It is even acceptable to write to a file in AFS,
4025 provided that the access control list (ACL) on its parent directory grants the necessary permissions, but it is somewhat
4026 circular to back up AFS data into AFS itself.</para>
4027
4028 <para>If the backup data file does not already exist when the Tape Coordinator attempts to write a dump to it, the Tape
4029 Coordinator creates it. For a restore operation to succeed, the file must exist and contain volume data previously written to
4030 it during a <emphasis role="bold">backup dump</emphasis> operation.</para>
4031
4032 <para>When writing to a backup data file, the Tape Coordinator writes data at 16 KB offsets. If a given block of data (such as
4033 the marker that signals the beginning or end of a volume) does not fill the entire 16 KB, the Tape Coordinator still skips to
4034 the next offset before writing the next block. In the output of a <emphasis role="bold">backup dumpinfo</emphasis> command
4035 issued with the <emphasis role="bold">-id</emphasis> option, the value in the <computeroutput>Pos</computeroutput> column is
4036 the ordinal of the 16-KB offset at which the volume data begins, and so is not generally only one higher than the position
4037 number on the previous line, as it is for dumps to tape.</para>
4038
4039 <para>Before writing to a backup data file, you need to configure the file as though it were a tape device.</para>
4040
4041 <note>
4042 <para>A file pathname, rather than a tape device name, must appear in the third field of the <emphasis
4043 role="bold">/usr/afs/backup/tapeconfig</emphasis> file when the <emphasis role="bold">FILE YES</emphasis> instruction
4044 appears in the device configuration file, and vice versa. If the <emphasis role="bold">tapeconfig</emphasis> file instead
4045 refers to a tape device, dump operations appear to succeed but are inoperative. You cannot restore data that you accidently
4046 dumped to a tape device while the <emphasis role="bold">FILE</emphasis> instruction was set to <emphasis
4047 role="bold">YES</emphasis>. In the same way, if the <emphasis role="bold">FILE</emphasis> instruction is set to <emphasis
4048 role="bold">NO</emphasis>, the <emphasis role="bold">tapeconfig</emphasis> entry must refer to an actual tape device.</para>
4049 </note>
4050 </sect2>
4051
4052 <sect2 id="Header_319">
4053 <title>To configure a backup data file</title>
4054
4055 <orderedlist>
4056 <listitem>
4057 <para>Verify that you are authenticated as a user listed in the <emphasis role="bold">/usr/afs/etc/UserList</emphasis>
4058 file. If necessary, issue the <emphasis role="bold">bos listusers</emphasis> command, which is fully described in <link
4059 linkend="HDRWQ593">To display the users in the UserList file</link>. <programlisting>
4060 % <emphasis role="bold">bos listusers</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
4061</programlisting></para>
4062 </listitem>
4063
4064 <listitem>
4065 <para>Become the local superuser <emphasis role="bold">root</emphasis> on the machine, if you are not already, by issuing
4066 the <emphasis role="bold">su</emphasis> command. <programlisting>
4067 % <emphasis role="bold">su root</emphasis>
4068 Password: &lt;<replaceable>root_password</replaceable>&gt;
4069</programlisting></para>
4070 </listitem>
4071
4072 <listitem>
4073 <para><emphasis role="bold">Optional</emphasis>. Issue the <emphasis role="bold">backup</emphasis> command to enter
4074 interactive mode. <programlisting>
4075 # <emphasis role="bold">backup</emphasis>
4076</programlisting></para>
4077 </listitem>
4078
4079 <listitem>
4080 <para>Choose the port offset number to assign to the file. If necessary, display previously assigned port offsets by
4081 issuing the <emphasis role="bold">(backup) listhosts</emphasis> command, which is fully described in <link
4082 linkend="HDRWQ264">To display the list of configured Tape Coordinators</link>. <programlisting>
4083 backup&gt; <emphasis role="bold">listhosts</emphasis>
4084</programlisting></para>
4085
4086 <para>As for a tape device, acceptable values are the integers <emphasis role="bold">0</emphasis> (zero) through <emphasis
4087 role="bold">58510</emphasis> (the Backup System can track a maximum of 58,511 port offset numbers). Each port offset must
4088 be unique in the cell, but you can associate any number them with a single Tape Coordinator machine. You do not have to
4089 assign port offset numbers sequentially.</para>
4090 </listitem>
4091
4092 <listitem>
4093 <para>Issue the <emphasis role="bold">(backup) addhost</emphasis> command to register the backup data file's port offset
4094 in the Backup Database. <programlisting>
4095 backup&gt; <emphasis role="bold">addhost</emphasis> &lt;<replaceable>tape machine name</replaceable>&gt; [&lt;<replaceable>TC port offset</replaceable>&gt;]
4096</programlisting></para>
4097
4098 <para>where <variablelist>
4099 <varlistentry>
4100 <term><emphasis role="bold">addh</emphasis></term>
4101
4102 <listitem>
4103 <para>Is the shortest acceptable abbreviation of <emphasis role="bold">addhost</emphasis>.</para>
4104 </listitem>
4105 </varlistentry>
4106
4107 <varlistentry>
4108 <term><emphasis role="bold">tape machine name</emphasis></term>
4109
4110 <listitem>
4111 <para>Specifies the fully qualified hostname of the Tape Coordinator machine you invoke to write to the backup
4112 data file.</para>
4113 </listitem>
4114 </varlistentry>
4115
4116 <varlistentry>
4117 <term><emphasis role="bold">TC port offset</emphasis></term>
4118
4119 <listitem>
4120 <para>Specifies the file's port offset number. You must provide this argument unless the default value of
4121 <emphasis role="bold">0</emphasis> (zero) is appropriate.</para>
4122 </listitem>
4123 </varlistentry>
4124 </variablelist></para>
4125 </listitem>
4126
4127 <listitem id="LITAPECONFIG-FILE">
4128 <para>Using a text editor, create an entry for the backup data file in the local
4129 <emphasis role="bold">/usr/afs/backup/tapeconfig</emphasis> file, using the standard syntax: <programlisting>
4130 [capacity filemark_size] device_name port_offset
4131</programlisting></para>
4132
4133 <para>where <variablelist>
4134 <varlistentry>
4135 <term><emphasis role="bold">capacity</emphasis></term>
4136
4137 <listitem>
4138 <para>Specifies the amount of space on the partition that houses the backup data file that you want to make
4139 available for the file. To avoid the complications that arise from filling up the partition, it is best to provide
4140 a value somewhat smaller than the actual amount of space you expect to be available when the dump operation runs,
4141 and never larger than the maximum file size allowed by the operating system.</para>
4142
4143 <para>Specify a numerical value followed by a letter that indicates units, with no intervening space. The letter
4144 <emphasis role="bold">k</emphasis> or <emphasis role="bold">K</emphasis> indicates kilobytes, <emphasis
4145 role="bold">m</emphasis> or <emphasis role="bold">M</emphasis> indicates megabytes, and <emphasis
4146 role="bold">g</emphasis> or <emphasis role="bold">G</emphasis> indicates gigabytes. If you omit the units letter,
4147 the default is kilobytes. If you leave this field empty, the Tape Coordinator uses the maximum acceptable value
4148 (2048 GB or 2 TB). Also leave the filemark_size field empty in that case.</para>
4149 </listitem>
4150 </varlistentry>
4151
4152 <varlistentry>
4153 <term><emphasis role="bold">filemark_size</emphasis></term>
4154
4155 <listitem>
4156 <para>Specify the value <emphasis role="bold">0</emphasis> (zero) or leave both this field and the capacity field
4157 empty. In the latter case, the Tape Coordinator also uses the value zero.</para>
4158 </listitem>
4159 </varlistentry>
4160
4161 <varlistentry>
4162 <term><emphasis role="bold">device_name</emphasis></term>
4163
4164 <listitem>
4165 <para>Specifies the complete pathname of the backup data file. Rather than specifying an actual file pathname,
4166 however, the recommended configuration is to create a symbolic link in the <emphasis role="bold">/dev</emphasis>
4167 directory that points to the actual file pathname, and record the symbolic link in this field. This configuration
4168 provides these advantages: <itemizedlist>
4169 <listitem>
4170 <para>It makes the device_name portion of the <emphasis role="bold">CFG_</emphasis>device_name, of the
4171 <emphasis role="bold">TE_</emphasis>device_name, and of the <emphasis role="bold">TL_</emphasis>device_name
4172 filenames as short as possible. Because the symbolic link is in the <emphasis role="bold">/dev</emphasis>
4173 directory as though it is a tape device, you strip off the entire <emphasis role="bold">/dev/</emphasis>
4174 prefix when forming the filename, instead of just the initial slash (<emphasis role="bold">/</emphasis>).
4175 If, for example, the symbolic link is called <emphasis role="bold">/dev/FILE</emphasis>, the device
4176 configuration file's name is <emphasis role="bold">CFG_FILE</emphasis>, whereas if the actual pathname
4177 /<emphasis role="bold">var/tmp/FILE</emphasis> appears in the <emphasis role="bold">tapeconfig</emphasis>
4178 file, the configuration file's name must be <emphasis role="bold">CFG_var_tmp_FILE</emphasis>.</para>
4179 </listitem>
4180
4181 <listitem>
4182 <para>It provides for a more graceful, and potentially automated, recovery if the Tape Coordinator cannot
4183 write a complete dump into the backup data file (for example, because the partition housing the backup data
4184 file becomes full). The Tape Coordinator's reaction to this problem is to invoke the <emphasis
4185 role="bold">MOUNT</emphasis> script, or to prompt you if the <emphasis role="bold">MOUNT</emphasis>
4186 instruction does not appear in the configuration file. <itemizedlist>
4187 <listitem>
4188 <para>If there is a <emphasis role="bold">MOUNT</emphasis> script, you can prepare for this situation
4189 by adding a subroutine to the script that changes the symbolic link to point to another backup data
4190 file on a partition where there is space available.</para>
4191 </listitem>
4192
4193 <listitem>
4194 <para>If there is no <emphasis role="bold">MOUNT</emphasis> instruction, the prompt enables you
4195 manually to change the symbolic link to point to another backup data file and then press &lt;<emphasis
4196 role="bold">Return</emphasis>&gt; to signal that the Tape Coordinator can continue the
4197 operation.</para>
4198 </listitem>
4199 </itemizedlist></para>
4200
4201 <para>If this field names the actual file, there is no way to recover from exhausting the space on the
4202 partition. You cannot change the <emphasis role="bold">tapeconfig</emphasis> file in the middle of an
4203 operation.</para>
4204 </listitem>
4205 </itemizedlist></para>
4206 </listitem>
4207 </varlistentry>
4208
4209 <varlistentry>
4210 <term><emphasis role="bold">port_offset</emphasis></term>
4211
4212 <listitem>
4213 <para>Specifies the port offset number that you chose for the backup data file.</para>
4214 </listitem>
4215 </varlistentry>
4216 </variablelist></para>
4217 </listitem>
4218
4219 <listitem>
4220 <para>Create the device configuration file <emphasis role="bold">CFG_</emphasis>device_name in the Tape Coordinator
4221 machine's <emphasis role="bold">/usr/afs/backup</emphasis> directory. Include the <emphasis role="bold">FILE
4222 YES</emphasis> instruction in the file.</para>
4223
4224 <para>Construct the device_name portion of the name based on the device name you recorded in the <emphasis
4225 role="bold">tapeconfig</emphasis> file in Step <link linkend="LITAPECONFIG-FILE">6</link>. If, as recommended, you
4226 recorded a symbolic link name, strip off the <emphasis role="bold">/dev/</emphasis> string and replace any other slashes
4227 (<emphasis role="bold">/</emphasis>) in the name with underscores (<emphasis role="bold">_</emphasis>). For example,
4228 <emphasis role="bold">CFG_FILE</emphasis> is the appropriate name if the symbolic link is <emphasis
4229 role="bold">/dev/FILE</emphasis>. If you recorded the name of an actual file, then strip off the initial slash only and
4230 replace any other slashes in the name with underscores. For a backup data file called <emphasis
4231 role="bold">/var/tmp/FILE</emphasis>, the appropriate device configuration filename is <emphasis
4232 role="bold">CFG_var_tmp_FILE</emphasis>.</para>
4233 </listitem>
4234
4235 <listitem>
4236 <para>If you chose in Step <link linkend="LITAPECONFIG-FILE">6</link> to record a symbolic link name in the device_name
4237 field of the <emphasis role="bold">tapeconfig</emphasis> entry, then you must do one of the following: <itemizedlist>
4238 <listitem>
4239 <para>Use the <emphasis role="bold">ln -s</emphasis> command to create the appropriate symbolic link in the
4240 <emphasis role="bold">/dev</emphasis> directory</para>
4241 </listitem>
4242
4243 <listitem>
4244 <para>Write a script that initializes the backup data file in this way, and include a <emphasis
4245 role="bold">MOUNT</emphasis> instruction in the device configuration file to invoke the script. An example script
4246 appears following these instructions.</para>
4247 </listitem>
4248 </itemizedlist></para>
4249 </listitem>
4250 </orderedlist>
4251
4252 <para>You do not need to create the backup data file itself, because the Tape Coordinator does so if the file does not exist
4253 when the dump operation begins.</para>
4254
4255 <para>The following example script illustrates how you can automatically create a symbolic link to the backup data file during
4256 the preparation phase for writing to the file. When the Tape Coordinator is executing a <emphasis role="bold">backup
4257 dump</emphasis>, <emphasis role="bold">backup restore</emphasis>, <emphasis role="bold">backup savedb</emphasis>, or <emphasis
4258 role="bold">backup restoredb</emphasis> operation, the routine invokes the UNIX <emphasis role="bold">ln -s</emphasis> command
4259 to create a symbolic link from the backup data file named in the <emphasis role="bold">tapeconfig</emphasis> file to the
4260 actual file to use (this is the recommended method). It uses the values of the <computeroutput>tapename</computeroutput> and
4261 <computeroutput>tapeid</computeroutput> parameters passed to it by the Backup System when constructing the filename.</para>
4262
4263 <para>The routine makes use of two other parameters as well: <computeroutput>tries</computeroutput> and
4264 <computeroutput>operation</computeroutput>. The <computeroutput>tries</computeroutput> parameter tracks how many times the
4265 Tape Coordinator has attempted to access the file. A value greater than one indicates that the Tape Coordinator cannot access
4266 it, and the routine returns exit code 2 (<computeroutput>exit_interactive</computeroutput>), which results in a prompt for the
4267 operator to load a tape. The operator can use this opportunity to change the name of the backup data file specified in the
4268 <emphasis role="bold">tapeconfig</emphasis> file.</para>
4269
4270 <programlisting>
4271 #! /bin/csh -f
4272 set devicefile = $1
4273 set operation = $2
4274 set tries = $3
4275 set tapename = $4
4276 set tapeid = $5
4277 set exit_continue = 0
4278 set exit_abort = 1
4279 set exit_interactive = 2
4280 #--------------------------------------------
4281 if (${tries} &gt; 1) then
4282 echo "Too many tries"
4283 exit ${exit_interactive}
4284 endif
4285 if (${operation} == "labeltape") then
4286 echo "Won't label a tape/file"
4287 exit ${exit_abort}
4288 endif
4289 if ((${operation} == "dump") |\
4290 (${operation} == "appenddump") |\
4291 (${operation} == "restore") |\
4292 (${operation} == "savedb") |\
4293 (${operation} == "restoredb")) then
4294 /bin/rm -f ${devicefile}
4295 /bin/ln -s /hsm/${tapename}_${tapeid} ${devicefile}
4296 if (${status} != 0) exit ${exit_abort}
4297 endif
4298 exit ${exit_continue}
4299</programlisting>
4300 </sect2>
4301 </sect1>
4302</chapter>