To back up one or more UNIX systems, simply give the script their names. It will automatically determine the names of all their file system and back them up to the tape drive device that you specify. Issue the following command:
# Hostdump.sh level device logfile system [system2 Ö systemx]
Sometimes you don't want to back up an entire system. To back up less than the entire system, add the name of the file system(s) that you want after the system name. If you want to back up more than one file system from the same system, you will need to specify the system name before each file system. Issue the following command:
# Hostdump.sh level device logfile system:/filesys system:/filesys
A valid dump level between 0 and 9
A non-rewinding tape device, such as /dev/rmt/0n, or /dev/nrmt0. (The script will test to see if the device you specify is actually a no-rewind device.)
This will be an absolute pathname to a logfile that will contain stdout & stderr from script. This pathname should be a name that can be associated with the tape. When I used this script for production backups, I named the tapes and the logfiles after the name of the system, tape drive, and level. You could use something like this:
system1 [system2 Ö systemx]
This is a list of one or more systems that you want the script to back up to the device you listed with the second argument. Each system you list will be written to the tape, in the order they were listed. The script will automatically look at each systemís fstab file, and create a list of file systems to be backed up.
If you are backing up the whole system, it is best to use the option above and have Hostdump.sh figure out which file sytems to back up. But if you want to limit the file systems included, you can list as many as you want in this format.
system1 system2 system3:/filesys system4:filesys
You can also mix and match the options like this. Any systems that are listed without an accompanying file system name will receive a full backup. Any systems that have a file system listed after them will only have that file system backed up.
Advanced Option 1: Special Case File Systems
You may have file systems that are listed in the fstab file that you want to exclude on a regular basis. Or you may want to back up the /tmp file system, which is normally excluded by Hostdump.sh. Hostdump.sh can handle both of these special cases. If you want to exclude file systems that would normally be included, you put that file systemsís name in a file called
For example, assume that on a Solaris system called apollo, you want to exclude the /home file system. Normally it would get backed up since it is in /etc/vfstab. Suppose that you want to include the /tmp file system. You would create two files on apollo.
One would be called /etc/vfstab.exclude, and it would contain the entry:
The second file would be called /etc/vfstab.include, and it would contain the entry:
Advanced Option 2: Systems Bigger Than a Tape
Hostdump.sh, like the dump and restore commands, was not originally designed with todayís systems in mind. The script was first written to back up Ultrix systems (the largest of which was 7GB at the time) to 8mm compressed drives (the smallest of which was 10GB). The original author never envisioned a system where the disk was bigger than a tape. Then Hostdump.sh (and I) met HPís that shipped with 20GB of disk and one 6GB DDS tape drive! Something had to be done.
The "NOTE" should begin here.
The "NOTE" should end here, but the >bullets go outside of it.
The easiest thing would be to scrap the original idea of looking at the fstab, and give it a list of file systems to back up. That would be an easy option to include, and the job would get done. Essentially, thatís what Iíve done, but with a twist. I recommend doing it in the following manner:
Why is it important to do it this way?It goes back to the second essential element of a good backup Ėintelligence. Say, for example, that you have only had two include lists. You tell Hostdump.sh to backup /, /usr, /var, /opt, and /home1 on one tape, and /home2 and /home3 on another. What happens when you add /home4? Unless someone or something tells the backup program, it will never get backed up. Youíll never know it either, until someone asks you to restore /home4/yourboss/really-important-presentation-to-the-board-of-directors.doc. So, whenever you are in a situation like this, whether you are using this program or not, you need to find a way to back up the entire system on one tape drive (excluding certain file systems), then back up the excluded file systems on another tape. That way, when you add /home4, it will be automatically included on the first tape. The worst thing to happen is for the new /home4 fills up your first tape (which you would immediately know because you monitor your backups, right?), and you have to manually add it to the second tape and exclude it from the first.
To use this option, run hostdump.sh a second or third time, specifying the file systems that were excluded in
Tape 1: OS file systems (/, /usr, /var, /opt, etc.), /home1
Tape 2: /home2, /home3, /home4
Tape 3: /home5, /home6
# Hostdump.sh level device2 blocking-factor logfile2 elvis:/home1 elvis:/home2 elvis:/home3 elvis:/home4
# Hostdump.sh level device3 blocking-factor logfile3 elvis:/home5 elvis:/home6