AFAIK...
Caliante said:
For example:
- One seems to be needing the label from each disk and slice and the content of /etc/fstab?
Not sure what you are asking. The dump program needs to know the
/dev entry name of the disk/partition with the filesystem that you want to dump. This is easily gotten from the
df command, as well as
/etc/fstab although
fstab is just a static table and might not reflect actual current mounted filesystems and their underlying device node names. That is,
/etc/fstab could be wrong. Also
fstab only lists those filesystems that would automatically be mounted at boot time, plus random others, depend on what the sysadmin has stuck in there. But filesystems can be living in other device partitions and never get listed in
fstab. Yet they would still be eligible for dump. The upshot is that dump simply needs (an accurate) device node name with a valid filesystem in it.
Caliante said:
- How to verify the dump just being made? (I mean, a backup is useless if, once you need it, it can't be restored).
I don't know of any simple way to verify the dump other than to restore it in a spare partition and see if you like the result. But I would definitely try to catch all I/O errors from dump and dump tries hard to flag those things, so this would catch most problems. And you can always just do a "[cmd=]dd of=/dev/null bs=XX if=TAPEDRIVE[/cmd] to make sure that you can read the entire dump from the media.
Caliante said:
- How to exclude directories from being dumped?
I don't know of a way to do that simply because dump does it work OUTSIDE of the filesystem. It is an inode-level backup program and has no real knowledge of directories per se. NB that it also backs up FILESYSTEMS, which are only *parts* of the tree. There is no way to tell dump to backup an entire system (unless there is only one filesystem, which is rare).
The easiest way to understand this is to look at the output of
df. It lists all MOUNTED filesystems. Basically dump operates on ONE and only one of those lines of df's output. So if
/var is a separate filesystem (and therefore has its own line entry in df), then you can dump it, or not. But there is no way to, for example, only backup
/usr/lib (or not), since
/usr/lib is rarely its own filesystem.
You want to do backups WITHIN the entire file space, choosing directories at will, then use a file space-level program, like
tar or
cpio. These programs allow you to say what directories to archive.
Here is an example of df output:
Code:
$ df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/da0s1a 126702 74398 42168 64% /
devfs 1 1 0 100% /dev
/dev/da0s1d 253678 172438 60946 74% /var
/dev/da0s1e 126702 11316 105250 10% /tmp
/dev/da0s1f 2939197 2162978 541083 80% /usr
/dev/da1s1d 3107529 2561610 483768 84% /home
On this system, you can see there are FIVE mounted filesystems (plus
/dev, which doesn't count). A single
dump command can and does only deal with ONE of those five filesystems. You can choose to dump as few or many as you wish, but each one will require its own dump command. You cannot choose to dump only parts of one of those five filesystems. If you are using tape media, a common technique is to append multiple dumps as separate TAPE FILES, all on the same tape, like this:
Code:
# dump 0Labf 100 /dev/nsa0 /dev/da0s1a
# dump 0Labf 100 /dev/nsa0 /dev/da0s1d
# dump 0Labf 100 /dev/nsa0 /dev/da0s1e
# dump 0Labf 100 /dev/nsa0 /dev/da0s1f
# dump 0Labf 100 /dev/sa0 /dev/da1s1d
They will all go on one tape (presuming the tape is large enough, else dump will automatically prompt for a new tape). Note that the no-rewind device
/dev/nsa0 is used for all but the last dump.
To restore only the 3rd filesystem, for example, you can use the mt command to skip tape files:
# mt -f /dev/nsa0 fsf 2
will position the tape at the beginning of the 3rd dump, ready for the restore, in this case, of the
/tmp filesystem.
# restore ivbf 100 /dev/nsa0
I like to use the interactive mode of restore, because you get to see what is going to happen before it happens...