auth: fix cellservdb update check
[openafs.git] / doc / man-pages / pod8 / backup_dump.pod
1 =head1 NAME
2
3 backup_dump - Creates a dump (dumps a volume set at a particular dump level)
4
5 =head1 SYNOPSIS
6
7 =for html
8 <div class="synopsis">
9
10 B<backup dump> S<<< [B<-volumeset> <I<volume set name>>] >>>
11     S<<< [B<-dump> <I<dump level name>>] >>> 
12     S<<< [B<-portoffset> <I<TC port offset>>] >>>
13     S<<< [B<-at> <I<date/time to start dump>>+] >>>
14     [B<-append>] [B<-n>]
15     S<<< [B<-file> <I<load file>>] >>> [B<-localauth>] 
16     S<<< [B<-cell> <I<cell name>>] >>> [B<-help>]
17
18 B<backup dump> S<<< [B<-v> <I<volume set name>>] >>>
19     S<<< [B<-d> <I<dump level name>>] >>>
20     S<<< [B<-p> <I<TC port offset>>] >>>
21     S<<< [B<-at> <I<Date/time to start dump>>+] >>> [B<-ap>] [B<-n>]
22     S<<< [B<-f> <I<load file>>] >>> [B<-l>] S<<< [B<-c> <I<cell name>>] >>>
23     [B<-h>]
24
25 =for html
26 </div>
27
28 =head1 DESCRIPTION
29
30 The B<backup dump> command either dumps the volume set specified by the
31 B<-volumeset> argument at the dump level specified by the B<-dump>
32 argument and creates a Backup Database dump record about it, or executes
33 the dump instructions listed in the file named by the B<-file>
34 argument. The Tape Coordinator indicated by the B<-portoffset> argument
35 (or on each command in the file) executes the operation.
36
37 (If the C<FILE YES> instruction appears in the
38 F</usr/afs/backup/CFG_I<device_name>> file on the Tape Coordinator machine
39 associated with the specified port offset, then the Backup System dumps
40 data to the backup data file listed for that port offset in the Tape
41 Coordinator's F</usr/afs/backup/tapeconfig> file, rather than to tape. For
42 the sake of clarity, the following text refers to tapes only, but the
43 Backup System handles backup data files in much the same way.)
44
45 The term I<dumping> refers to copying a collection of data to tape or a
46 backup data file, and the resulting collection is termed a I<dump>. The
47 set of tapes that contain one or more dumps is called a I<dump set>. The
48 first dump in a dump set is its I<initial dump>, and any dumps
49 subsequently added to the dump set (by use of the B<-append> argument) are
50 I<appended dumps>.  Creating appended dumps is optional, and appended
51 dumps can be of different volume sets, and at different dump levels, than
52 the initial dump.
53
54 A I<full dump>, created at a full dump level in the dump hierarchy,
55 contains all of the data that existed at the time of the dump in the
56 volumes belonging to the volume set. An I<incremental dump>, created at an
57 incremental dump level, contains only data that has changed since the
58 volume set was dumped at the incremental level's I<parent dump level> (the
59 dump level immediately above the incremental level in the hierarchy),
60 which can be a full or incremental level. More specifically, an
61 incremental dump includes only the files and directories that have
62 modification timestamps later than the I<clone date> of the volume
63 included at the parent dump level. For backup and read-only volumes, the
64 clone date is the time at which the volume was cloned from its read/write
65 source before being included in the parent dump; for read/write volumes,
66 it represents the time at which the volume was locked for inclusion in the
67 parent dump. The clone date appears in the I<clone date> field of the
68 output from the B<backup volinfo> command. As an example, an incremental
69 dump at the C</full/week1/thursday> level includes only files and
70 directories that have changed since the volume set was dumped at the
71 C</full/week1> level.
72
73 =head2 Initiating different types of dump operations
74
75 To initiate a dump operation that is to start as soon as the relevant Tape
76 Coordinator is available, provide only the B<-volumeset>, B<-dump>,
77 B<-portoffset>, and optionally B<-append> options. To schedule a single
78 B<backup dump> command to execute in the future, also include the B<-at>
79 argument to specify the start time.
80
81 To append a dump to an existing dump set, include the B<-append> flag. The
82 Backup System imposes the following conditions on appended dumps:
83
84 =over 4
85
86 =item *
87
88 If writing to tape, the Tape Coordinator checks that it is the final one
89 in a dump set for which there are complete and valid tape and dump records
90 in the Backup Database. If not, it rejects the tape and requests an
91 acceptable one. The operator can use the B<-dbadd> argument to the
92 B<backup scantape> command to insert the necessary records into the
93 database.
94
95 =item *
96
97 The most recent dump on the tape or in the backup data file must have
98 completed successfully.
99
100 =item *
101
102 The dump set must begin with an initial dump that is recorded in the
103 Backup Database. If there are no dumps on the tape, then the Backup System
104 treats the dump operation as an initial dump and imposes the relevant
105 requirements (for example, checks the AFS tape name if appropriate).
106
107 =back
108
109 To schedule multiple dump operations, list the operations in the file
110 named by the B<-file> argument. Optionally include the B<-at> argument to
111 specify when the B<backup> command interpreter reads the file; otherwise
112 it reads it immediately. Do not combine the B<-file> argument with the
113 command's first three arguments or the B<-append> or B<-n> flags. The
114 commands in the file can include any of the B<backup dump> command's
115 arguments, including the B<-at> argument to schedule them to run even
116 later in the future.
117
118 To generate a list of the volumes included in a dump, without actually
119 dumping them, combine the B<-n> flag with the options to be used on the
120 actual command.
121
122 =head2 How the Backup System executes a dump operation
123
124 Before beginning a dump operation, the Backup System verifies that there
125 is a Backup Database entry for the volume set, dump level, and port
126 offset. If the command is correctly formed and issued in interactive mode,
127 it is assigned a job number and added to the jobs list. List jobs in
128 interactive mode by using the B<backup jobs> command; terminate them with
129 the B<backup kill> command.
130
131 After obtaining the list of volumes to dump from the Volume Location (VL)
132 Server, the Backup System sorts the list by site (server and
133 partition). It groups volumes from the same site together in the dump to
134 minimize the number of times the operator must change tapes during restore
135 operations.
136
137 The dependence of an incremental dump on its parent means that a valid
138 parent dump must already exist for the Backup System to create its child
139 incremental dump. If the Backup System does not find a record of a dump
140 created at the immediate parent dump level, it looks in the Backup
141 Database for a dump created at one level higher in the hierarchy, and so
142 on, up to the full dump level if necessary. It creates an incremental dump
143 at the level one below the lowest valid parent dump set that it finds. If
144 it fails to find even a full dump, it dumps the volume set at the full
145 dump level.
146
147 If the Backup System is unable to access a volume during a dump operation,
148 it skips the volume and dumps the remaining volumes from the volume
149 set. Possible reasons a volume is inaccessible include server machine or
150 process outages, or that the volume was moved between the time the Volume
151 Location (VL) Server generated the list of sites for the volume in the
152 volume set and the time the Backup System actually attempts to dump the
153 data in it. After the first dumping pass, the Backup System attempts to
154 dump each volume it skipped. If it still cannot dump a volume and the
155 C<ASK NO> instruction does not appear in the F<CFG_I<device_name>> file,
156 it queries the operator as to whether it needs to attempt to dump the
157 volume again, omit the volume from the dump, or halt the dump operation
158 altogether. When prompted, the operator can attempt to solve whatever
159 problem prevented the Backup System from accessing the volumes. If the
160 C<ASK NO> instruction appears in the F<CFG_I<device_name>> file, the
161 Backup System omits the volume from the dump.
162
163 Before scheduling a dump operation, the Backup System verifies that the
164 date specified by the B<-at> argument is in the future, and checks the
165 validity of the volume set, dump level and port offset as for a regular
166 dump operation. It checks the validity of the parameters again just before
167 actually running the scheduled operation.
168
169 Before writing an initial dump to a tape that does not have a permanent
170 name on the label, the Backup System checks that the AFS tape name on the
171 label is acceptable. If desired, disable name checking by including the
172 C<NAME_CHECK NO> instruction in the F<CFG_I<device_name>> file.
173
174 If AFS tape name checking is enabled, the Backup System accepts the
175 following three types of values for the AFS tape name. If the name on the
176 label does not conform, the Backup System obtains a tape with an
177 acceptable label by invoking the C<MOUNT> instruction in the
178 F<CFG_I<device_name>> file or prompting the operator.
179
180 =over 4
181
182 =item *
183
184 A name of the form I<volume_set_name.dump_level_name.tape_index>, where
185 I<volume_set_name> matches the value of the B<-volumeset> argument,
186 I<dump_level_name> matches the last element in the pathname value of the
187 B<-dump> argument, and I<tape_index> reflects the tape's place in a
188 multitape dump set. As an example, the first tape in a dump set for which
189 the initial dump is of volume set C<user> at the dump level
190 C</sunday2/monday> has AFS tape name C<user.monday.1>. If the label
191 records this type of AFS tape name, the Backup System retains the AFS tape
192 name and writes the dump to the tape.
193
194 =item *
195
196 The string C<< <NULL> >>, which usually indicates that a backup operator
197 has used the B<backup labeltape> command to write a label on the tape, but
198 did not include the B<-name> argument to assign an AFS tape
199 name. Presumably, the operator did include the B<-pname> argument to
200 assign a permanent name. If the label records a C<< <NULL> >> value, the
201 Backup System constructs and records on the label the appropriate AFS tape
202 name, and writes the dump on the tape.
203
204 =item *
205
206 No value at all, because the tape has never been labeled or used in the
207 Backup System. As when the AFS tape name is C<< <NULL> >>, the Backup
208 System constructs and records on the label the appropriate AFS tape name,
209 and writes the dump on the tape.
210
211 =back
212
213 To determine how much data it can write to a tape, the Tape Coordinator
214 reads the capacity recorded on the tape's label (placed there by including
215 the B<-size> argument to the B<backup labeltape> command). If the label's
216 capacity field is empty, the Tape Coordinator uses the capacity recorded
217 for the specified port offset in the local F<tapeconfig> file. If the
218 capacity field in the F<tapeconfig> file is also empty, the Tape
219 Coordinator uses the maximum capacity of 2 TB.
220
221 During a dump operation, the Tape Coordinator tracks how much data it has
222 written and stops shortly before it reaches what it believes is the tape's
223 capacity. If it is in the middle of writing the data for a volume when it
224 reaches that point, it writes a special marker that indicates an
225 interrupted volume and continues writing the volume on the next tape. It
226 can split a volume this way during both an initial and an appended dump,
227 and the fact that the volume resides on multiple tapes is automatically
228 recorded in the Backup Database.
229
230 If the tape is actually larger than the expected capacity, then the Tape
231 Coordinator simply does not use the excess tape. If the tape is smaller
232 than the expected capacity, the Tape Coordinator can reach the end-of-tape
233 (EOT) unexpectedly while it is writing data. If the Tape Coordinator is in
234 the middle of the writing data from a volume, it obtains a new tape and
235 rewrites the entire contents of the interrupted volume to it. The data
236 from the volume that was written to the previous tape remains there, but
237 is never used.
238
239 The Backup System allows recycling of tapes (writing a new dump set over
240 an old dump set that is no longer needed), but imposes the following
241 conditions:
242
243 =over 4
244
245 =item *
246
247 All dumps in the old dump set must be expired. The Backup System always
248 checks expiration dates, even when name checking is disabled.
249
250 =item *
251
252 If the tape to be recycled does not have a permanent name and name
253 checking is enabled, then the AFS tape name derived from the new initial
254 dump's volume set name and dump level name must match the AFS tape name
255 already recorded on the label.
256
257 =item *
258
259 The tape cannot already have data on it that belongs to the dump currently
260 being performed, because that implies that the operator or automated tape
261 device has not removed the previous tape from the drive, or has mistakenly
262 reinserted it. The Tape Coordinator generates the following message and
263 attempts to obtain another tape:
264
265    Can't overwrite tape containing the dump in progress
266
267 =item *
268
269 The tape cannot contain data from a parent dump of the current
270 (incremental) dump, because overwriting a parent dump makes it impossible
271 to restore data from the current dump. The Tape Coordinator generates the
272 following message and attempts to obtain another tape:
273
274    Can't overwrite the parent dump I<parent_name> (I<parent_dump_ID>)
275
276 =back
277
278 To recycle a tape before all dumps on it have expired or if the AFS tape
279 name is wrong, use the B<backup labeltape> command to overwrite the tape's
280 label and remove all associated tape and dump records from the Backup
281 Database.
282
283 The Tape Coordinator's default response to this command is to access the
284 first tape by invoking the C<MOUNT> instruction in the
285 F<CFG_I<device_name>> file, or by prompting the backup operator to insert
286 the tape if there is no C<MOUNT> instruction.  However, if the C<AUTOQUERY
287 NO> instruction appears in the F<CFG_I<device_name>> file, or if the
288 issuer of the B<butc> command included the B<-noautoquery> flag, the Tape
289 Coordinator instead expects the tape to be in the device already. If it is
290 not, the Tape Coordinator invokes the C<MOUNT> instruction or prompts the
291 operator. It also invokes the C<MOUNT> instruction or prompts for any
292 additional tapes needed to complete the dump operation; the issuer must
293 arrange to provide them.
294
295 =head1 CAUTIONS
296
297 If a dump operation is interrupted or fails for any reason, data from all
298 volumes written to tape before the interrupt are valid can be used in a
299 restore operation. The Backup Database includes an entry for the failed
300 dump and for each volume that was successfully dumped. See the I<OpenAFS
301 Administration Guide> for information on dealing with interrupted dumps.
302
303 If dumping to tape rather than a backup data file, it is best to use only
304 compatible tape devices (ones that can read the same type of tape).  Using
305 compatible devices greatly simplifies restore operations. The
306 B<-portoffset> argument to the B<backup diskrestore> and B<backup
307 volsetrestore> commands accepts multiple port offset numbers, but the
308 Backup System uses the first listed port offset when restoring all full
309 dumps, the second port offset when restoring all level 1 dumps, and so
310 on. At the very least, use compatible tape devices to perform dumps at
311 each level. If compatible tape devices are not used, the B<backup
312 volrestore> command must be used to restore one volume at a time.
313
314 Valid (unexpired) administrative tokens must be available to the B<backup>
315 command interpreter both when it reads the file named by the B<-file>
316 argument and when it runs each operation listed in the file. Presumably,
317 the issuer is scheduling dumps for times when no human operator is
318 present, and so must arrange for valid tokens to be available on the local
319 machine. One option is to issue all commands (or run all scripts) on file
320 server machines and use the B<-localauth> flag on the B<backup> and B<vos>
321 commands. To protect against improper access to the machine or the tokens,
322 the machine must be physically secure (perhaps even more protected than a
323 Tape Coordinator machine monitored by a human operator during
324 operation). Also, if an unattended dump requires multiple tapes, the
325 operator must properly configure a tape stacker or jukebox and the device
326 configuration file.
327
328 When the command is issued in regular (non-interactive) mode, the command
329 shell prompt does not return until the dump operation completes. To avoid
330 having to open additional connections, issue the command in interactive
331 mode, especially when including the B<-at> argument to schedule dump
332 operations.
333
334 =head1 OPTIONS
335
336 =over 4
337
338 =item B<-volumeset> <I<volume set name>>
339
340 Names the volume set to dump. The B<-dump> argument must be provided along
341 with this one; do not combine them with the B<-file> argument. If using a
342 temporary volume set, the B<vos dump> command must be issued within the
343 interactive session in which the B<backup addvolset> command was issued
344 with the B<-temporary> flag.
345
346 =item B<-dump> <I<dump level name>>
347
348 Specifies the complete pathname of the dump level at which to dump the
349 volume set. The B<-volumeset> argument must be provided along with this
350 one; do not combine them with the B<-file> argument.
351
352 =item B<-portoffset> <I<TC port offset>>
353
354 Specifies the port offset number of the Tape Coordinator handling the
355 tapes for this operation. It must be provided unless the default value of
356 0 (zero) is appropriate; do not combine it with the B<-file> argument.
357
358 =item B<-at> <I<date/time to start dump>>
359
360 Specifies the date and time in the future at which to run the command, or
361 to read the file named by the B<-file> argument. Provide a value in the
362 format I<mm/dd/yyyy> [I<hh:MM>], where the month (I<mm>), day (I<dd>), and
363 year (I<yyyy>) are required. Valid values for the year range from C<1970>
364 to C<2037>; higher values are not valid because the latest possible date
365 in the standard UNIX representation is in February 2038. The Backup System
366 automatically reduces any later date to the maximum value.
367
368 The hour and minutes (I<hh:MM>) are optional, but if provided must be in
369 24-hour format (for example, the value C<14:36> represents 2:36 p.m.). If
370 omitted, the time defaults to midnight (00:00 hours).
371
372 As an example, the value 04/23/1999 20:20 schedules the command for 8:20
373 p.m. on 23 April 1999.
374
375 =item B<-append>
376
377 Appends the dump onto the end of a tape that already contains data from
378 another dump. However, if the tape is not in fact part of an existing dump
379 set, the Backup System creates a new dump set using the parameters of this
380 dump. If the tape is not the last tape in the dump set, the Tape
381 Coordinator prompts for insertion of the appropriate tape. Do not combine
382 this argument with the B<-file> argument.
383
384 =item B<-n>
385
386 Displays the names of volumes to be included in the indicated dump,
387 without actually performing the dump operation. Do not combine this
388 argument with the B<-file> argument.
389
390 =item B<-file> <I<load file>>
391
392 Specifies the local disk or AFS pathname of a file containing B<backup>
393 commands. The Backup System reads the file immediately, or at the time
394 specified by the B<-at> argument if it is provided. A partial pathname is
395 interpreted relative to the current working directory.
396
397 Place each B<backup dump> command on its own line in the indicated file,
398 using the same syntax as for the command line, but without the word
399 B<backup> at the start of the line. Each command must include a value for
400 the B<-volumeset> and B<-dump> arguments, and for the B<-portoffset>
401 argument unless the default value of 0 is appropriate. Commands in the
402 file can also include any of the B<backup dump> command's optional
403 options. In the following example file, the first command runs as soon as
404 the Backup System reads the file, whereas the other commands are
405 themselves scheduled; the specified date and time must be later than the
406 date and time at which the Backup System reads the file.
407
408    dump user /sunday1/wednesday -port 1
409    dump sun4x_56 /sunday1/friday -port 2 -at 04/08/1999
410    dump sun4x_55 /sunday1/friday -port 2 -at 04/08/1999 02:00 -append
411
412 Do not combine this argument with the B<-volumeset>, B<-dump>,
413 B<-portoffset>, B<-append>, or B<-n> options.
414
415 =item B<-localauth>
416
417 Constructs a server ticket using a key from the local
418 F</usr/afs/etc/KeyFile> file. The B<backup> command interpreter presents
419 it to the Backup Server, Volume Server and VL Server during mutual
420 authentication. Do not combine this flag with the B<-cell> argument. For
421 more details, see L<backup(8)>.
422
423 =item B<-cell> <I<cell name>>
424
425 Names the cell in which to run the command. Do not combine this argument
426 with the B<-localauth> flag. For more details, see L<backup(8)>.
427
428 =item B<-help>
429
430 Prints the online help for this command. All other valid options are
431 ignored.
432
433 =back
434
435 =head1 OUTPUT
436
437 The command interpreter first generates a list of the volumes to be
438 included in the dump by matching the entries in the volume set against the
439 volumes listed in the Volume Location Database (VLDB). It prints the list
440 following the header:
441
442    Preparing to dump the following volumes:
443
444 The following message then indicates that the command interpreter has
445 passed the dump request to the appropriate Tape Coordinator for
446 processing:
447
448    Starting dump.
449
450 If the issuer includes the B<-n> flag, the output is of the following
451 form:
452
453    Starting dump of volume set '<volume set>' (dump set '<dump level>')
454    Total number of volumes : <number dumped>
455    Would have dumped the following volumes:
456    <list_of_volumes>
457
458 where I<list_of_volumes> identifies each volume by name and volume ID
459 number.
460
461 If the Tape Coordinator is unable to access a volume, it prints an error
462 message in its window and records the error in its log and error files.
463
464 =head1 EXAMPLES
465
466 The following command dumps the volumes in the volume set called C<user>
467 at the dump level C</full/sunday2/monday>. The issuer places the necessary
468 tapes in the device with port offset 5.
469
470    % backup dump -volumeset user -dump /full/sunday2/monday -portoffset 5
471    Preparing to dump the following volumes:
472    user.jones.backup   387623900
473    user.pat.backup     486219245
474    user.smith.backup   597315841
475           .                .
476           .                .
477    Starting dump.
478
479 The following command displays the list of volumes to be dumped when the
480 user dumps the C<sys_sun> volume set at the C</full> dump level.
481
482    % backup dump -volumeset sys_sun -dump /full -n
483    Starting dump of volume set 'sys_sun' (dump set '/full')
484    Total number of volumes: 24
485    Would have dumped the following volumes:
486    sun4x_56      124857238
487    sun4x_56.bin  124857241
488        .            .
489        .            .
490    sun4x_55      124857997
491        .            .
492        .            .
493
494 The following command schedules a dump of the volumes in the volume set
495 C<user> at the dump level C</sunday2/monday1> for 11:00 p.m. on 14 June
496 1999. The appropriate Tape Coordinator has port offset 0 (zero), so that
497 argument is omitted.
498
499    % backup dump -volumeset user -dump /sunday2/monday1 -at 06/14/1999 23:00
500
501 =head1 PRIVILEGE REQUIRED
502
503 The issuer must be listed in the F</usr/afs/etc/UserList> file on every
504 machine where the Backup Server or Volume Location (VL) Server is running,
505 and on every file server machine that houses an affected volume. If the
506 B<-localauth> flag is included, the issuer must instead be logged on to a
507 server machine as the local superuser C<root>.
508
509 =head1 SEE ALSO
510
511 L<butc(5)>,
512 L<backup(8)>,
513 L<backup_adddump(8)>,
514 L<backup_addvolentry(8)>,
515 L<backup_addvolset(8)>,
516 L<backup_diskrestore(8)>,
517 L<backup_labeltape(8)>,
518 L<backup_volrestore(8)>,
519 L<butc(8)>
520
521 =head1 COPYRIGHT
522
523 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
524
525 This documentation is covered by the IBM Public License Version 1.0.  It was
526 converted from HTML to POD by software written by Chas Williams and Russ
527 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.