1 .\" $NetBSD: dump_lfs.8,v 1.14 2006/06/24 07:57:07 wiz Exp $
3 .\" Copyright (c) 1980, 1991, 1993
4 .\" Regents of the University of California.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" @(#)dump.8 8.3 (Berkeley) 5/1/95
42 .Op Fl 0123456789aceFnStuX
59 .Op Fl k Ar read-blocksize
77 .Op Fl x Ar snap-backup
83 .in -\n[indent-synopsis]u
86 option syntax is implemented for backward compatibility, but
87 is not documented here).
90 examines files on a file system and determines which files need to
92 These files are copied to the given disk, tape or other storage
93 medium for safe keeping (see the
95 option below for doing remote backups).
96 A dump that is larger than the output medium is broken into
98 On most media the size is determined by writing until an
99 end-of-media indication is returned.
100 This can be enforced by using the
104 On media that cannot reliably return an end-of-media indication
105 (such as some cartridge tape drives) each volume is of a fixed size;
106 the actual size is determined by the tape size and density and/or
107 block count options below.
108 By default, the same output file name is used for each volume
109 after prompting the operator to change media.
112 is either a single file system,
113 or a list of files and directories on a single file system to be backed
114 up as a subset of the file system.
117 may be the device of a file system,
118 the path to a currently mounted file system,
119 the path to an unmounted file system listed in
123 is given, a file system image.
124 In the latter case, certain restrictions are placed on the backup:
126 is ignored, the only dump level that is supported is
128 and all of the files must reside on the same file system.
130 The following options are supported by
135 A level 0, full backup, guarantees the entire file system is copied
139 A level number above 0, incremental backup,
140 tells dump to copy all files new or modified since the
141 last dump of a lower level.
142 The default level is 9.
145 Bypass all tape length considerations, and enforce writing
146 until an end-of-media indication is returned.
147 This fits best for most modern tape drives.
148 Use of this option is particularly recommended when appending to an
149 existing tape, or using a tape drive with hardware compression (where
150 you can never be sure about the compression ratio).
152 The number of kilobytes per volume, rounded
153 down to a multiple of the blocksize.
154 This option overrides the calculation of tape size
155 based on length and density.
156 .It Fl b Ar blocksize
157 The number of kilobytes per dump record.
159 Modify the calculation of the default density and tape size to be more
160 appropriate for cartridge tapes.
164 The default is 1600 Bits Per Inch (BPI).
166 Eject tape automatically if a tape change is required.
170 is a file system image.
175 may be a special device file like
182 (the standard output).
183 Multiple file names may be given as a single argument separated by commas.
184 Each file will be used for one dump volume in the order listed;
185 if the dump requires more volumes than the number of names given,
186 the last file name will used for all remaining volumes after prompting
188 If the name of the file is of the form
193 writes to the named file on the remote host using
195 Note that methods more secure than
198 can be used to invoke
200 on the remote host, via the environment variable
210 only for dumps at or above the given
212 The default honor level is 1,
213 so that incremental backups omit such files
214 but full backups retain them.
215 .It Fl k Ar read-blocksize
216 The size in kilobyte of the read buffers, rounded up to a multiple of the
217 file system block size.
220 If a tape change is required, eject the tape and wait for the drive to
222 This is to be used with tape changers which automatically load
223 the next tape when the tape is ejected.
224 If after the timeout (in seconds) the drive is not ready
226 falls back to the default behavior,
227 and prompts the operator for the next tape.
229 The user-supplied text string
231 is placed into the dump header, where tools like
236 Note that this label is limited to be at most
238 (currently 16) characters, which must include the terminating
243 requires operator attention,
244 notify all operators in the group
248 .It Fl r Ar cachesize
249 Use that many buffers for read cache operations.
250 A value of zero disables the read cache altogether, higher values
251 improve read performance by reading larger data blocks from the
252 disk and maintaining them in an LRU cache.
255 option for the size of the buffers.
256 Maximum is 512, the size of the cache is
257 limited to 15% of the avail RAM by default.
259 Attempt to calculate the amount of tape needed
260 at a particular density.
261 If this amount is exceeded,
263 prompts for a new tape.
264 It is recommended to be a bit conservative on this option.
265 The default tape length is 2300 feet.
267 Display an estimate of the backup size and the number of tapes
268 required, and exit without actually performing the dump.
270 All informational log messages printed by
272 will have the time prepended to them.
273 Also, the completion time interval estimations
274 will have the estimated time at which the dump
275 will complete printed at the end of the line.
277 Use the specified date as the starting time for the dump
278 instead of the time determined from looking in
280 The format of date is the same as that of
282 This option is useful for automated dump scripts that wish to
283 dump over a specific period of time.
286 option is mutually exclusive from the
292 after a successful dump.
295 is readable by people, consisting of one
296 free format record per line:
302 There may be only one entry per file system at each level.
305 may be edited to change any of the fields,
307 If a list of files or subdirectories is being dumped
308 (as opposed to an entire file system), then
312 Prevent the log from wrapping until the dump completes, guaranteeing
314 Processes that write to the filesystem will continue as usual
315 until the entire log is full, after which they will block
316 until the dump is complete.
317 This functionality is analogous to what
319 provides for other file systems.
322 flag is provided for compatibility with
324 it functions exactly as the
326 flag does (its argument is ignored).
329 tells the operator what file systems need to be dumped.
330 This information is gleaned from the files
338 to print out, for each file system in
340 the most recent dump date and level,
341 and highlights those file systems that should be dumped.
344 option is set, all other options are ignored, and
348 Is like W, but prints only those file systems which need to be dumped.
359 flag will not be backed up.
360 If a directory has the
362 flag, this directory and any file or directory under it will not be backed up.
365 requires operator intervention on these conditions:
370 disk read error (if there are more than a threshold of 32).
371 In addition to alerting all operators implied by the
375 interacts with the operator on
377 control terminal at times when
379 can no longer proceed,
380 or if something is grossly wrong.
385 be answered by typing
391 Since making a dump involves a lot of time and effort for full dumps,
393 checkpoints itself at the start of each tape volume.
394 If writing that volume fails for some reason,
397 with operator permission,
398 restart itself from the checkpoint
399 after the old tape has been rewound and removed,
400 and a new tape has been mounted.
403 tells the operator what is going on at periodic intervals,
404 including usually low estimates of the number of blocks to write,
405 the number of tapes it will take, the time to completion, and
406 the time to the tape change.
407 The output is verbose,
408 so that others know that the terminal
412 and will be for some time.
414 In the event of a catastrophic disk event, the time required
415 to restore all the necessary backup tapes or files to disk
416 can be kept to a minimum by staggering the incremental dumps.
417 An efficient method of staggering incremental dumps
418 to minimize the number of tapes follows:
419 .Bl -bullet -offset indent
421 Always start with a level 0 backup, for example:
422 .Bd -literal -offset indent
423 /sbin/dump -0u -f /dev/nrst1 /usr/src
426 This should be done at set intervals, say once a month or once every two months,
427 and on a set of fresh tapes that is saved forever.
429 After a level 0, dumps of active file
430 systems are taken on a daily basis,
431 using a modified Tower of Hanoi algorithm,
432 with this sequence of dump levels:
433 .Bd -literal -offset indent
434 3 2 5 4 7 6 9 8 9 9 ...
437 For the daily dumps, it should be possible to use a fixed number of tapes
438 for each day, used on a weekly basis.
439 Each week, a level 1 dump is taken, and
440 the daily Hanoi sequence repeats beginning with 3.
441 For weekly dumps, another fixed set of tapes per dumped file system is
442 used, also on a cyclical basis.
445 After several months or so, the daily and weekly tapes should get
446 rotated out of the dump cycle and fresh tapes brought in.
457 whilst a backup is in progress, statistics on the amount completed,
458 current transfer rate, and estimated finished time, will be written
459 to the standard error output.
461 If the following environment variables exist, they are used by
465 If no -f option was specified,
467 will use the device specified via
475 .Qq user@host:tapename .
484 on the remote machine.
486 can be used to control the format of the timestamps produced by the
490 is a string containing embedded formatting commands for
492 The total formatted string is limited to about 80 characters, if this
493 limit is exceeded then
495 ERROR: TIMEFORMAT too long, reverting to default
497 will be printed and the time format will revert to the default one.
500 is not set then the format string defaults to
506 .Bl -tag -width /etc/dumpdates -compact
508 default tape unit to use.
512 .Pa /usr/include/paths.h .
514 raw SCSI tape interface
515 .It Pa /etc/dumpdates
518 dump table: file systems and frequency
527 exits with zero status on success.
528 Startup errors are indicated with an exit code of 1;
529 abnormal termination is indicated with an exit code of 3.
548 Fewer than 32 read errors on the file system are ignored.
550 Each reel requires a new process, so parent processes for
551 reels already written just hang around until the entire tape
559 options does not report file systems that have never been recorded
565 When dumping a list of files or subdirectories, access privileges are
566 required to scan the directory (as this is done via the
568 routines rather than directly accessing the file system).
572 knew about the dump sequence,
573 kept track of the tapes scribbled on,
574 told the operator which tape to mount when,
575 and provided more assistance
576 for the operator running