Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / doc / man-pages / pod8 / backup_scantape.pod
CommitLineData
805e021f
CE
1=head1 NAME
2
3backup_scantape - Extracts dump information from a tape
4
5=head1 SYNOPSIS
6
7=for html
8<div class="synopsis">
9
10B<backup scantape> [B<-dbadd>] S<<< [B<-portoffset> <I<TC port offset>>] >>>
11 [B<-localauth>] S<<< [B<-cell> <I<cell name>>] >>> [B<-help>]
12
13B<backup sc> [B<-d>] S<<< [B<-p> <I<TC port offset>>] >>> [B<-l>]
14 S<<< [B<-c> <I<cell name>>] >>> [B<-h>]
15
16=for html
17</div>
18
19=head1 DESCRIPTION
20
21The B<backup scantape> command extracts information from the dump labels
22and volume headers on the tape in the device controlled by the Tape
23Coordinator indicated by the B<-portoffset> argument. The Tape Coordinator
24displays the information for each volume in its window as soon as it
25extracts it (rather than waiting until it has scanned the entire tape).
26
27(If the C<FILE YES> instruction appears in the
28F</usr/afs/backup/CFG_I<device_name>> file associated with the specified
29port offset, then the B<backup scantape> command extracts dump information
30from the backup data file named in that port offset's entry in the
31F</usr/afs/backup/tapeconfig> file on the Tape Coordinator machine, rather
32than from a tape. For the sake of clarity, the following text refers to
33tapes only, but the Backup System handles backup data files in much the
34same way.)
35
36If the B<-dbadd> flag is provided, the backup scantape command creates new
37dump and volume records in the Backup Database for the scanned
38information. However, if it finds that a record already exists in the
39database for the same dump, it terminates the scanning operation.
40
41The scanning operation works only on tapes containing volume data. The
42command fails with an error message if the tape contains a copy of the
43Backup Database (was created with the B<backup savedb> command, or has the
44AFS tape name C<Ubik_db_dump.1>).
45
46The Tape Coordinator's default response to this command is to access the
47tape by invoking the C<MOUNT> instruction in the F<CFG_I<device_name>>
48file, or by prompting the backup operator to insert the tape if there is
49no C<MOUNT> instruction. However, if the C<AUTOQUERY NO> instruction
50appears in the F<CFG_I<device_name>> file, or if the issuer of the B<butc>
51command included the B<-noautoquery> flag, the Tape Coordinator instead
52expects the tape to be in the device already. If it is not, the Tape
53Coordinator invokes the C<MOUNT> instruction or prompts the operator.
54
55To terminate a tape scanning operation in interactive mode, issue the
56B<backup kill> command. In noninteractive mode, the only choice is to use
57a termination signal such as Ctrl-C to halt the Tape Coordinator
58completely.
59
60=head1 CAUTIONS
61
62A scanning operation does not have to begin with the first tape in a dump
63set, but the Backup System can process tapes only in sequential order
64after the initial tape provided. The Tape Coordinator automatically
65requests any subsequent tapes by invoking the C<MOUNT> instruction in the
66local F</usr/afs/backup/CFG_I<device_name>> file, or by prompting the
67operator if there is no C<MOUNT> instruction.
68
69The Tape Coordinator's success in scanning a tape that is corrupted or
70damaged depends on the extent of the damage and what type of data is
71corrupted. It can almost always scan the tape successfully up to the point
72of damage. If the damage is minor, the Tape Coordinator can usually skip
73over it and scan the rest of the tape, but more major damage can prevent
74further scanning. Because a scanning operation can start on any tape in a
75dump set, damage on one tape does not prevent scanning of the others in
76the dump set. However, it is possible to scan either the tapes that
77precede the damaged one or the ones that follow it, but not both.
78
79If a tape is relabeled with the backup labeltape command, it is not
80possible to recover data from it for the purposes of rebuilding the Backup
81Database.
82
83If the B<-dbadd> flag is included on the command, it is best not to
84terminate the tape scanning operation before it completes (for example, by
85issuing the B<backup kill> command in interactive mode). The Backup System
86writes a new record in the Backup Database for each dump as soon as it
87scans the relevant information on the tape, and so it possibly has already
88written new records. If the operator wants to rerun the scanning
89operation, he or she must locate and remove the records created during the
90terminated operation: the second operation exits automatically if it finds
91that a record that it needs to create already exists.
92
93If the B<-dbadd> flag is included and the first tape provided is not the
94first tape in the dump set, the following restrictions apply:
95
96=over 4
97
98=item *
99
100If the first data on the tape is a continuation of a volume that begins on
101the previous (unscanned) tape in the dump set, the Backup System does not
102add a record for that volume to the Backup Database.
103
104=item *
105
106The Backup System must read the marker that indicates the start of an
107appended dump to add database records for the volumes in it. If the first
108volume on the tape belongs to an appended dump, but is not immediately
109preceded by the appended-dump marker, the Backup System does not create a
110Backup Database record for it or any subsequent volumes that belong to
111that appended dump.
112
113=back
114
115=head1 OPTIONS
116
117=over 4
118
119=item B<-dbadd>
120
121Adds the information extracted from the tape to the Backup Database (but
122only if the database does not already contain an entry with the same dump
123ID number).
124
125=item B<-portoffset> <I<TC port offset>>
126
127Specifies the port offset number of the Tape Coordinator handling the
128tapes for this operation.
129
130=item B<-localauth>
131
132Constructs a server ticket using a key from the local
133F</usr/afs/etc/KeyFile> file. The B<backup> command interpreter presents
134it to the Backup Server, Volume Server and VL Server during mutual
135authentication. Do not combine this flag with the B<-cell> argument. For
136more details, see L<backup(8)>.
137
138=item B<-cell> <I<cell name>>
139
140Names the cell in which to run the command. Do not combine this argument
141with the B<-localauth> flag. For more details, see L<backup(8)>.
142
143=item B<-help>
144
145Prints the online help for this command. All other valid options are
146ignored.
147
148=back
149
150=head1 OUTPUT
151
152For every dump on a tape, the backup scantape command displays in the Tape
153Coordinator window the dump label and the volume header of each volume in
154the dump. If a dump spans more than one tape, the dump label does not
155repeat at the beginning of subsequent tapes.
156
157A dump label contains the following fields, which are the same as in the
158output from the B<backup readlabel> command:
159
160=over 4
161
162=item tape name
163
164The permanent name assigned by using the B<-pname> argument of the
165B<backup labeltape> command. This name remains on the tape until that
166argument is used again, no matter how many times the tape is recycled or
167otherwise relabeled. If the tape does not have a permanent name, the value
168C<< <NULL> >> appears in this field.
169
170=item AFS tape name
171
172A tape name in one of the following prescribed formats. The Backup System
173automatically writes the appropriate AFS tape name to the label as part of
174a B<backup dump> operation, or the operator can assign it with the
175B<-name> argument to the B<backup labeltape> command.
176
177=over 4
178
179=item *
180
181I<volume_set_name>.I<dump_level_name>.I<tape_index>, if the tape contains
182volume data. The I<volume_set_name> is the name of the volume set that was
183dumped to create the initial dump in the dump set of which this tape is a
184part; I<dump_level_name> is the last pathname element of the dump level at
185which the initial dump was backed up; and I<tape_index> is the numerical
186position of the tape in the dump set.
187
188=item *
189
190C<< <NULL> >> if the tape has no AFS tape name. This is normally the case
191if the B<-name> argument was not included the last time the B<backup
192labeltape> command was used on this tape, and no data has been written to
193it since.
194
195=back
196
197=item creationTime
198
199The date and time at which the Backup System started performing the dump
200operation that created the initial dump.
201
202=item cell
203
204The cell in which the dump set was created. This is the cell whose Backup
205Database contains a record of the dump set.
206
207=item size
208
209The tape's capacity (in kilobytes) as recorded on the label, rather than
210the amount of data on the tape. The value is assigned by the B<-size>
211argument to the B<backup labeltape> command or derived from the
212F</usr/afs/backup/tapeconfig> file on the Tape Coordinator machine, not
213from a measurement of the tape.
214
215=item dump path
216
217The dump level of the initial dump in the dump set.
218
219=item dump id
220
221The dump ID number of the initial dump in the dump set, as recorded in the
222Backup Database.
223
224=item useCount
225
226The number of times a dump has been written to the tape, or it has been
227relabeled.
228
229=back
230
231The volume header contains the following fields:
232
233=over 4
234
235=item volume name
236
237The volume name, complete with a C<.backup> or C<.readonly> extension, if
238appropriate.
239
240=item volume ID
241
242The volume's volume ID.
243
244=item dumpSetName
245
246The dump to which the volume belongs. The dump name is of the form
247I<volume_set_name>.I<dump_level_name> and matches the name displayed in
248the dump label.
249
250=item dumpID
251
252The dump ID of the dump named in the C<dumpSetName> field.
253
254=item level
255
256The depth in the dump hierarchy of the dump level used in creating the
257dump. A value of C<0> indicates a full dump. A value of C<1> or greater
258indicates an incremental dump made at the indicated depth in the
259hierarchy. The value reported is for the entire dump, not necessarily for
260the volume itself; for example, it is possible for a dump performed at an
261incremental level to include a full dump of an individual volume if the
262volume was omitted from previous dumps.
263
264=item parentID
265
266The dump ID number of C<dumpSetName>'s parent dump. It is C<0> if the
267value in the C<level> field is C<0>.
268
269=item endTime
270
271Is always C<0>; it is reserved for internal use.
272
273=item cloneDate
274
275The date and time at which the volume was created. For a backup or
276read-only volume, this represents the time at which it was cloned from its
277read/write source. For a read/write volume, it indicates the time at which
278the Backup System locked the volume for purposes of including it in the
279dump named in the C<dumpSetName> field.
280
281=back
282
283The message C<Scantape: Finished> indicates the completion of the output.
284
285In normal circumstances, the Backup System writes a marker to indicate
286that a volume is the last one on a tape, or that the volume continues on
287the next tape. However, if a backup operation terminated abnormally (for
288example, because the operator terminated the Tape Coordinator by issuing
289the Ctrl-C command during the operation), then there is no such
290marker. Some very early versions of the Backup System also did not write
291these markers. If a tape does not conclude with one of the expected
292markers, the Tape Coordinator cannot determine if there is a subsequent
293tape in the dump set and so generates the following message in its window:
294
295 Are there more tapes? (y/n)
296
297=head1 EXAMPLES
298
299The following example shows the output for the first two volumes on a tape
300in the device with port offset 0:
301
302 % backup scantape
303 Dump label
304 ----------
305 tape name = monthly_guest
306 AFS tape name = guests.monthly.3
307 creationTime = Mon Feb 1 04:06:40 1999
308 cell = example.com
309 size = 2150000 Kbytes
310 dump path = /monthly
311 dump id = 917860000
312 useCount = 44
313 -- End of dump label --
314 -- volume --
315 volume name: user.guest10.backup
316 volume ID 1937573829
317 dumpSetName: guests.monthly
318 dumpID 917860000
319 level 0
320 parentID 0
321 endTime 0
322 clonedate Mon Feb 1 03:03:23 1999
323 -- volume --
324 volume name: user.guest11.backup
325 volume ID 1938519386
326 dumpSetName: guests.monthly
327 dumpID 917860000
328 level 0
329 parentID 0
330 endTime 0
331 clonedate Mon Feb 1 03:05:15 1999
332
333=head1 PRIVILEGE REQUIRED
334
335The issuer must be listed in the F</usr/afs/etc/UserList> file on every
336machine where the Backup Server is running, or must be logged onto a
337server machine as the local superuser C<root> if the B<-localauth> flag is
338included.
339
340=head1 SEE ALSO
341
342L<butc(5)>,
343L<backup(8)>,
344L<backup_dump(8)>,
345L<backup_dumpinfo(8)>,
346L<butc(8)>
347
348=head1 COPYRIGHT
349
350IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
351
352This documentation is covered by the IBM Public License Version 1.0. It was
353converted from HTML to POD by software written by Chas Williams and Russ
354Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.