UFSDUMP(8) | Maintenance Commands and Procedures | UFSDUMP(8) |
ufsdump - incremental file system dump
/usr/sbin/ufsdump [options] [arguments] files_to_dump
ufsdump backs up all files specified by files_to_dump (usually either a whole file system or files within a file system changed after a certain date) to magnetic tape, diskette, or disk file.
The ufsdump command can only be used on unmounted file systems, or those mounted read-only. Attempting to dump a mounted, read-write file system might result in a system disruption or the inability to restore files from the dump. Consider using the fssnap(8) command to create a file system snapshot if you need a point-in-time image of a file system that is mounted.
If a filesystem was mounted with the logging option, it is strongly recommended that you run ufsdump as the root user. Running the command as a non-root user might result in the creation of an inconsistent dump.
options is a single string of one-letter ufsdump options.
arguments may be multiple strings whose association with the options is determined by order. That is, the first argument goes with the first option that takes an argument; the second argument goes with the second option that takes an argument, and so on.
files_to_dump is required and must be the last argument on the command line. See OPERANDS for more information.
With most devices ufsdump can automatically detect the end-of-media. Consequently, the d, s, and t options are not necessary for multi-volume dumps, unless ufsdump does not understand the way the device detects the end-of-media, or the files are to be restored on a system with an older version of the restore command.
The following options are supported:
0−9
a archive_file
b factor
c
d bpi
1/2 inch tape
1/4 inch cartridge
D
f dump_file
If the name of the file is of the form machine:device, the dump is done from the specified machine over the network using rmt(8). Since ufsdump is normally run by root, the name of the local machine must appear in the /.rhosts file of the remote machine. If the file is specified as user@machine:device, ufsdump will attempt to execute as the specified user on the remote machine. The specified user must have a .rhosts file on the remote machine that allows the user invoking the command from the local machine to access the remote machine.
l
L string
n
N device_name
o
s size
1/2 inch tape
60-Mbyte 1/4 inch cartridge
150-Mbyte 1/4 inch cartridge
diskette
S
t tracks
60-Mbyte 1/4 inch cartridge
150-Mbyte 1/4 inch cartridge
T time_wait[hms]
u
v
w
W
The following operand is supported:
files_to_dump
files_to_dump is required and must be the last argument on the command line.
If no options are given, the default is 9uf /dev/rmt/0 files_to_dump.
See largefile(7) for the description of the behavior of ufsdump when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
Example 1 Using ufsdump
The following command makes a full dump of a root file system on c0t3d0, on a 150-MByte cartridge tape unit 0:
example# ufsdump 0cfu /dev/rmt/0 /dev/rdsk/c0t3d0s0
The following command makes and verifies an incremental dump at level 5 of the usr partition of c0t3d0, on a 1/2 inch reel tape unit 1,:
example# ufsdump 5fuv /dev/rmt/1 /dev/rdsk/c0t3d0s6
While running, ufsdump emits many verbose messages. ufsdump returns the following exit values:
0
1
3
/dev/rmt/0
/etc/dumpdates
/etc/group
/etc/hosts
/etc/vfstab
cpio(1), tar(1), scanf(3C), st(4D), ufsdump(5), attributes(7), largefile(7), dd(8), devnm(8), fssnap(8), prtvtoc(8), rmt(8), shutdown(8), ufsrestore(8), volcopy(8), wall(8)
Fewer than 32 read errors on the file system are ignored.
Because each reel requires a new process, parent processes for reels that are already written hang around until the entire tape is written.
ufsdump requires operator intervention on these conditions: end of volume, end of dump, volume write error, volume open error or disk read error (if there are more than a threshold of 32). In addition to alerting all operators implied by the n option, ufsdump interacts with the operator on ufsdump's control terminal at times when ufsdump can no longer proceed, or if something is grossly wrong. All questions ufsdump poses must be answered by typing yes or no, as appropriate.
Since backing up a disk can involve a lot of time and effort, ufsdump checkpoints at the start of each volume. If writing that volume fails for some reason, ufsdump will, with operator permission, restart itself from the checkpoint after a defective volume has been replaced.
It is vital to perform full, "level 0", dumps at regular intervals. When performing a full dump, bring the machine down to single-user mode using shutdown(8). While preparing for a full dump, it is a good idea to clean the tape drive and heads. Incremental dumps should be performed with the system running in single-user mode.
Incremental dumps allow for convenient backup and recovery of active files on a more frequent basis, with a minimum of media and time. However, there are some tradeoffs. First, the interval between backups should be kept to a minimum (once a day at least). To guard against data loss as a result of a media failure (a rare, but possible occurrence), capture active files on (at least) two sets of dump volumes. Another consideration is the desire to keep unnecessary duplication of files to a minimum to save both operator time and media storage. A third consideration is the ease with which a particular backed-up version of a file can be located and restored. The following four-week schedule offers a reasonable tradeoff between these goals.
Sun Mon Tue Wed Thu Fri
Week 1: Full 5 5 5 5 3
Week 2: 5 5 5 5 3
Week 3: 5 5 5 5 3
Week 4: 5 5 5 5 3
Although the Tuesday through Friday incrementals contain "extra copies" of files from Monday, this scheme assures that any file modified during the week can be recovered from the previous day's incremental dump.
ufsdump uses multiple processes to allow it to read from the disk and write to the media concurrently. Due to the way it synchronizes between these processes, any attempt to run dump with a nice (process priority) of `−5' or better will likely make ufsdump run slower instead of faster.
Most disks contain one or more overlapping slices because slice 2 covers the entire disk. The other slices are of various sizes and usually do not overlap. For example, a common configuration places root on slice 0, swap on slice 1, /opt on slice 5 and /usr on slice 6.
It should be emphasized that ufsdump dumps one ufs file system at a time. Given the above scenario where slice 0 and slice 2 have the same starting offset, executing ufsdump on slice 2 with the intent of dumping the entire disk would instead dump only the root file system on slice 0. To dump the entire disk, the user must dump the file systems on each slice separately.
The /etc/vfstab file does not allow the desired frequency of backup for file systems to be specified (as /etc/fstab did). Consequently, the w and W options assume file systems should be backed up daily, which limits the usefulness of these options.
April 9, 2016 | OmniOS |