teach manpages about largefile's demise
[unleashed.git] / share / man / man8 / ufsdump.8
blob46d90cbf0d670f67165f585aa70b338b805e4b1a
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH UFSDUMP 8 "April 9, 2016"
8 .SH NAME
9 ufsdump \- incremental file system dump
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/ufsdump\fR [\fIoptions\fR] [\fIarguments\fR] \fIfiles_to_dump\fR
14 .fi
16 .SH DESCRIPTION
17 .LP
18 \fBufsdump\fR backs up all files specified by \fIfiles_to_dump\fR (usually
19 either a whole file system or files within a file system changed after a certain
20 date) to magnetic tape, diskette, or disk file.
21 .sp
22 .LP
23 The \fBufsdump\fR command can only be used on unmounted file systems, or those
24 mounted read-only. Attempting to dump a mounted, read-write file system might
25 result in a system disruption or the inability to restore files from the dump.
26 Consider using the \fBfssnap\fR(8) command to create a file system snapshot if
27 you need a point-in-time image of a file system that is mounted.
28 .sp
29 .LP
30 If a filesystem was mounted with the logging option, it is strongly
31 recommended that you run \fBufsdump\fR as the root user. Running the command as
32 a non-root user might result in the creation of an inconsistent dump.
33 .sp
34 .LP
35 \fIoptions\fR is a single string of one-letter \fBufsdump\fR options.
36 .sp
37 .LP
38 \fIarguments\fR may be multiple strings whose association with the options is
39 determined by order. That is, the first argument goes with the first option
40 that takes an argument; the second argument goes with the second option that
41 takes an argument, and so on.
42 .sp
43 .LP
44 \fIfiles_to_dump\fR is required and must be the last argument on the command
45 line. See \fBOPERANDS\fR for more information.
46 .sp
47 .LP
48 With most devices \fBufsdump\fR can automatically detect the end-of-media.
49 Consequently, the \fBd\fR, \fBs\fR, and \fBt\fR options are not necessary for
50 multi-volume dumps, unless \fBufsdump\fR does not understand the way the device
51 detects the end-of-media, or the files are to be restored on a system with an
52 older version of the \fBrestore\fR command.
53 .SH OPTIONS
54 .LP
55 The following options are supported:
56 .sp
57 .ne 2
58 .na
59 \fB\fB0\(mi9\fR\fR
60 .ad
61 .sp .6
62 .RS 4n
63 The "dump level." All files specified by \fIfiles_to_dump\fR that have been
64 modified since the last \fBufsdump\fR at a lower dump level are copied to the
65 \fIdump_file\fR destination (normally a magnetic tape device). For instance, if
66 a "level \fB2\fR" dump was done on Monday, followed by a "level \fB4\fR" dump
67 on Tuesday, a subsequent "level \fB3\fR" dump on Wednesday would contain all
68 files modified or added since the "level \fB2\fR" (Monday) backup. A "level
69 \fB0\fR" dump copies the entire file system to the \fIdump_file\fR.
70 .RE
72 .sp
73 .ne 2
74 .na
75 \fB\fBa\fR \fIarchive_file\fR\fR
76 .ad
77 .sp .6
78 .RS 4n
79 Archive file. Archive a dump table-of-contents in the specified
80 \fIarchive_file\fR to be used by \fBufsrestore\fR(8) to determine whether a
81 file is in the dump file that is being restored.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fBb\fR \fIfactor\fR\fR
88 .ad
89 .sp .6
90 .RS 4n
91 Blocking factor. Specify the blocking factor for tape writes. The default is 20
92 blocks per write for tapes of density less than 6250BPI (bytes-per-inch). The
93 default blocking factor for tapes of density 6250BPI and greater is 64. The
94 default blocking factor for cartridge tapes (\fBc\fR option) is 126. The
95 highest blocking factor available with most tape drives is 126. Note: the
96 blocking factor is specified in terms of 512-byte blocks, for compatibility
97 with \fBtar\fR(1).
98 .RE
101 .ne 2
103 \fB\fBc\fR\fR
105 .sp .6
106 .RS 4n
107 Cartridge. Set the defaults for cartridge instead of the standard half-inch
108 reel. This sets the density to 1000BPI and the blocking factor to 126. Since
109 \fBufsdump\fR can automatically detect the end-of-media, only the blocking
110 parameter normally has an effect. When cartridge tapes are used, and this
111 option is \fInot\fR specified, \fBufsdump\fR will slightly miscompute the size
112 of the tape. If the \fBb\fR, \fBd\fR, \fBs\fR or \fBt\fR options are specified
113 with this option, their values will override the defaults set by this option.
117 .ne 2
119 \fB\fBd\fR \fIbpi\fR\fR
121 .sp .6
122 .RS 4n
123 Tape density. Not normally required, as \fBufsdump\fR can detect end-of-media.
124 This parameter can be used to keep a running tab on the amount of tape used per
125 reel. The default density is 6250BPI except when the \fBc\fR option is used for
126 cartridge tape, in which case it is assumed to be 1000BPI per track. Typical
127 values for tape devices are:
129 .ne 2
131 \fB1/2 inch tape\fR
133 .sp .6
134 .RS 4n
135 6250 BPI
139 .ne 2
141 \fB1/4 inch cartridge\fR
143 .sp .6
144 .RS 4n
145 1000 BPI The tape densities and other options are documented in the
146 \fBst\fR(7D) man page.
152 .ne 2
154 \fB\fBD\fR\fR
156 .sp .6
157 .RS 4n
158 Diskette. Dump to diskette.
162 .ne 2
164 \fB\fBf\fR \fIdump_file\fR\fR
166 .sp .6
167 .RS 4n
168 Dump file. Use \fIdump_file\fR as the file to dump to, instead of
169 \fB/dev/rmt/0\fR. If \fIdump_file\fR is specified as \fB\(mi\fR, dump to
170 standard output.
173 .ne 2
175 \fB\fBl\fR\fR
177 .sp .6
178 .RS 4n
179 Autoload. When the end-of-tape is reached before the dump is complete, take the
180 drive offline and wait up to two minutes for the tape drive to be ready again.
181 This gives autoloading (stackloader) tape drives a chance to load a new tape.
182 If the drive is ready within two minutes, continue. If it is not, prompt for
183 another tape and wait.
187 .ne 2
189 \fB\fBL\fR \fIstring\fR\fR
191 .sp .6
192 .RS 4n
193 Sets the tape label to \fIstring\fR, instead of the default \fBnone\fR.
194 \fIstring\fR may be no more than sixteen characters long. If it is longer, it
195 is truncated and a warning printed; the dump will still be done. The tape label
196 is specific to the \fBufsdump\fR tape format, and bears no resemblance to
197 \fBIBM\fR or \fBANSI\fR-standard tape labels.
201 .ne 2
203 \fB\fBn\fR\fR
205 .sp .6
206 .RS 4n
207 Notify all operators in the \fBsys\fR group that \fBufsdump\fR requires
208 attention by sending messages to their terminals, in a manner similar to that
209 used by the \fBwall\fR(8) command. Otherwise, such messages are sent only to
210 the terminals (such as the console) on which the user running \fBufsdump\fR is
211 logged in.
215 .ne 2
217 \fB\fBN\fR \fIdevice_name\fR\fR
219 .sp .6
220 .RS 4n
221 Use \fIdevice_name\fR when recording information in \fB/etc/dumpdates\fR (see
222 the \fBu\fR option) and when comparing against information in
223 \fB/etc/dumpdates\fR for incremental dumps. The \fIdevice_name\fR provided can
224 contain no white space as defined in \fBscanf\fR(3C) and is case-sensitive.
228 .ne 2
230 \fB\fBo\fR\fR
232 .sp .6
233 .RS 4n
234 Offline. Take the drive offline when the dump is complete or the end-of-media
235 is reached and rewind the tape, or eject the diskette. In the case of some
236 autoloading 8mm drives, the tape is removed from the drive automatically. This
237 prevents another process which rushes in to use the drive, from inadvertently
238 overwriting the media.
242 .ne 2
244 \fB\fBs\fR \fIsize\fR\fR
246 .sp .6
247 .RS 4n
248 Specify the \fIsize\fR of the volume being dumped to. Not normally required, as
249 \fBufsdump\fR can detect end-of-media. When the specified size is reached,
250 \fBufsdump\fR waits for you to change the volume. \fBufsdump\fR interprets the
251 specified size as the length in feet for tapes and cartridges, and as the
252 number of 1024-byte blocks for diskettes. The values should be a little smaller
253 than the actual physical size of the media (for example, 425 for a 450-foot
254 cartridge). Typical values for tape devices depend on the \fBc\fR option, for
255 cartridge devices, and the \fBD\fR option for diskettes:
257 .ne 2
259 \fB1/2 inch tape\fR
261 .sp .6
262 .RS 4n
263 2300 feet
267 .ne 2
269 \fB60-Mbyte 1/4 inch cartridge\fR
271 .sp .6
272 .RS 4n
273 425 feet
277 .ne 2
279 \fB150-Mbyte 1/4 inch cartridge\fR
281 .sp .6
282 .RS 4n
283 700 feet
287 .ne 2
289 \fBdiskette\fR
291 .sp .6
292 .RS 4n
293 1422 blocks (Corresponds to a 1.44-Mbyte diskette, with one cylinder reserved
294 for bad block information.)
300 .ne 2
302 \fB\fBS\fR\fR
304 .sp .6
305 .RS 4n
306 Size estimate. Determine the amount of space that is needed to perform the dump
307 without actually doing it, and display the estimated number of bytes it will
308 take. This is useful with incremental dumps to determine how many volumes of
309 media will be needed.
313 .ne 2
315 \fB\fBt\fR \fItracks\fR\fR
317 .sp .6
318 .RS 4n
319 Specify the number of tracks for a cartridge tape. Not normally required, as
320 \fBufsdump\fR can detect end-of-media. The default is 9 tracks. The \fBt\fR
321 option is not compatible with the \fBD\fR option. Values for Sun-supported tape
322 devices are:
324 .ne 2
326 \fB60-Mbyte 1/4 inch cartridge\fR
328 .sp .6
329 .RS 4n
330 9 tracks
334 .ne 2
336 \fB150-Mbyte 1/4 inch cartridge\fR
338 .sp .6
339 .RS 4n
340 18 tracks
346 .ne 2
348 \fB\fBT\fR \fItime_wait\fR\fB[hms]\fR\fR
350 .sp .6
351 .RS 4n
352 Sets the amount of time to wait for an \fBautoload\fR command to complete. This
353 option is ignored unless the \fBl\fR option has also been specified. The
354 default time period to wait is two minutes. Specify time units with a trailing
355 \fBh\fR ( for hours), \fBm\fR (for minutes), or \fBs\fR (for seconds). The
356 default unit is minutes.
360 .ne 2
362 \fB\fBu\fR\fR
364 .sp .6
365 .RS 4n
366 Update the dump record. Add an entry to the file \fB/etc/dumpdates,\fR for each
367 file system successfully dumped that includes the file system name (or
368 \fIdevice_name\fR as specified with the \fBN\fR option), date, and dump level.
372 .ne 2
374 \fB\fBv\fR\fR
376 .sp .6
377 .RS 4n
378 Verify. After each tape or diskette is written, verify the contents of the
379 media against the source file system. If any discrepancies occur, prompt for
380 new media, then repeat the dump/verification process. The file system
381 \fImust\fR be unmounted. This option cannot be used to verify a dump to
382 standard output.
386 .ne 2
388 \fB\fBw\fR\fR
390 .sp .6
391 .RS 4n
392 Warning. List the file systems that have not been backed up within a day. This
393 information is gleaned from the files \fB/etc/dumpdates\fR and
394 \fB/etc/vfstab\fR. When the \fBw\fR option is used, all other options are
395 ignored. After reporting, \fBufsdump\fR exits immediately.
399 .ne 2
401 \fB\fBW\fR\fR
403 .sp .6
404 .RS 4n
405 Warning with highlight. Similar to the \fBw\fR option, except that the \fBW\fR
406 option includes all file systems that appear in \fB/etc/dumpdates\fR, along
407 with information about their most recent dump dates and levels. File systems
408 that have not been backed up within a day are highlighted.
411 .SH OPERANDS
413 The following operand is supported:
415 .ne 2
417 \fB\fIfiles_to_dump\fR\fR
419 .sp .6
420 .RS 4n
421 Specifies the files to dump. Usually it identifies a whole file system by its
422 raw device name (for example, \fB/dev/rdsk/c0t3d0s6\fR). Incremental dumps
423 (levels \fB1\fR to \fB9\fR) of files changed after a certain date only apply to
424 a whole file system. Alternatively, \fIfiles_to_dump\fR can identify individual
425 files or directories. All named directories that may be examined by the user
426 running \fBufsdump\fR, as well as any explicitly-named files, are dumped. This
427 dump is equivalent to a level \fB0\fR dump of the indicated portions of the
428 filesystem, except that \fB/etc/dumpdates\fR is not updated even if the
429 \fB-u\fR option has been specified. In all cases, the files must be contained
430 in the same file system, and the file system must be local to the system where
431 \fBufsdump\fR is being run.
433 \fIfiles_to_dump\fR is required and must be the last argument on the command
434 line.
439 If no \fIoptions\fR are given, the default is \fB9uf\fR \fB/dev/rmt/0\fR
440 \fIfiles_to_dump\fR.
441 .SH EXAMPLES
443 \fBExample 1 \fRUsing \fBufsdump\fR
446 The following command makes a full dump of a root file system on \fBc0t3d0\fR,
447 on a 150-MByte cartridge tape unit \fB0\fR:
450 .in +2
452 example# ufsdump 0cfu /dev/rmt/0 /dev/rdsk/c0t3d0s0
454 .in -2
459 The following command makes and verifies an incremental dump at level \fB5\fR
460 of the \fBusr\fR partition of \fBc0t3d0\fR, on a 1/2 inch reel tape unit
461 \fB1,\fR:
464 .in +2
466 example# ufsdump 5fuv /dev/rmt/1 /dev/rdsk/c0t3d0s6
468 .in -2
471 .SH EXIT STATUS
473 While running, \fBufsdump\fR emits many verbose messages. \fBufsdump\fR returns
474 the following exit values:
476 .ne 2
478 \fB\fB0\fR\fR
480 .sp .6
481 .RS 4n
482 Normal exit.
486 .ne 2
488 \fB\fB1\fR\fR
490 .sp .6
491 .RS 4n
492 Startup errors encountered.
496 .ne 2
498 \fB\fB3\fR\fR
500 .sp .6
501 .RS 4n
502 Abort \(mi no checkpoint attempted.
505 .SH FILES
506 .ne 2
508 \fB\fB/dev/rmt/0\fR\fR
510 .sp .6
511 .RS 4n
512 default unit to dump to
516 .ne 2
518 \fB\fB/etc/dumpdates\fR\fR
520 .sp .6
521 .RS 4n
522 dump date record
526 .ne 2
528 \fB\fB/etc/group\fR\fR
530 .sp .6
531 .RS 4n
532 to find group \fBsys\fR
536 .ne 2
538 \fB\fB/etc/vfstab\fR\fR
540 .sp .6
541 .RS 4n
542 list of file systems
545 .SH SEE ALSO
547 \fBcpio\fR(1), \fBtar\fR(1), \fBdd\fR(8), \fBdevnm\fR(8), \fBfssnap\fR(8),
548 \fBprtvtoc\fR(8), \fBrmt\fR(8), \fBshutdown\fR(8), \fBufsrestore\fR(8),
549 \fBvolcopy\fR(8), \fBwall\fR(8), \fBscanf\fR(3C), \fBufsdump\fR(4),
550 \fBattributes\fR(5), \fBst\fR(7D)
551 .SH NOTES
552 .SS "Read Errors"
554 Fewer than 32 read errors on the file system are ignored.
555 .SS "Process Per Reel"
557 Because each reel requires a new process, parent processes for reels that are
558 already written hang around until the entire tape is written.
559 .SS "Operator Intervention"
561 \fBufsdump\fR requires operator intervention on these conditions: end of
562 volume, end of dump, volume write error, volume open error or disk read error
563 (if there are more than a threshold of 32). In addition to alerting all
564 operators implied by the \fBn\fR option, \fBufsdump\fR interacts with the
565 operator on \fBufsdump\fR's control terminal at times when \fBufsdump\fR can no
566 longer proceed, or if something is grossly wrong. All questions \fBufsdump\fR
567 poses \fImust\fR be answered by typing \fByes\fR or \fBno\fR, as appropriate.
570 Since backing up a disk can involve a lot of time and effort, \fBufsdump\fR
571 checkpoints at the start of each volume. If writing that volume fails for some
572 reason, \fBufsdump\fR will, with operator permission, restart itself from the
573 checkpoint after a defective volume has been replaced.
574 .SS "Suggested Dump Schedule"
576 It is vital to perform full, "level \fB0\fR", dumps at regular intervals. When
577 performing a full dump, bring the machine down to single-user mode using
578 \fBshutdown\fR(8). While preparing for a full dump, it is a good idea to clean
579 the tape drive and heads. Incremental dumps should be performed with the system
580 running in single-user mode.
583 Incremental dumps allow for convenient backup and recovery of active files on a
584 more frequent basis, with a minimum of media and time. However, there are some
585 tradeoffs. First, the interval between backups should be kept to a minimum
586 (once a day at least). To guard against data loss as a result of a media
587 failure (a rare, but possible occurrence), capture active files on (at least)
588 two sets of dump volumes. Another consideration is the desire to keep
589 unnecessary duplication of files to a minimum to save both operator time and
590 media storage. A third consideration is the ease with which a particular
591 backed-up version of a file can be located and restored. The following
592 four-week schedule offers a reasonable tradeoff between these goals.
594 .in +2
596               Sun    Mon    Tue    Wed    Thu    Fri
597     Week 1:   Full    5      5      5      5      3
598     Week 2:           5      5      5      5      3
599     Week 3:           5      5      5      5      3
600     Week 4:           5      5      5      5      3
602 .in -2
607 Although the Tuesday through Friday incrementals contain "extra copies" of
608 files from Monday, this scheme assures that any file modified during the week
609 can be recovered from the previous day's incremental dump.
610 .SS "Process Priority of ufsdump"
612 \fBufsdump\fR uses multiple processes to allow it to read from the disk and
613 write to the media concurrently. Due to the way it synchronizes between these
614 processes, any attempt to run dump with a \fBnice\fR (process priority) of
615 `\(mi5' or better will likely make \fBufsdump\fR run \fIslower\fR instead of
616 faster.
617 .SS "Overlapping Partitions"
619 Most disks contain one or more overlapping slices because slice 2 covers the
620 entire disk. The other slices are of various sizes and usually do not overlap.
621 For example, a common configuration places \fBroot\fR on slice 0, \fBswap\fR on
622 slice 1, \fB/opt\fR on slice 5 and \fB/usr\fR on slice 6.
625 It should be emphasized that \fBufsdump\fR dumps one \fBufs\fR file system at a
626 time. Given the above scenario where slice 0 and slice 2 have the same starting
627 offset, executing \fBufsdump\fR on slice 2 with the intent of dumping the
628 entire disk would instead dump only the \fBroot\fR file system on slice 0. To
629 dump the entire disk, the user must dump the file systems on each slice
630 separately.
631 .SH BUGS
633 The \fB/etc/vfstab\fR file does not allow the desired frequency of backup for
634 file systems to be specified (as \fB/etc/fstab\fR did). Consequently, the
635 \fBw\fR and \fBW\fR options assume file systems should be backed up daily,
636 which limits the usefulness of these options.