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
60 is an alternate name for
66 option syntax is implemented for backward compatibility, but
67 is not documented here.)
71 utility examines files
73 and determines which files
76 are copied to the given disk, tape or other
77 storage medium for safe keeping (see the
79 option below for doing remote backups).
80 A dump that is larger than the output medium is broken into
82 On most media the size is determined by writing until an
83 end-of-media indication is returned.
89 On media that cannot reliably return an end-of-media indication
90 (such as some cartridge tape drives)
91 each volume is of a fixed size;
92 the actual size is determined by the tape size and density and/or
95 By default, the same output file name is used for each volume
96 after prompting the operator to change media.
98 The file system to be dumped is specified by the argument
100 as either its device-special file or its mount point
101 (if that is in a standard entry in
104 The following options are supported by
109 A level 0, full backup,
110 guarantees the entire file system is copied
114 A level number above 0,
117 copy all files new or modified since the
118 last dump of any lower level.
119 The default level is 0.
122 Bypass all tape length considerations, and enforce writing
123 until an end-of-media indication is returned.
124 This fits best for most modern tape drives.
125 Use of this option is particularly
126 recommended when appending to an existing tape, or using a tape
127 drive with hardware compression (where you can never be sure about
128 the compression ratio).
130 The number of kilobytes per output volume, except that if it is
131 not an integer multiple of the output block size,
132 the command uses the next smaller such multiple.
133 This option overrides the calculation of tape size
134 based on length and density.
135 .It Fl b Ar blocksize
136 The number of kilobytes per output block, except that if it is
137 larger than 64, the command uses 64. (See the BUGS section.)
138 The default block size is 10.
140 Change the defaults for use with a cartridge tape drive, with a density
141 of 8000 bpi, and a length of 1700 feet.
142 .It Fl D Ar dumpdates
143 Specify an alternate path to the
148 .It Fl C Ar cachesize
149 Specify the cache size in megabytes. This will greatly improve performance
152 possibly not noticing changes in the filesystem between passes.
155 forks, and the actual memory use may be larger than the specified cache
156 size. The recommended cache size is between 8 and 32 (megabytes).
160 The default is 1600BPI.
165 may be a special device file
170 (a floppy disk drive),
174 (the standard output).
175 Multiple file names may be given as a single argument separated by commas.
176 Each file will be used for one dump volume in the order listed;
177 if the dump requires more volumes than the number of names given,
178 the last file name will used for all remaining volumes after prompting
180 If the name of the file is of the form
185 writes to the named file on the remote host using
187 The default path name of the remote
190 .\" rmt path, is the path on the remote host
192 this can be overridden by the environment variable
199 only for dumps at or above the given
201 The default honor level is 1,
202 so that incremental backups omit such files
203 but full backups retain them.
205 Use Kerberos authentication to talk to remote tape servers. (Only
206 available if this option was enabled when
212 requires operator attention,
213 notify all operators in the group
215 by means similar to a
218 Attempt to calculate the amount of tape needed
219 at a particular density.
220 If this amount is exceeded,
222 prompts for a new tape.
223 It is recommended to be a bit conservative on this option.
224 The default tape length is 2300 feet.
226 Display an estimate of the backup size and the number of
227 tapes required, and exit without actually performing the dump.
229 Use the specified date as the starting time for the dump
230 instead of the time determined from looking in
234 The format of date is the same as that of
236 This option is useful for automated dump scripts that wish to
237 dump over a specific period of time.
240 option is mutually exclusive from the
247 after a successful dump.
252 is readable by people, consisting of one
253 free format record per line:
259 There may be only one entry per file system at each level.
263 may be edited to change any of the fields,
265 The default path for the
271 option may be used to change it.
273 Tell the operator what file systems need to be dumped.
274 This information is gleaned from the files
282 to print out, for each file system in
286 the most recent dump date and level,
287 and highlights those file systems that should be dumped.
290 option is set, all other options are ignored, and
296 but prints only those file systems which need to be dumped.
299 Directories and regular files which have their
303 set will be omitted along with everything under such directories,
310 utility requires operator intervention on these conditions:
315 disk read error (if there are more than a threshold of 32).
316 In addition to alerting all operators implied by the
320 interacts with the operator on
322 control terminal at times when
324 can no longer proceed,
325 or if something is grossly wrong.
330 be answered by typing
336 Since making a dump involves a lot of time and effort for full dumps,
338 checkpoints itself at the start of each tape volume.
339 If writing that volume fails for some reason,
342 with operator permission,
343 restart itself from the checkpoint
344 after the old tape has been rewound and removed,
345 and a new tape has been mounted.
349 utility tells the operator what is going on at periodic intervals
350 (every 5 minutes, or promptly after receiving
352 including usually low estimates of the number of blocks to write,
353 the number of tapes it will take, the time to completion, and
354 the time to the tape change.
355 The output is verbose,
356 so that others know that the terminal
360 and will be for some time.
362 In the event of a catastrophic disk event, the time required
363 to restore all the necessary backup tapes or files to disk
364 can be kept to a minimum by staggering the incremental dumps.
365 An efficient method of staggering incremental dumps
366 to minimize the number of tapes follows:
367 .Bl -bullet -offset indent
369 Always start with a level 0 backup, for example:
370 .Bd -literal -offset indent
371 /sbin/dump -0u -f /dev/nsa0 /usr/src
374 This should be done at set intervals, say once a month or once every two months,
375 and on a set of fresh tapes that is saved forever.
377 After a level 0, dumps of active file systems are taken on a daily basis,
378 using a modified Tower of Hanoi algorithm,
379 with this sequence of dump levels:
380 .Bd -literal -offset indent
381 3 2 5 4 7 6 9 8 9 9 ...
384 For the daily dumps, it should be possible to use a fixed number of tapes
385 for each day, used on a weekly basis.
386 Each week, a level 1 dump is taken, and
387 the daily Hanoi sequence repeats beginning with 3.
388 For weekly dumps, another fixed set of tapes per dumped file system is
389 used, also on a cyclical basis.
392 After several months or so, the daily and weekly tapes should get
393 rotated out of the dump cycle and fresh tapes brought in.
395 .Bl -tag -width ".Ev TAPE"
397 Device from which to read backup.
399 Pathname of the remote
404 .Bl -tag -width /etc/dumpdates -compact
406 default tape unit to dump to
407 .It Pa /etc/dumpdates
409 (this can be changed;
414 dump table: file systems and frequency
422 Dump exits with zero status on success.
423 Startup errors are indicated with an exit code of 1;
424 abnormal termination is indicated with an exit code of 3.
437 Fewer than 32 read errors on the file system are ignored.
439 Each reel requires a new process, so parent processes for
440 reels already written just hang around until the entire tape
445 slices all requests into chunks of 64 KB.
447 impossible to use a larger output block size, so
449 will prevent this from happening.
457 options does not report file systems that have never been recorded
466 knew about the dump sequence,
467 kept track of the tapes scribbled on,
468 told the operator which tape to mount when,
469 and provided more assistance
470 for the operator running
475 utility cannot do remote backups without being run as root, due to its
477 This may be fixed in a later version of
479 Presently, it works if you set it setuid (like it used to be), but this
480 might constitute a security risk.