1 .\" Copyright (c) 1980, 1991, 1993
2 .\" Regents of the University of California.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgment:
15 .\" This product includes software developed by the University of
16 .\" California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .\" @(#)dump.8 8.3 (Berkeley) 5/1/95
34 .\" $FreeBSD: src/sbin/dump/dump.8,v 1.27.2.18 2003/02/23 19:58:23 trhodes Exp $
42 .Nd UFS file system backup
45 .Op Fl 0123456789acknSu
61 utility examines files
63 and determines which files
66 are copied to the given disk, tape or other
67 storage medium for safe keeping (see the
69 option below for doing remote backups).
70 A dump that is larger than the output medium is broken into
72 On most media the size is determined by writing until an
73 end-of-media indication is returned.
79 On media that cannot reliably return an end-of-media indication
80 (such as some cartridge tape drives)
81 each volume is of a fixed size;
82 the actual size is determined by the tape size and density and/or
85 By default, the same output file name is used for each volume
86 after prompting the operator to change media.
88 The file system to be dumped is specified by the argument
90 as either its device-special file or its mount point
91 (if that is in a standard entry in
95 may also be invoked as
99 option syntax is implemented for backward compatibility, but
100 is not documented here.
102 The following options are supported by
107 A level 0, full backup,
108 guarantees the entire file system is copied
112 A level number above 0,
115 copy all files new or modified since the
116 last dump of any lower level.
117 The default level is 0.
120 Bypass all tape length considerations, and enforce writing
121 until an end-of-media indication is returned.
122 This fits best for most modern tape drives.
123 Use of this option is particularly
124 recommended when appending to an existing tape, or using a tape
125 drive with hardware compression (where you can never be sure about
126 the compression ratio).
128 The number of kilobytes per output volume, except that if it is
129 not an integer multiple of the output block size,
130 the command uses the next smaller such multiple.
131 This option overrides the calculation of tape size
132 based on length and density.
133 .It Fl b Ar blocksize
134 The number of kilobytes per output block, except that if it is
135 larger than 64, the command uses 64. (See the BUGS section.)
136 The default block size is 10.
138 Change the defaults for use with a cartridge tape drive, with a density
139 of 8000 bpi, and a length of 1700 feet.
140 .It Fl D Ar dumpdates
141 Specify an alternate path to the
146 .It Fl C Ar cachesize
147 Specify the cache size in megabytes. This will greatly improve performance
150 possibly not noticing changes in the filesystem between passes.
153 forks, and the actual memory use may be larger than the specified cache
154 size. The recommended cache size is between 8 and 32 (megabytes).
158 The default is 1600BPI.
163 may be a special device file
168 (a floppy disk drive),
172 (the standard output).
173 Multiple file names may be given as a single argument separated by commas.
174 Each file will be used for one dump volume in the order listed;
175 if the dump requires more volumes than the number of names given,
176 the last file name will used for all remaining volumes after prompting
178 If the name of the file is of the form
183 writes to the named file on the remote host using
185 The default path name of the remote
188 .\" rmt path, is the path on the remote host
190 this can be overridden by the environment variable
197 only for dumps at or above the given
199 The default honor level is 1,
200 so that incremental backups omit such files
201 but full backups retain them.
203 Use Kerberos authentication to talk to remote tape servers. (Only
204 available if this option was enabled when
210 requires operator attention,
211 notify all operators in the group
213 by means similar to a
216 Attempt to calculate the amount of tape needed
217 at a particular density.
218 If this amount is exceeded,
220 prompts for a new tape.
221 It is recommended to be a bit conservative on this option.
222 The default tape length is 2300 feet.
224 Display an estimate of the backup size and the number of
225 tapes required, and exit without actually performing the dump.
227 Use the specified date as the starting time for the dump
228 instead of the time determined from looking in
232 The format of date is the same as that of
234 This option is useful for automated dump scripts that wish to
235 dump over a specific period of time.
238 option is mutually exclusive from the
245 after a successful dump.
250 is readable by people, consisting of one
251 free format record per line:
257 There may be only one entry per file system at each level.
261 may be edited to change any of the fields,
263 The default path for the
269 option may be used to change it.
271 Tell the operator what file systems need to be dumped.
272 This information is gleaned from the files
280 to print out, for each file system in
284 the most recent dump date and level,
285 and highlights those file systems that should be dumped.
288 option is set, all other options are ignored, and
294 but prints only those file systems which need to be dumped.
297 Directories and regular files which have their
301 set will be omitted along with everything under such directories,
308 utility requires operator intervention on these conditions:
313 disk read error (if there are more than a threshold of 32).
314 In addition to alerting all operators implied by the
318 interacts with the operator on
320 control terminal at times when
322 can no longer proceed,
323 or if something is grossly wrong.
328 be answered by typing
334 Since making a dump involves a lot of time and effort for full dumps,
336 checkpoints itself at the start of each tape volume.
337 If writing that volume fails for some reason,
340 with operator permission,
341 restart itself from the checkpoint
342 after the old tape has been rewound and removed,
343 and a new tape has been mounted.
347 utility tells the operator what is going on at periodic intervals
348 (every 5 minutes, or promptly after receiving
350 including usually low estimates of the number of blocks to write,
351 the number of tapes it will take, the time to completion, and
352 the time to the tape change.
353 The output is verbose,
354 so that others know that the terminal
358 and will be for some time.
360 In the event of a catastrophic disk event, the time required
361 to restore all the necessary backup tapes or files to disk
362 can be kept to a minimum by staggering the incremental dumps.
363 An efficient method of staggering incremental dumps
364 to minimize the number of tapes follows:
365 .Bl -bullet -offset indent
367 Always start with a level 0 backup, for example:
368 .Bd -literal -offset indent
369 /sbin/dump -0u -f /dev/nsa0 /usr/src
372 This should be done at set intervals, say once a month or once every two months,
373 and on a set of fresh tapes that is saved forever.
375 After a level 0, dumps of active file systems are taken on a daily basis,
376 using a modified Tower of Hanoi algorithm,
377 with this sequence of dump levels:
378 .Bd -literal -offset indent
379 3 2 5 4 7 6 9 8 9 9 ...
382 For the daily dumps, it should be possible to use a fixed number of tapes
383 for each day, used on a weekly basis.
384 Each week, a level 1 dump is taken, and
385 the daily Hanoi sequence repeats beginning with 3.
386 For weekly dumps, another fixed set of tapes per dumped file system is
387 used, also on a cyclical basis.
390 After several months or so, the daily and weekly tapes should get
391 rotated out of the dump cycle and fresh tapes brought in.
393 .Bl -tag -width ".Ev TAPE"
395 Device from which to read backup.
397 Pathname of the remote
402 .Bl -tag -width /etc/dumpdates -compact
404 default tape unit to dump to
405 .It Pa /etc/dumpdates
407 (this can be changed;
412 dump table: file systems and frequency
420 Dump exits with zero status on success.
421 Startup errors are indicated with an exit code of 1;
422 abnormal termination is indicated with an exit code of 3.
435 Fewer than 32 read errors on the file system are ignored.
437 Each reel requires a new process, so parent processes for
438 reels already written just hang around until the entire tape
443 slices all requests into chunks of 64 KB.
445 impossible to use a larger output block size, so
447 will prevent this from happening.
455 options does not report file systems that have never been recorded
464 knew about the dump sequence,
465 kept track of the tapes scribbled on,
466 told the operator which tape to mount when,
467 and provided more assistance
468 for the operator running
473 utility cannot do remote backups without being run as root, due to its
475 This may be fixed in a later version of
477 Presently, it works if you set it setuid (like it used to be), but this
478 might constitute a security risk.