3 backup scantape - Extracts dump information from a tape
7 B<backup scantape> [B<-dbadd>] [B<-portoffset> <I<TC port offset>>]
8 [B<-localauth>] [B<-cell> <I<cell name>>] [B<-help>]
10 B<backup sc> [B<-d>] [B<-p> <I<TC port offset>>] [B<-l>]
11 [B<-c> <I<cell name>>] [B<-h>]
15 The B<backup scantape> command extracts information from the dump labels
16 and volume headers on the tape in the device controlled by the Tape
17 Coordinator indicated by the B<-portoffset> argument. The Tape Coordinator
18 displays the information for each volume in its window as soon as it
19 extracts it (rather than waiting until it has scanned the entire tape).
21 (If the C<FILE YES> instruction appears in the
22 F</usr/afs/backup/CFG_I<device_name>> file associated with the specified
23 port offset, then the B<backup scantape> command extracts dump information
24 from the backup data file named in that port offset's entry in the
25 F</usr/afs/backup/tapeconfig> file on the Tape Coordinator machine, rather
26 than from a tape. For the sake of clarity, the following text refers to
27 tapes only, but the Backup System handles backup data files in much the
30 If the B<-dbadd> flag is provided, the backup scantape command creates new
31 dump and volume records in the Backup Database for the scanned
32 information. However, if it finds that a record already exists in the
33 database for the same dump, it terminates the scanning operation.
35 The scanning operation works only on tapes containing volume data. The
36 command fails with an error message if the tape contains a copy of the
37 Backup Database (was created with the B<backup savedb> command, or has the
38 AFS tape name C<Ubik_db_dump.1>).
40 The Tape Coordinator's default response to this command is to access the
41 tape by invoking the C<MOUNT> instruction in the F<CFG_I<device_name>>
42 file, or by prompting the backup operator to insert the tape if there is
43 no C<MOUNT> instruction. However, if the C<AUTOQUERY NO> instruction
44 appears in the F<CFG_I<device_name>> file, or if the issuer of the B<butc>
45 command included the B<-noautoquery> flag, the Tape Coordinator instead
46 expects the tape to be in the device already. If it is not, the Tape
47 Coordinator invokes the C<MOUNT> instruction or prompts the operator.
49 To terminate a tape scanning operation in interactive mode, issue the
50 B<backup kill> command. In noninteractive mode, the only choice is to use
51 a termination signal such as Ctrl-C to halt the Tape Coordinator
56 A scanning operation does not have to begin with the first tape in a dump
57 set, but the Backup System can process tapes only in sequential order
58 after the initial tape provided. The Tape Coordinator automatically
59 requests any subsequent tapes by invoking the C<MOUNT> instruction in the
60 local F</usr/afs/backup/CFG_I<device_name>> file, or by prompting the
61 operator if there is no C<MOUNT> instruction.
63 The Tape Coordinator's success in scanning a tape that is corrupted or
64 damaged depends on the extent of the damage and what type of data is
65 corrupted. It can almost always scan the tape successfully up to the point
66 of damage. If the damage is minor, the Tape Coordinator can usually skip
67 over it and scan the rest of the tape, but more major damage can prevent
68 further scanning. Because a scanning operation can start on any tape in a
69 dump set, damage on one tape does not prevent scanning of the others in
70 the dump set. However, it is possible to scan either the tapes that
71 precede the damaged one or the ones that follow it, but not both.
73 If a tape is relabeled with the backup labeltape command, it is not
74 possible to recover data from it for the purposes of rebuilding the Backup
77 If the B<-dbadd> flag is included on the command, it is best not to
78 terminate the tape scanning operation before it completes (for example, by
79 issuing the B<backup kill> command in interactive mode). The Backup System
80 writes a new record in the Backup Database for each dump as soon as it
81 scans the relevant information on the tape, and so it possibly has already
82 written new records. If the operator wants to rerun the scanning
83 operation, he or she must locate and remove the records created during the
84 terminated operation: the second operation exits automatically if it finds
85 that a record that it needs to create already exists.
87 If the B<-dbadd> flag is included and the first tape provided is not the
88 first tape in the dump set, the following restrictions apply:
94 If the first data on the tape is a continuation of a volume that begins on
95 the previous (unscanned) tape in the dump set, the Backup System does not
96 add a record for that volume to the Backup Database.
100 The Backup System must read the marker that indicates the start of an
101 appended dump to add database records for the volumes in it. If the first
102 volume on the tape belongs to an appended dump, but is not immediately
103 preceded by the appended-dump marker, the Backup System does not create a
104 Backup Database record for it or any subsequent volumes that belong to
115 Adds the information extracted from the tape to the Backup Database (but
116 only if the database does not already contain an entry with the same dump
119 =item B<-portoffset> <I<TC port offset>>
121 Specifies the port offset number of the Tape Coordinator handling the
122 tapes for this operation.
126 Constructs a server ticket using a key from the local
127 F</usr/afs/etc/KeyFile> file. The B<backup> command interpreter presents
128 it to the Backup Server, Volume Server and VL Server during mutual
129 authentication. Do not combine this flag with the B<-cell> argument. For
130 more details, see L<backup(8)>.
132 =item B<-cell> <I<cell name>>
134 Names the cell in which to run the command. Do not combine this argument
135 with the B<-localauth> flag. For more details, see L<backup(8)>.
139 Prints the online help for this command. All other valid options are
146 For every dump on a tape, the backup scantape command displays in the Tape
147 Coordinator window the dump label and the volume header of each volume in
148 the dump. If a dump spans more than one tape, the dump label does not
149 repeat at the beginning of subsequent tapes.
151 A dump label contains the following fields, which are the same as in the
152 output from the B<backup readlabel> command:
158 The permanent name assigned by using the B<-pname> argument of the
159 B<backup labeltape> command. This name remains on the tape until that
160 argument is used again, no matter how many times the tape is recycled or
161 otherwise relabeled. If the tape does not have a permanent name, the value
162 C<< <NULL> >> appears in this field.
166 A tape name in one of the following prescribed formats. The Backup System
167 automatically writes the appropriate AFS tape name to the label as part of
168 a B<backup dump> operation, or the operator can assign it with the
169 B<-name> argument to the B<backup labeltape> command.
175 I<volume_set_name>.I<dump_level_name>.I<tape_index>, if the tape contains
176 volume data. The I<volume_set_name> is the name of the volume set that was
177 dumped to create the initial dump in the dump set of which this tape is a
178 part; I<dump_level_name> is the last pathname element of the dump level at
179 which the initial dump was backed up; and I<tape_index> is the numerical
180 position of the tape in the dump set.
184 C<< <NULL> >> if the tape has no AFS tape name. This is normally the case
185 if the B<-name> argument was not included the last time the B<backup
186 labeltape> command was used on this tape, and no data has been written to
193 The date and time at which the Backup System started performing the dump
194 operation that created the initial dump.
198 The cell in which the dump set was created. This is the cell whose Backup
199 Database contains a record of the dump set.
203 The tape's capacity (in kilobytes) as recorded on the label, rather than
204 the amount of data on the tape. The value is assigned by the B<-size>
205 argument to the B<backup labeltape> command or derived from the
206 F</usr/afs/backup/tapeconfig> file on the Tape Coordinator machine, not
207 from a measurement of the tape.
211 The dump level of the initial dump in the dump set.
215 The dump ID number of the initial dump in the dump set, as recorded in the
220 The number of times a dump has been written to the tape, or it has been
225 The volume header contains the following fields:
231 The volume name, complete with a C<.backup> or C<.readonly> extension, if
236 The volume's volume ID.
240 The dump to which the volume belongs. The dump name is of the form
241 I<volume_set_name>.I<dump_level_name> and matches the name displayed in
246 The dump ID of the dump named in the C<dumpSetName> field.
250 The depth in the dump hierarchy of the dump level used in creating the
251 dump. A value of C<0> indicates a full dump. A value of C<1> or greater
252 indicates an incremental dump made at the indicated depth in the
253 hierarchy. The value reported is for the entire dump, not necessarily for
254 the volume itself; for example, it is possible for a dump performed at an
255 incremental level to include a full dump of an individual volume if the
256 volume was omitted from previous dumps.
260 The dump ID number of C<dumpSetName>'s parent dump. It is C<0> if the
261 value in the C<level> field is C<0>.
265 Is always C<0>; it is reserved for internal use.
269 The date and time at which the volume was created. For a backup or
270 read-only volume, this represents the time at which it was cloned from its
271 read/write source. For a read/write volume, it indicates the time at which
272 the Backup System locked the volume for purposes of including it in the
273 dump named in the C<dumpSetName> field.
277 The message C<Scantape: Finished> indicates the completion of the output.
279 In normal circumstances, the Backup System writes a marker to indicate
280 that a volume is the last one on a tape, or that the volume continues on
281 the next tape. However, if a backup operation terminated abnormally (for
282 example, because the operator terminated the Tape Coordinator by issuing
283 the Ctrl-C command during the operation), then there is no such
284 marker. Some very early versions of the Backup System also did not write
285 these markers. If a tape does not conclude with one of the expected
286 markers, the Tape Coordinator cannot determine if there is a subsequent
287 tape in the dump set and so generates the following message in its window:
289 Are there more tapes? (y/n)
293 The following example shows the output for the first two volumes on a tape
294 in the device with port offset 0:
299 tape name = monthly_guest
300 AFS tape name = guests.monthly.3
301 creationTime = Mon Feb 1 04:06:40 1999
303 size = 2150000 Kbytes
307 -- End of dump label --
309 volume name: user.guest10.backup
311 dumpSetName: guests.monthly
316 clonedate Mon Feb 1 03:03:23 1999
318 volume name: user.guest11.backup
320 dumpSetName: guests.monthly
325 clonedate Mon Feb 1 03:05:15 1999
327 =head1 PRIVILEGE REQUIRED
329 The issuer must be listed in the F</usr/afs/etc/UserList> file on every
330 machine where the Backup Server is running, or must be logged onto a
331 server machine as the local superuser C<root> if the B<-localauth> flag is
339 L<backup_dumpinfo(8)>,
344 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
346 This documentation is covered by the IBM Public License Version 1.0. It was
347 converted from HTML to POD by software written by Chas Williams and Russ
348 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.