[Or see the PostScript version]

MARC W. MENGEL
The Fermi Modular Backup System is an attempt to build a single set of backup, restore, and other utility scripts that can be used by the various UNIX flavors here at Fermilab. It uses simple to write, short "modules" to provide different tape rotation schemes, tape mount systems, archive formats, etc. and also provides for backing up remote machines, and/or using remote tape drives. This document describes the use of fmb version v6_7 .
In fmb version v6_7 several things have been added or changed:
-X and -W options (see 8.12 and 8.11)
which Write a dummy file to each archive before backing it up,
then does a restore to eXtract the dummy file to check that the
backup works. This takes roughly twice as long as an unchecked backup.
We also add fmb_extract and fmb_eset to do the extract
test as a separate pass.
co_,
to allow operations to distinguish backup mounts from others.
The following terms are used throughout this document and are important to understanding the rest of the document. Please read over these definitions before continuing with the rest of the document.
An archive is a file containing an image of a file system tree in some known archive format, such as the output of the unix tar, cpio, or dump commands.
An archive format is a method for representing a file/directory tree on a flat file, as in the output of of the unix tar, cpio, or dump commands.
A backup tape is a tape consisting of a header file, followed by a series of archive files. The header contains a tape name, a date on which it was written, and information about the rest of the tape, such as the block size of the archive files, the archive format used to build the archive, and origin of the file trees that are archived.
A backup log is a file which lists what file-systems were backed up on a given tape. This log can be used to find out what tape contains which file. FMB now also supports verbose backup log directories, where a record of each and every file backed up is kept, listed in a file named after the tape upon which it was written.
A file tree is a directory and all of its subdirectories, sub-sub-directories, etc. as well as all the files contained therein. It is generally named by a hostname, a colon, and a directory path from the root directory on that host.
A mount scheme is the mechanism by which tapes end up in tape drives. The Fermi Modular Backup utilities that deal with tapes will all request that the tape be placed in the appropriate drive using one of the available mount schemes. For example "opcom" is a mount scheme by which an operator on the VAXCluster is asked to mount a tape in a given tape drive.
A rotation scheme is the rule by which backup tape [see 2.3]s are selected. A simple rotation scheme would be two tapes, an odd and an even tape, and each tape is used every other day.
a tape label is a name for a tape usually of the form host.day.set where the host name is the host writing the backup tape [see 2.3], the day is the name for today from a rotation scheme [see 2.7], and the set is an identifier to differentiate multiple backup tape [see 2.3]s written on the same host on the same day.
To check a tape and see what is on it, simply use fmb_toc [see 7.7] and specify a given tape drive and mount scheme [see 2.6]. If you are using a mount scheme [see 2.6] which requires a tape name, (i.e. an operator or jukebox tape mount) specify the tape name with the -L option.
For example:
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
To get a full listing of one archive on the tape, specify the archive name on the command line when issuing the fmb_toc [see 7.7] command. Specify the -v option [see 8.27] to get a "wide" listing of that archive. For example:
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Printing table of contents of server2:/usr (file number 3)...
Finding file number 3...
40755 root 0 Jul 13 10:07:01 1993 .
40700 root 0 Feb 19 18:34:03 1991 lost+found
41777 sys 0 Sep 8 11:15:06 1993 tmp
40700 root 0 Oct 19 11:54:52 1992 tmp/lost+found
40755 upd 0 Mar 8 14:16:54 1993 tmp/mgr
40755 upd 0 Mar 17 00:30:05 1993 tmp/mgr/mkf
40755 upd 0 Aug 12 00:30:08 1993 tmp/bin
100644 upd 1362 May 12 09:58:11 1993 tmp/sgi.lis
40755 upd 0 Jul 9 00:30:10 1993 tmp/ups
40755 upd 0 Mar 21 00:30:05 1993 tmp/ups/toInfo
40755 root 0 Aug 8 00:30:07 1993 tmp/rbio
40755 upd 0 May 5 00:30:07 1993 tmp/lib
100644 root 11 Sep 5 04:39:00 1993 tmp/.fsrlast
40755 upd 0 Jun 25 10:51:41 1993 tmp/src
40755 upd 0 Jul 4 00:30:09 1993 tmp/src/fort
40755 e665 0 Jun 2 19:03:43 1993 tmp/newver.20677
40755 root 0 Sep 2 09:35:22 1993 lib
40755 root 0 Jun 19 11:50:09 1993 lib/inst
100644 root 564 Apr 6 11:55:30 1993 lib/inst/audio
100644 root 1907 Apr 6 11:55:30 1993 lib/inst/maint_nfs
100644 root 412798 Apr 6 11:55:24 1993 lib/inst/hist
...
Note that the archive listing lists path names relative to the archive name, rather than a full path name.
To get a full listing of all archives on the tape, specify the -v option [see 8.27] and no specific archive. Be warned, this usually generates lots of output! For example:
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Printing table of contents of server2:/ (file number 2)...
Finding file number 2...
40755 root 0 Jul 13 10:07:01 1993 .
40700 root 0 Feb 19 18:34:03 1991 lost+found
41777 sys 0 Sep 8 11:15:06 1993 tmp
...
Printing table of contents of server2:/usr (file number 3)...
Finding file number 3...
40755 root 0 Jul 13 10:07:01 1993 .
40700 root 0 Feb 19 18:34:03 1991 lost+found
41777 sys 0 Sep 8 11:15:06 1993 tmp
40700 root 0 Oct 19 11:54:52 1992 tmp/lost+found
40755 upd 0 Mar 8 14:16:54 1993 tmp/mgr
...
Printing table of contents of server2:/usr/products (file number 4)...
Finding file number 4...
40755 root 0 Jul 13 10:07:01 1993 .
40700 root 0 Feb 19 18:34:03 1991 lost+found
41777 sys 0 Sep 8 11:15:06 1993 tmp
...
Restoring a single file from a backup tape [see 2.3] is a fairly easy operation, although first of course you need to know which tape to look on. If your system has the history directory configured via fmb_options [see 7.9], you can simply use the fmb_locate [see 7.4] command and get a list of the last backup tape [see 2.3] to successfully backup the file myfile in the current directory, and do a restore to get the file back. If the weaker file logging options are used [see sections 8.28 and 8.19] you can use fmb_find [see 7.5 to find a tape that has archives of the same filesystem as the file you specify.
# fmb_restore -L server1.18.A -w myfile
Please insert tape server1.18.A in drive /dev/rmt0 and press Enter
Checking tape label
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Restoring guest/myfile from server2:/usr into server2:/usr...
Finding file number 3...
Restoring...
#
The -L flag specifies a specific tape label [see 2.8], so that if your system defaults to using a tape jukebox or operator mounts the right tape will be requested. The -w option [see 8.29] tells fmb to put files where they came from. The default (if -w is not specified) is to unpack the file relative to the current directory; this is useful if you want to unpack a file or files in the /tmp directory.
If you do not know what tape to restore from specifically, because a history log was not created, or you need a particular version of the file from several weeks ago, etc. the fmb_toc [see 7.7] command can be used to get a table of contents of the tape and see what is on it, and when it was written.
You can restore several files from an archive by using wildcards to match filenames, but only if you're using cpio or tar archive formats [see 2.2]. Both of these archivers use asterisks ("*") to specify partial matches for names. For example if you wanted to get all of the files ending in a ".c" suffix from the /usr/fred/src/program directory on machine server2, you could simply issue the command:
# cd /tmp
# fmb_restore 'server2:/usr/fred/src/program/*.c'
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archive archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Restoring fred/src/program/*.c from server2:/usr into server2:/tmp...
Finding file number 3...
Restoring...
Note the single quotes around the filename with wildcards. The quotes are necessary to stop the shell from attempting to replace the "*.c" with a list of files.
You can also list multiple patterns on the command line, causing the restore to unpack files from several archives, although this will currently do one unwind per pattern, even if the patterns are on the same archive.
# cd /tmp
# fmb_restore 'server2:/usr/fred/src/program/*.c' 'server2:/usr/lib/*.a'
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archive archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Rewinding...
Restoring fred/src/program/*.c from server2:/usr into server2:/tmp...
Finding file number 3...
Restoring...
Rewinding...
Restoring lib/*.a from server2:/usr into server2:/tmp...
Finding file number 3...
Restoring...
If you want to restore a directory and its contents, you usually need to specify the directory with a trailing '/' like the following:
# cd /tmp
# fmb_restore 'server2:/usr/fred/src/'
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archive archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Rewinding...
Restoring fred/src/ from server2:/usr into server2:/tmp...
Finding file number 3...
Restoring...
Using the fmb_restore [see 7.8] command to restore an entire archive is also fairly easy to do; simply specify the archive name itself with a trailing "/" when doing the restore; for example to restore all of server2:/usr, you would do:
# cd /newusr
# fmb_restore server2:/usr/
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archive archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Restoring from server2:/usr into server2:/newusr...
Finding file number 3...
Restoring...
Sometimes you have multiple partitions you need to restore from a backup tape [see 2.3], because they were on the same disk and it has been replaced, or for some other reason. In this case you probably want to use the -w option [see 8.29] to indicate that files should be put back where they came from, otherwise the archives you list will be unpacked in the current directory, one over-top the other. In the following example we unpack 3 partitions from the same tape with one fmb_restore [see 7.8] command, after using fmb_toc [see 7.7] to check where and when the tape was written and what was on it.
# fmb_toc
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
# fmb_restore -w server2:/usr/ server2:/usr/products/ server2:/usr/products/IRIX/
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archive archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Restoring from server2:/usr into server2:/usr...
Already at file 1...
Restoring from server2:/usr/products into server2:/usr/products...
Already at file 2...
Restoring from server2:/usr/products/IRIX into server2:/usr/products/IRIX...
Already at file 3...
If you have really long lists of archives, (for example if you've been making separate archives of each user's home directory, etc.) you can redirect fmb_toc [see 7.7]'s output onto a file, edit the file to trim down to the list of archives you want, and do a restore with the -f file option [see 8.16] to use the file list in the file, like this:
# fmb_toc > myfile
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
# ex myfile
: 1,5d
: 1,$p
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
: 2,$s/$//
: 1,$p
server2:/
server2:/usr/
server2:/usr/products/
server2:/usr/products/IRIX/
: w
"myfile" 4 lines...
: q
# fmb_restore -w -f myfile
Mount tape on /dev/rmt0.1 and press Enter
Thanks!
Tape server1.18.A:
written Tue Jan 26 11:30:50 CST 1993
format cpio
blocksize 16k
archives:
server2:/
server2:/usr
server2:/usr/products
server2:/usr/products/IRIX
Restoring from server2:/usr into server2:/usr...
Already at file 1...
Restoring from server2:/usr/products into server2:/usr/products...
Already at file 2...
Restoring from server2:/usr/products/IRIX into server2:/usr/products/IRIX...
Already at file 3...
If you want to make an archive of some particular set of files with fmb, either to store the data long term, or to send to someone else, etc. you simply need to choose a reasonable label for the tape, specify the files you want backed up, and use fmb_backup [see 7.2] to write the tape, and fmb_restore [see 7.8] to unpack it later. The backup log file will list what tapes the files were saved on for later retrieval.
# fmb_backup 'server1:/usr/people/fred/src/program' -L Archive1 -u
Mount tape Archive1 on /dev/rmt0.1 and press Enter
Thanks!
Checking tape label
Writing Label Archive1
Archive Size Summary
Estim. Actual %Est Name
--- --- -- --
1872 1888 99% server1:/usr/people/fred/src/program
--- ---
1872 1888 TOTAL
Unmount tape Archive1 on /dev/rmt0.1
Now let us examine a situation where we have a machine with a tape jukebox, and we want to do two machines' backups to tapes in the jukebox, every night, a total of 5 tapes worth of data, but fall back on OPCOM operator mounts in the event that a tape is not in the jukebox.
Since fmb_set [see 7.11] uses option files, we need to define first our option
files that describe what we want backed up, and ones that describe what
drives we want to use to back them up.
Here are the first two; they specify cpio archive backup tapes [see 2.3] of the
root and user partitions of fnsg01 and cdfsga:
File 01.A:
-a cpio
-x
-h fnsg01
-s A
fnsg01:/
fnsg01:/usr
File a.A:
-a cpio
-x
-h cdfsga
-s A
cdfsga:/
cdfsga:/usr
Next we need tape description files for tape drives in the jukebox; something
like:
File j1:
-t /dev/rmt/tps1d6nrnsv
-m "juke jukebox1"
File j2:
-t /dev/rmt/tps1d7nrnsv
-m "juke jukebox1"
File ext:
-t /dev/rmt/tps0d7nrnsv
-m opcom
0 0 * * 0-5 /usr/products/fmb/v5_3/fmb_summarize root fmb_set "01.A 01.B 01.C a.A a.B" "j1 j2" "ext" 0 0 * * 6 /usr/products/fmb/v5_3/fmb_summarize root fmb_set -X "01.A 01.B 01.C a.A a.B" "j1 j2" "ext"
This gives us the backup behavior we want of trying the jukebox tape drives, and then retrying any failed backups on the external tape drive; also running file extract tests once a week.
When rearranging disks it is often convenient to dump data to tape, then repartition your disks, and finally restore selective parts from tape back to the disk. fmb is handy for this purpose; you can use fmb_backup [see 7.2] to back up the data, listing several archives, and after repartitioning you can change directories to a new partition, and restore the archvies that go there, then change directories to the other and unpack those. Or you can back up the entire partition in one archive, and use wildcards to restore the portion of the files you want in the new partition scheme.
Setting up backups to run automatically is a fairly easy task, but does require a little forethought on larger systems. You must decide what data needs to be backed up, as well as a backup policy; i.e. how often things need to be backed up, and how long backup tape [see 2.3]s should be kept. Then you can get and prelabel tapes, and start regular backups. Let's examine these in more detail.
Deciding what data needs to be backed up is usually fairly easy.
The majority of the system usually needs to be backed up, with the
exception of explicit scratch or temporary areas (like /tmp).
On systems with multiple machines and NFS mounts, local filesystems
on the clients need to be backed up as well as the areas provided
by NFS servers.
Simply make a list of the hostnames and filesystems that should
be backed up; something like:
client1:/
client1:/usr
client1:/var
client2:/
client2:/usr
client2:/var
server1:/
server1:/usr
server1:/var
server1:/usr/products/AIX
server2:/
server2:/usr
server2:/var
server1:/usr/products
server1:/usr/products/IRIX
Deciding on a backup policy is a bit harder. Usually you need access to files at least a few days back, in case someone realizes they deleted a file a few days ago and that they need it restored. Similarly, it might be important for your system to be able to retrieve files from up to a year ago to see old versions of a software product, login records, etc. in case of disaster. fmb comes with two good rotation schemes [see 2.7] for tapes that implement simple policies. The weekly rotation scheme just has a different tape for each day of the week; this means that you generally have a weeks worth of backups on hand all the time; but anything more than a week old is gone. The monthly rotation scheme similarly rotates a tape for each day of the month, but also has a "first Monday of the month" tape for each month. This means you have all the tapes for the last month, but also have first of the month tapes for the last year; and can often retrieve files up to a year old. If these schemes are not sufficient for your purposes, you can build your own rotation scheme. See section 5.6 entitled "Adding New Rotation Schemes".
Another important aspect of your backup policy is deciding how tapes are going to get changed. Is someone going to put tapes in the tape drives during the day for nightly backups? Are operator mounts going to be requested? Is some sort of robotic jukebox going to be used? This lets you choose a mount scheme [see 2.6] and tape drives for your backups. fmb provides several mount schemes (see the description of the -m mount_type option [see 8.20]) but most local systems use the "quiet" mount scheme ; it assumes someone has already put the tape in the drive for it. If you need a mount scheme different from the ones provided, see the section "Adding New Mount Schemes".
Now that you have an idea what needs to be backed up, and the number of copies of each piece of data you have, we can figure out how many tape sets we'll need. First we need to know how big the total data set is, we can use the fmb_max [see 7.6] command to find that, like this:
# setup fmb
# fmb_max -f mylist
Max Used Directory
32768 20768 client1:/
301056 228532 client1:/usr
18513 10230 client2:/
244545 189126 client2:/usr
20475 17206 server1:/
301000 222510 server1:/usr
1002820 722950 server1:/usr/products/AIX
20475 17206 server2:/
301000 222510 server2:/usr
672256 483328 server2:/usr/products
1002820 722950 server2:/usr/products/IRIX
3917728 2857316 TOTAL
If you get lots of Permission Denied" errors at this point,
you need to check that you have .rhosts files set up properly
so that you can rsh to the different machines involved.
You should also run the hostname command on your machine,
and make sure that the hostname in your archive list file matches
the one given by hostname. This is a common problem setting
up on OSF1 systems where hostname gives the full domain name.
So we have a total of 4G of data possible, of which 3G is actually in use. With low density 8mm tapes, this would mean we need 2 tapes per night to do a full backup; with a high density drive we could do just one. We'll use the low density case for our example, this means we need to do two backup tape [see 2.3]s each night, therefore two sets of backup tapes will be needed. We then need to split our list of data to be backed up into two sections of about 2G apiece. In our example it looks like server2's data alone is about 2G, so we can put all the server2 stuff on one tape, and everything else on the second one. We can now make files that describe our situation, one file with the server2 data:
server2:/
server2:/usr
server2:/var
server1:/usr/products
server1:/usr/products/IRIX
and one with the rest:
client1:/
client1:/usr
client1:/var
client2:/
client2:/usr
client2:/var
server1:/
server1:/usr
server1:/var
server1:/usr/products/AIX
and we can verify our sizes by using fmb_max [see 7.6] again, this time once on each dataset:
# setup fmb
# fmb_max -f mylist.A
Max Used Directory
20475 17206 server2:/
301000 222510 server2:/usr
672256 483328 server2:/usr/products
1002820 722950 server2:/usr/products/IRIX
1725651 1445994 TOTAL
# fmb_max -f mylist.B
Max Used Directory
32768 20768 client1:/
301056 228532 client1:/usr
18513 10230 client2:/
244545 189126 client2:/usr
20475 17206 server1:/
301000 222510 server1:/usr
1002820 722950 server1:/usr/products/AIX
1921177 1411322 TOTAL
Now we can make these files into complete options files for fmb_backup [see 7.2] by adding a set identifier to the file; just add a "-s A" line to the mylist.A file, and a "-s B" line to the mylist.B file, and install them in the $FMB_DIR/fmb_files directory.
Next we should run a test backup, to make sure we have sufficient privledges (with .rhosts files, etc.) to actually run the backups. For the test, we'll specify our list of archives with the -f file option [see 8.16], the tape drive to write on with the -t tape option [see 8.25], and that the tape is unlabelled with the -u option [see 8.26].
# fmb_backup -t /dev/rmt/tps0d3nrnsv -f mylist.A -u
Mount tape server2.Mon.A on /dev/rmt/tps0d3nrnsv and press Enter
Thanks!
Checking tape label
Writing Label Archive1
Archive Size Summary
Estim. Actual %Est Name
--- --- -- --
17290k 17206k 99% server2:/
222494k 222510k 99% server2:/usr
483312k 483328k 99% server2:/usr/products
722816k 722950k 99% server2:/usr/products/IRIX
---- ----
1445832k 1445994k TOTAL
Unmount server2.Mon.A from /dev/rmt0.1
# fmb_backup -t /dev/rmt/tps0d3nrnsv -f mylist.B -u
Mount tape server2.Mon.B on /dev/rmt/tps0d3nrnsv and press Enter
Thanks!
Checking tape label
Writing Label Archive1
Archive Size Summary
Estim. Actual %Est Name
--- --- -- --
20752k 20768k 99% client1:/
228532k 228532k 100% client1:/usr
10230k 10230k 100% client2:/
189126k 189126k 100% client2:/usr
17206k 17206k 100% server1:/
222510k 222510k 100% server1:/usr
722950k 722950k 100% server1:/usr/products/AIX
---- ----
1411306k 1411322k TOTAL
Unmount server2.Mon.B from /dev/rmt0.1
#
Note that we used no-rewind, variable block device names for the tape drives. fmb WILL NOT WORK PROPERLY unless a no-rewind tape device is used. Only the last archive written will be on the tape if a rewind-on-close device is used. Also, it is recommended that a variable blocksize device be used where possible, and that "no swap" devices on SGI's be used for tape portability.
It is usually simpler in the long run if you put archive lists in one configuration file, and tape drive options in another. For example if we put the options for a given tape drive in an option file, it makes a nice shorthand for dealing with that tape drive in the future:
File drive1:
-t server2:/dev/rmt/tps0d3nrnsv
-b 16k
-m quiet
File drive2:
-t server1:/dev/rmt0.1
-b 16k
-m quiet
Then we can do a backup by simply specifying the option file for the tape drive and the archive list:
# fmb_backup -f mylist.A -f drive1
Finally, we need to add appropriate crontab entries to the crontab file to get the backups run every night. If we want the A set to run on server2 every night, and the B set to run on server1, and both to run at midnight, and to run the extract/restore checks on Saturdays, we'd want crontab entries like:
0 0 * * 0-5 /usr/products/fmb/v5_2/fmb_summarize root fmb_backup -f drive1 -f mylist.A 0 0 * * 6 /usr/products/fmb/v5_2/fmb_summarize root fmb_backup -X -f drive1 -f mylist.A
on server2, and:
0 0 * * 0-5 /usr/products/fmb/v5_2/fmb_summarize fmb_backup -f drive2 -f mylist.B 0 0 * * 6 /usr/products/fmb/v5_2/fmb_summarize -X fmb_backup -f drive2 -f mylist.B
on server1. See the previous sections for the descriptions of the "drive2" and "mylist.B" files we are using here.
There are also a few other options you may want to configure for your backups. The archive format[see 2.2] (i.e. cpio, dump, tar, etc.) and logging options are ones you may want to set with the fmb_options [see 7.9] command so that you get backups in the format you want, and a good log of what data is backed up where. Note that dump format, while often the fastest backup format, is not appropriate for filesystems that may be active at the time they are backed up. See section 5 for a complete discussion of all the fmb options.
Also note that options set with fmb_options [see 7.9] are on a per-host basis; if you want the same options on multiple hosts you can either set them from there on each host, or change directories to the $FMB_DIR/fmb_defaults directory, and link the options file for one host to the name of another host; this way if you change one, the others linked to it change too.
The requirements for a mount script are fairly simple; you need to write a script that takes arguments -u or -un or no arguments, as follows:
$tape_rsh "'$MT $tape_path $MTEJECT'"
A good basic example is the $FMB_DIR/fmb_mount/manual script which asks the user to mount the tape.
There are four scripts that should be used to provide a rotation scheme [see 2.7.
The three scripts for an archive format[see 2.2] called
name are stored in
$FMB_DIR/fmb_arch/name,
and are called pack, unpack and toc.
The easiest way to add a new archive format is to copy one of the existing
sets of scripts (like the ones in $FMB_DIR/fmb_arch/cpio) and
replace the actual commands in the script that do the creation/unpacking of the
archives.
This way you can avoid debugging the hideous quoting conventions and slightly
messy argument passing conventions currently in use in the fmb scripts.
If you have an archive format that needs to be invoked differently on
different platforms, start with the $FMB_DIR/fmb_arch/dump scripts,
which check the machine type of the (possibly remote) host and pick a
different invocation string for each one.
If you need to write your own scripts altogether, you should make the pack script take an argument of the form user@host:path and generate an archive rooted at that pathname on that host on standard output, with relative pathnames. It should also echo "Exit code n" on the standard error to indicate the success or failure of the archive's creation.
The unpack script takes 2 arguments, the first is a pattern of files to unpack from an archive on the standard input; the second is an argument of the form user@host:path which indicates the directory the files should be unpacked into.
The toc command should take an archive on its standard input and generate a table of contents on its standard output.
All of the scripts for a given archive format[see 2.2] should take appropriate action if the ${fmb_verbose} flag is set - i.e. give a longer or wider or more detailed listing if possible, list files as they are packed, etc.
Note that the pack script script should build an archive with path names relative to ${arch_path} so that it can be unpacked somewhere else later.
The pack script should also look for the ${partial} environment variable to be true or false, to decide if a partial or incremental backup should be performed.
The scripts should be placed in a subdirectory of the $FMB_DIR/fmb_arch directory, and the subdirectory name is the name of the archive format.
To restore from a tape written by fmb_backup when you do not have
the fmb scripts available is reasonably easy. It proceeds in several
stages. You must read in the tape label and examine it to discover
when and how the tape was written, then find the appropriate archive
or archives on the tape, and then restore the data with the appropriate
commands.
To read an fmb tape label by hand, you need to have the tape loaded
in a drive, then we can rewind the tape and read off the label with
dd into a disk file, and then examine it with whatever tools
are available for examining text files. For example:
# TAPE=/dev/rmt/tps0d7nrnsv.8500 # export TAPE # mt rewind # dd if=$TAPE of=/tmp/fmblabel bs=2k # more /tmp/fmblabel dcdsv0.6.A Thu Mar 6 17:38:29 CST 1997 cpio 16k dcdsv0:/ dcdsv0:/usr ...
This tells us:
cpio, dump, tar, etc.
dd the data to tape
If we have read the label off of the tape as in the example in the
previous section, we now have the information we need to restore
the data from the tape.
If for example we want to restore dcdsv0:/usr, we need to
locate the appropriate file on the tape, use dd to read the
data from the tape, and pipe that into the appropriate command to
unpack the data. For the example listed above, we would do
something like:
# TAPE=/dev/rmt/tps0d7nrnsv.8500 # export TAPE # cd /usr # mt rewind # mt fsf 2 # dd bs=16k if=$TAPE | cpio -icdvmu
(You don't need to set and export TAPE again if you are continuing from the previous section).
There are two items in this sequence of commands that need to be determined; namely how many filemarks to skip, and what unpack command to use to actually restore the files.
To determine the number of files to skip with mt fsf, start counting
the archives from 1 until you reach the archive you want to restore;
that's how many file marks to skip.
In this case dcdsv0:/usr was the second item, so we skipped 2 filemarks.
To determine the unpack command into which to pipe dd's output, you
should probably use the following table:

All of the above can be followed by a filename, specified relative to the current directory, to be restored.
The fmb scripts generate very few error messages of their own, they mainly detect error returns from the various archive programs and dd, and proceed to display them with a wrapper saying at what point in the process the (apparent) error occurred.
fmb forges on through most errors, except for tape write errrors. It attempts to make sure some data gets written for each archive (even if its just a few blanks) so that file skipping based on the header information on the tape will be correct.
Error messages from fmb generally look like:
*
fmb: error during fmb_backup on Tue Jun 15 20:00:08 CDT 1993
Write of ... to tape failed, dd output was:
dd: write error: Invalid argument
131281+2038 records in
66187+1 records out
Exit code 2
The -n option [see 8.21] can be used on most of the fmb programs to specify a filter or program to send error messages to. This can be used to mail just the error messages to someplace special, or write them on a log file, etc. so that error conditions can be alerted somewhere and kept separate from the normal backup output. The fmb_mail script is reccomended for mailing errors somewhere, because it also puts the error message in the backup output as well as mailing it somewhere. You might want to use tee -a logfile to put error messages on a log file and keep it in the backup output. If you have an error command that does not repeat the error on standard output, the backup output will not contain the error message, it will only go where your program sends it.
"Permission Denied" errors are almost always lack of permission to do an rsh command to another host, although they may indicate lack of permission to change directories to a directory to be backed up, or to read a raw disk device for dump archives or write on tape devices. Make sure you can rsh to the host as the user who actually runs the backup, and that you have read permssion on the disk and write permission on the tape.
This is an error that occurs when an archive doesn't fit on the tape, and the version of dd on the machine writing the tape doesn't consider it an error to hit end of file on the output. In this case dd simply exits silently, and cpio gets a SIGPIPE, and exits with an error code of 141. This means you need to rearrange which archives are on which tapes, so that everything will fit.
This usually occurs when you are using a fixed-block-size tape device, fmb tries to block the data up to a particular block size, but at the end of an archive it often isn't. You should use a variable-block-size device for fmb backups. Under AIX this usually means changing the block size to zero in SMIT.
Sometimes cpio or dump will exit with non-zero exit codes when everyhing basically worked fine. When this occurs, fmb will report this as an error, but have no error output for the program.
fmb also considers it an error if the amount of data written to tape is signifigantly different from an estimated amount it generates from using du and df. This is occaisonally due to files with "holes" in them (like SunOS core files, or some database files) and not really a problem. Other times it's due to permission problems reading individual files, or disk read errors. If there is no error other than the size difference, and the archive is bigger than estimated, the error message is probably spurious.
A common cause is large numbers of small files, or large numbers of symlinks, which generally cause the size of cpio or tar archives to be different than the estimate. Since du and df count disk blocks, and small files and symlinks commonly use less than a quarter of a disk block, the estimate given by du or df is often wrong, and fmb must try to "fudge" the result for this factor.
A less common cause of these differences if you're backing up with cpio or tar is files being "hidden" by a mount of another filesystem; for example if there is a file in the root filesystem called /usr/data/bigfile but there is a filesystem mounted over /usr/data, then the file bigfile is effectivly hidden, but still takes up space in the root filesystem. This usually happens because a filesystem was not mounted at some point, and data got written in the root filesystem instead of the one it should have been written in.
This section discusses the various commands in the fmb package, what options affect them, and where to find examples of their use elsewhere in the document.
The fmb_summarize command takes a command line of the form
fmb_summarize "mail address list" command
runs the command, and mails the results to the users in the mail address list, with a summary subject line.
The fmb_backup command will write one backup tape [see 2.3], composed of archives of various file tree [see 2.5]s on various systems. It assumes that the file trees given to it will fit on the tape specified; there is no provision for mounting a second tape to finish an archive, etc. It exits with a return code of 0 if the backup succeded; 1 if the tape was not available to be mounted, the label check failed, or if there were any errors writing on the tape that were not recoverable by retrying the writing of various archives.
If you want to setup automatic spillover-to-the-next tape backups, you need to use either a wrapper script that divies up the backup data to multiple tapes via directories, or a script to invoke via the-e option [see 8.15] which will generate a list of directories to backup for each tape.
See the Setting up Nightly Backups or Doing Occasional Archiving sections for examples.
The fmb_backup command exits with the following exit codes:
It uses the following options:
The fmb_exract assumes that the -W (see 8.11) option was
used to write a backup tape, and attempts to extract the stamp file from each
archive and verify it. It uses fmb_restore (see 7.8)
to perform the restores. It is invoked automatically by fmb_backup
(see 7.2)
if the -X (see 8.12) option is given.
It uses the following options:
The fmb_locate command provides an interactive querey for searching
a verbose log directory for tapes conataining a particular file or regular
expression. For example to look for user mengel's .login file,
you would:
+---------------------------------+ | Backup Log Search Criterea | --- -- --- ---- | 0) Exit Program | 1) Start Date: 1/1/1970 | 2) End Date: 03/31/1994 | 3) Filename Regex: | 4) NFS Server: | 5) Logfile Directory: /usr/products/cluster_disk/fmb/logs | 6) Logfile Regex: .* | 7) Ask on Each File: true | 8) Start Search | 9) Summarize Results |10) Restore Individual Files |11) Restore Directories +---------------------------------+ Enter choice number:
At this point you can enter a number from 0 to 7, and change a search critera, or enter 8 to start a search, or 10 to summarize search results. We can enter a 1, and change the date, and a 3 and set a file regular expression, like:
+---------------------------------+ | Backup Log Search Criterea | --- -- --- ---- | 0) Exit Program | 1) Start Date: 03/29/1970 | 2) End Date: 03/31/1994 | 3) Filename Regex: mengel.*login | 4) NFS Server: | 5) Logfile Directory: /usr/products/cluster_disk/fmb/logs | 6) Logfile Regex: .* | 7) Ask on Each File: true | 8) Start Search | 9) Summarize Results |10) Restore Files |11) Restore Directories +---------------------------------+ Enter choice number: 8
Now when we start the search, we will be prompted whether we want to check each file in the backup log directory (unless we had set item 7 to be "false").
We can now summarize the search results by choosing item 10, and we get a result like:
Enter choice number: 9
Tapes found were:
Fncase.30.E
Which were backed up on drives:
fndaut:/dev/nrst0
And files matched were:
fndaut:/t2/mengel/.login
We can now restore the file by choosing item 10, selecting the tape, file and tape drive from the lists provided.
Enter choice number: 10 Matches were found on the following tapes: 1 fndaub.24.C 2 fndaub.23.C Which tape would you like to restore from [1..2]? 2 Backup tape drives are: 1 /dev/rmt/tps0d5nrnsv.8500 2 /dev/rmt/tps0d6nrnsv.8500 3 fncase:/dev/nrst8 4 fndaub:/dev/rmt/tps0d3nrnsv.8500 5 fndaub:/dev/rmt/tps1d2nrnsv.8500 6 fndaub:/dev/rmt/tps1d6nrnsv 7 fndaut:/dev/nrst9 Which drive would you like to restore on [1..7]? 3 fileserver:path matches: 1 fndaut:/t2/mengel/.login Which file would you like to restore [1..1]? 1 About to execute: fmb_restore -w -L fndaub.23.C -t fncase:/dev/nrst8 fndaut:/t2/mengel/.login This may overwrite any existing fndaut:/t2/mengel/.login are you sure? y Please insert tape fndaub.23.C on drive /dev/nrst8 and press EnterThanks! ...
The fmb_find command will look in the current backup log [see 2.4] (if any) and print the tape label [see 2.8]s of the last backups to contain the files listed on its command line. It exits with a return code of 0 if it found a match, 1 otherwise. You can specify the -l log option [see 8.19] or the -V directory option to force a search in a particular logfile or verbose log directory.
See section 3.2.1 Restoring a Single file for an example.
Note that if only -l style logging is available, fmb_find [see 7.5] can only tell you that the archive that might contain the file is on a given tape, not whether the file is actually there.
However if -V style logging is enabled, you can use fmb_locate [see 7.4 to find the tape that actually contains the file.
It uses the following options:
The fmb_max command will look at the sizes of the partitions of the data you have asked for, and gives you a total so that you can estimate if a backup will fit on a tape.
See section 5.2 Setting Up Nightly Backups for an exmple.
It uses the following options:
It assumes the "-x" option, with no override.
The fmb_toc command will give a table of contents of a backup tape [see 2.3], listing either just the archives on the tape, as well as the date, etc. or a longer listing giving all of the individual files on the archives as well. It exits with a return code of 0 if it succeeds, 1 if it was unable to mount the tape, 2 if the label check failed, or 3 if there were errors reading the tape.
See the Seeing what is on a tape section for examples.
It uses the following options:
The fmb_restore command allows files to be extracted from the archives on a backup tape [see 2.3]. The file requested is a filename qualified as host:path (or expanded into one by the option parser), this is then split by fmb_restore into an archive name, and a path relative to the archive name. (i.e. host:archive/relative is the name of the file) and the relative pathname file is extracted from that archive into the current directory, unless the -w option [see 8.29] is specified, in which case it goes into the directory it was backed up from. So if you are in the directory /tmp and you request to extract fnsg01:/usr/lib/aliases from a tape with an archive of fnsg01:/usr the file lib/aliases will be extracted from that archive, and end up as /tmp/lib/aliases on your current machine. It exits with a return code of 0 if it succeeds, 1 if it was unable to mount the tape, 2 if the label check failed, or 3 if there were errors reading the tape.
See Restoring Files [section
refrestoringfiles] for examples.
It uses the following options:
The fmb_options command lets you set default options for future backups, restores, etc. on this host. The options set with this command are kept in the file $FMB_DIR/fmb_defaults/hostname for your host.
It uses the following options:
For example
# fmb_options
Current default options are:
-a cpio (archive format)
-b 16k (block size)
-l /dev/null (log file)
-m manual (mount mechanism)
-n /bin/cat (notify program for errors)
-r monthly (tape rotation scheme)
-s A (set part of label)
-t dcdmwm:/dev/rmt0.1 (tape drive)
-V (verbose log directory)
# fmb_options -t dcdmwm:/dev/rmt1.1 -l /var/msgs/backups
Current default options are:
-a cpio (archive format)
-b 16k (block size)
-l /var/msgs/backups (log file)
-m manual (mount mechanism)
-n /bin/cat (notify program for errors)
-r monthly (tape rotation scheme)
-s A (set part of label)
-t dcdmwm:/dev/rmt1.1 (tape drive)
-V (verbose log directory)
#
The first invocation simply prints the current defaults, the second changes the tape drive and log file.
The fmb_prelabel command lets you put tape label [see 2.8]s on a set of tapes for your rotation scheme [see 2.7] and generate a PostScript file to print labels on 1/2" by 4" laser printer label stock.
It uses the following options:
Specifying "-L label" prelabels just one tape with that label, otherwise fmb_prelabel lists the tapes in a full tape set, and asks you which ones you want to write.
For example, to make a weekly rotation batch of set "B" backup tape [see 2.3]s for
host "kremvax", you would:
# fmb_prelabel -t /dev/rmt/tps0d1nrnsv -h kremvax -s B -r weekly
Building label list...
1 kremvax.Sun.B 3 kremvax.Tue.B 5 kremvax.Thu.B 7 kremvax.Sat.B
2 kremvax.Mon.B 4 kremvax.Wed.B 6 kremvax.Fri.B 8 ALL
Enter number(s)/range(s) [i.e. '5..10'] of label set to build:
8
Expanding ranges...
Enter a file to put PostScript labels in (or just hit Enter for none):
kremvax.ps
Press enter when tapes are ready to mount
Mount tape kremvax.Sun.B on /dev/rmt/tps0d1nrnsv and press Enter
Thanks!
4+0 records in
0+1 records out
Unmount tape kremvax.Sun.B on /dev/rmt/tps0d1nrnsv
Mount tape kremvax.Mon.B on /dev/rmt/tps0d1nrnsv and press Enter
Thanks!
4+0 records in
0+1 records out
Unmount tape kremvax.Mon.B on /dev/rmt/tps0d1nrnsv
Mount tape kremvax.Tue.B on /dev/rmt/tps0d1nrnsv and press Enter
...
The fmb_set commands take as arguments three (or more) lists of file names. The files so named should all be files containing command line arguments for fmb_backup , fmb_verify, or fmb_extract [see 7.2, 7.13, 7.3]. The first set of files should contain options specifying file trees [see 2.5]s to be backed up, and what to call the tapes. The second set of files should contain options specifying tape drives and mount scheme [see 2.6]s we want to write backups on.
The remaining sets of files should specify tape drives and mount scheme [see 2.6]s we can fall back on if mounts fail from the previous set of files. fmb_set will backup the requested file tree [see 2.5]s on the requested tapes on the listed drives on a next available drive basis. It exits with a return code of 0 if it succeeds, or 1 if any of the backups failed.
See Error Recovery for Important Backups, section 4, for an example.
It uses the following options:
The fmb_cp command does remote and/or local copies by building archives of the source directories, and unarchiving them in the indicated destination.
It uses the following options:
Note that fmb_cp will update data relating to partial/full backups, as well as doing "partial" copies.
As an example, we'll copy files from the ups directory to /tmp/junk, to show that file modes, dates, etc. are all automatically preserved. This can be useful for moving home directories, etc.
# ls -l ups
total 8
-rw-r-r- 1 root system 0 Dec 8 11:31 .lastfull
-rwxr-xr-x 1 mengel g150 201 Dec 7 13:13 current.csh
-rwxr-xr-x 1 mengel g150 26 Dec 7 13:13 setup.csh
-r-xr-xr-x 1 mengel g150 32 Jul 7 1992 setup.ksh
-rwxr-xr-x 1 mengel g150 32 Dec 7 13:13 setup.sh
drwxrwxrwx 2 mengel g150 512 Dec 7 13:13 toman
-rwxr-xr-x 1 mengel g150 133 Dec 7 13:13 uncurrent.csh
-rw-r-r- 1 mengel system 139 Nov 8 12:14 unsetup.csh
-rw-r-r- 1 mengel system 202 Nov 8 12:17 unsetup.sh
# ls -l /tmp/junk
total 0
# fmb_cp ups /tmp/junk
Converting "ups" to "dcdsv0:/usr/people/mengel/src/fmb/ups"
Converting "/tmp/junk" to "dcdmwm:/tmp/junk"
30 blocks
Exit code 0
#
30 blocks
Exit code 0
# ls -l /tmp/junk
total 64
-rw-r-r- 1 root system 0 Dec 8 11:34 .lastfull
-rwxr-xr-x 1 mengel g150 201 Dec 7 13:13 current.csh
-rwxr-xr-x 1 mengel g150 26 Dec 7 13:13 setup.csh
-r-xr-xr-x 1 mengel g150 32 Jul 7 1992 setup.ksh
-rwxr-xr-x 1 mengel g150 32 Dec 7 13:13 setup.sh
drwxrwxrwx 2 mengel g150 512 Dec 7 13:13 toman
-rwxr-xr-x 1 mengel g150 133 Dec 7 13:13 uncurrent.csh
-rw-r-r- 1 mengel system 139 Nov 8 12:14 unsetup.csh
-rw-r-r- 1 mengel system 202 Nov 8 12:17 unsetup.sh
#
This command simply mounts a tape in the fashion of fmb_backup [see 7.2] and unmounts it, reporting any problems. It is used to make sure a backup tape [see 2.3] can be accessed later.
For example, to check to see if the right backup tape [see 2.3] is present for the dcdmwm.A backup options file, use:
# fmb_verify -f dcdmwm.A -k
Checking tape label [see 2.8]
fmb: error during fmb_verify on Wed Dec 8 11:40:22 CST 1993
Expected label "dcdmwm.8.A", got label "BackupTest"
This way you can check that a backup that runs in the middle of the night will have the tape it needs while it is convenient to do something about it.
It uses the following options:
This command gives a list of contents of the directory it is
given as an argument. For example if there is an area
host1:/home with subdirectories fred and mary
fmb_subdirs host1:/home will give the list
host1:/home/fred host1:/home/mary
on its output. This is especially useful when used with the -e
option (see 8.15) of command fmb_backup (see 7.2)
as in:
fmb_backup -e "fmb_subdirs host1:/home" ...
to backup the home directories in host1:/home separately.
This command takes the same arguments as fmb_set(see 7.11),
but instead of running the backups, it simply prints the list of tape label
names that would have been used by the corresponding fmb_set invocation.
This command takes the same arguments as fmb_backup(see 7.2),
but instead of running the backups, it simply prints the tape label
name that would have been used by the corresponding fmb_backup invocation.
The options you can specify on all of the various Fermi Modular Backup command lines are the same, although some options have no effect on some commands (i.e specifiying a tape drive for the fmb_cp [see 7.12] command has no effect). The options, along with what internal shell variables they set, are described in the following section.
This option specifies that archive errors be treated as unrecoverable, so no retry attempts are made on them.
This option lets you specify a pre- and post-command for a particular
volume (it affects the next file tree mentioned).
The command will be invoked as
command "before"
before the volume is backed up, and as
command "after"
afterwards.
This is a synonym of the -t tape option [see 8.25], maintained for backwards compatability.
For backups using the cpio archive format (see 8.10), this lets
you specify a pattern which will be given to egrep -v to match files
that should not be backed up. For example:
fmb_backup -a cpio -E 'core|\.netscape/cache' fred:/home
will backup the /home area on host fred, but not any
core files or netscape cache directories.
This lets you define a particular volume as being a full backup (it affects the next file tree mentioned). This means you can have several partial backups and one or two full on the same tape, for example.
This option speceifies the label name for the tape, overriding the construction of a host.day.set format label in fmb_backup [see 7.2] and fmb_verify [see 7.13]. This sets the label environment variable. It is used by all of the fmb commands to specify a particular tape to mount, and is required when using "cps", "opcom", or "juke" mount types on fmb_toc [see 7.7], fmb_restore [see 7.8], or fmb_prelabel [see 7.10]. It overrides the -s set option [see 8.24], the -d day option [see 8.14], and -h host option [see 8.16].
This option specifies that ocs_init_stats and ocs_report_stats should be used to collect tape statistics on this operation, regardless whether OCS is used for tape mounts, and that OCS be consulted about whether tape drives are useable.
This option affects: fmb_backup [see 7.2]. fmb_restore [see 7.8]. fmb_set [see 7.11].
This lets you define a particular volume as being a partial backup (it affects the next file tree mentioned). This means you can have several full backups and one or two partials on the same tape, for example.
This sets the number of tries fmb_backup will retry in the face
of archive or tape write errors.
This option affects:
fmb_backup [see 7.2].
This option specifies the archive tool to use to create the archive files in the backup. On restores this option will be overridden by the archive format[see 2.2] written in the tape header. This sets the arch_format shell environment variable. The default is "cpio". Currently "dump", "cpio", "tar", and "gnutar" can be specified. This option only affects fmb_backup [see 7.2] and fmb_cp [see 7.12]. fmb_toc [see 7.7] and fmb_restore [see 7.8] set it internally based on the tape label on the tape.
This option specifies that a file named .fmb_extract
be added to each directory before backing it up, and removed
afterwords.
This only applies to fmb_backup.
This option specifies that fmb_extract be called when the
backup completes, and before unmounting the tape.
It implies -W (see 8.11), so that there will be
stampfiles on the tape to be extracted.
This only applies to fmb_backup.
This option specifies the size of blocks to be written to the output tape drive. On restores this option is overridden by the blocksize written on the tape label [see 2.8]. This sets the blk shell environment variable. The blocksize may be any notation acceptable to the dd command (i.e. 1k to specify 1024 bytes). This option only affects fmb_backup [see 7.2] and fmb_cp [see 7.12]. fmb_toc [see 7.7] and fmb_restore [see 7.8] set it based on the tape label [see 2.8] on the tape
This option specifies the day name for construction of tape label [see 2.8]s. The default for backups is the current day from the roation scheme. This sets the day environment variable, which is used to build the label environment variable if neccesary. This option only affects fmb_backup [see 7.2] and fmb_verify [see 7.13], if "-L" isn't set.
This option executes a command, whose output is substituted into the command line as options. This was done because putting grave-quoted strings in command files doesn't work as expected. This option works on all fmb commands. See the discussion of precedence in the precedence of options section.
This option specifies a file containing command line options. The options in the file are inserted into the argument list at this point. The file may contain newlines an spaces to facilitate easier reading, and comments delimited by '#' and end of line. The file can be a full pathname, or a plain file name, which will be looked for in the fmb_files sub-directory in the backup product directory. This option works on all fmb commands. See the discussion of precedence in the precedence of options section.
This option specifies the host name for construction of tape label [see 2.8]s. The default for backups is the hostname on which the script is invoked. This sets the host shell variable which is used to build the label environment variable if neccesary. This option is used by fmb_backup [see 7.2], fmb_verify [see 7.13], and fmb_prelabel [see 7.10] via the host environment variable.
This option tells fmb to keep the tape in the drive at the end of the operation, rather than unloading it, which is the default. fmb_toc [see 7.7] turns on -k when "manual" or "quiet" mounts are being used. This affects all fmb commands that use tapes (i.e. everything except fmb_max, fmb_cp [see 7.12], fmb_find [see 7.5], etc.) This option can be overridden by specifying "-k".
This sets the log directory to keep the record of what files are backed up on which tape, as well as where to find that log if needed.
This option sets the log shell environment variable. It is used by fmb_backup [see 7.2] and fmb_find [see 7.5]. It can be overridden by using -l /dev/null
This option specifies the mechanism to be used to request that a tape be placed in the tapedrive. This sets the mount_type shell environment variable, and specifies a mount script name. Mount types included in the currrent release are:
The mount type may take an argument (as with juke) to specify which jukebox, opcom host, etc. to use. This is specified like:
# fmb_backup -m "juke sg01" ...
# fmb_backup -m "opcom fndcd" ...
The "juke" mount type always requires a jukebox name argument. (see DCD Release Note 39 for more information on the "juke" package).
This affects all fmb commands that use tapes (i.e. everything except fmb_max, fmb_cp [see 7.12], fmb_find [see 7.5], etc.)
This option specifies a program that error messages are to be piped through. This could be a command that inserted formatting strings to make a printer print in highlight mode, or make a terminal print inverse video, etc. Another common use is the fmb_mail script, which mails the error to a specified user, but also sends it to standard output so it still ends up in the backup output. It is possible to put a pipeline of several commands, like:
# fmb_backup -n "tee -a /local/logfile | fmb_mail fred" ...
The default is "/bin/cat". fmb_backup [see 7.2], fmb_restore [see 7.8] and fmb_toc [see 7.7] use this command.
Requests that a partial backup be performed, rather than a full backup. This means a backup of all the files in the specified file tree [see 2.5] newer than the last full backup. Some archive programs (e.g. tar) don't know how to do partial backups, and will ignore this option. This option sets the partial environment variable to true rather than the default false. Note that the cpio archive type scripts maintain the "last backup" information by creating the file ".lastfull" in the directory being backed up. This option can be overridden with "-p". Only fmb_backup [see 7.2] and fmb_cp [see 7.12] pay attention to this option.
Specifies the rotation scheme [see 2.7] for tape label [see 2.8]s to be used. Sets the rotation shell environment variable, which specifies a rotation module name. Currently the following rotation schemes are available:
$FTT_DIR/ftt_label/table/tablefile, and has
a line beginning with SPMquot#sets" which provides
column headings, and then lines with the date in
month/day/year format in the first column, and tape
labels in successive column, one for each set listed
on the SPMquot#sets" line, respectively.
Other lines beginning with SPMquot#" are ignored.
A sample table looks like:
#sets A B C #dates -------------- 10/03/1996 tape01 tape02 tape03 10/04/1996 tape04 tape05 tape06 10/05/1996 tape07 tape08 tape07 10/06/1996 tape10 tape11 tape12
#LabelErrsUsesAllocHostSet #------------ tape003440dcdsv0B tape002070dcdsv0A tape001080dcdsv0A tape004180dcdsv0A tape000080dcdsv0A
Specifies the set name for the tape label [see 2.8]. Sets the set environment variable, which is used to build the label environment variable if necessary. This option is used by fmb_backup [see 7.2], fmb_verify [see 7.13], and fmb_prelabel [see 7.10], if "-L" isn't set.
This option specifies the backup device to write the backup to, or read the backup from. The drive can be in the format user@host:path to specify that an rsh host -l user command be executed to refer to the drive, or as host:path to specify an rsh host command, or simply as path to refer to a tape drive on the current system. using this option sets several shell environment variables for the various scripts:
This affects all fmb commands that use tapes (i.e. everything except fmb_max [see 7.6], fmb_cp [see 7.12], fmb_find [see 7.5], etc.)
This option says that the tape to be backed up onto is unlabeled, and that a backup should be written on it anyway (i.e. it forces the normal check for a valid tape label [see 2.8] to pass.) This option is not recommended for unattended backups. It sets the unlabeled shell environment variable to the value true instead of the default false.
This option can be overridden with "-u". This affects fmb_backup [see 7.2], and fmb_verify [see 7.13].
Verbose mode, says that file names should be printed as they are archived, and that full archive listings should be given on the fmb_toc [see 7.7] command. Sets the verbose shell environment variable to the value true instead of the default false.
This option can be overridden with "-v". This affects fmb_backup [see 7.2], fmb_toc [see 7.7], and fmb_restore [see 7.8].
This specifies a directory to keep verbose logs in. Verbose logs are files with tape-label filenames containing full lists of files backed up. The logfiles are often compressed.
This option can be overridden with -V "" This affects fmb_backup [see 7.2], and fmb_find [see 7.5].
Says to put files where they came from on restores, rather than under the current directory.
This option can be overridden with "-w". This affects fmb_restore [see 7.8].
Requests that mount points not be crossed when doing the backup. Some archive modules (e.g. tar) ignore this option, while others (e.g. dump) require it. This option sets the nomount shell environment variable to the value true instead of the default false.
This option can be overridden with "-x". This affects fmb_backup [see 7.2].
These arguments specify either pathnames of file tree [see 2.5]s to be backed up, or a file or files to be restored. They can be specified as host:path or user@host:path to refer to remote hosts, and to force access to the remote host as a particular user. These arguments are collected up into a single environment variable named path_list, but are also split up into:
This affects all the fmb commands, except fmb_verify [see 7.13], and specifies directories/files to be backed up or restored, or archives to give tables of contents of.
Options are read left to right, with options further along overriding preceding ones. For example fmb_backup -f file -L mylabel [see 7.2] will do the backup as specified in the file file, with the exception that the label mylabel will be used for the tape label [see 2.8]. Options set by the fmb_options [see 7.9] command are seen before (i.e. to the left of) any command-line option [see 8.19]s. Any option specified to an fmb program will override defaults set by fmb_options [see 7.9].
In the backup product directory, there are numerous scripts that are called by the command scripts users and administrators normally use. They rely on the environment variables mentioned in the Options section of this document to operate, and often will not work if run directly from the command line.
The pack script for a given archive type, it uses the arch_rsh and arch_path variables to build an archive that it presents on its standard output. It should, when possible, pay attention to the nomount and partial environment variables.
The unpack script for a given archive type, it takes a pattern list as arguments describing the files to restore, and unpacks them in the current directory from the archive on its standard input.
The toc script for a given archive format[see 2.2]: it reads an archive on stdin, and generates a table of contents on stdout.
This script reads and checks the label file from the current tape using the tape_rsh, tape_mt, tape_path, and label environment variables. It takes an optional -f file argument to specify a file into which to copy the tape label [see 2.8] so that information may be read from the label file. It succeeds if the label on the tape matches label, or if label is the empty string, or if the unlabelled environment variable is set.
This directory contains shell text files setting the default values of the various environment variables set by the command line arguments on a given host. These files are named for the host they refer to, updated by the fmb_options [see 7.9] command and sourced by all of the user executed commands.
The script to get today's name for a given rotation scheme [see 2.7]; it prints today's label on stdout.
The script to get all day names for a given rotation scheme [see 2.7]; it prints the list on stdout.
The script for a given mount type, it mounts the tape specified by the label environment variable on the tape_path tape drive. With the -u option, it unmounts that tape.
A common script for parsing command line options for all of the Fermi Modular Backup commands.
A script that generates a properly formatted tape label [see 2.8] on stdout.

DCD Design Note 38.12 PU0164
Fermi Modular Backup System Users Guide
This document was generated using the LaTeX2HTML translator Version 96.1-h (September 30, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html fmbuser.
The translation was initiated by Marc Mengel on Fri Aug 8 15:09:20 CDT 1997