ugh.book

(singke) #1
Disk Partitions and Backups 233

Putting data on backup tapes is only half the job. For getting it back, Berke-
ley Unix blesses us with its restore program. Restore has a wonderful
interactive mode that lets you chdir around a phantom file system and tag
the files you want retrieved, then type a magic command to set the tapes
spinning. But if you want to restore the files from the command line, like a
real Unix guru, beware.


Date: Thu, 30 May 91 18:35:57 PDT
From: Gumby Vinayak Wallace <[email protected]>
To: UNIX-HATERS
Subject: Unix’s Berkeley FFS

Have you ever had the misfortune of trying to retrieve a file from
backup? Apart from being slow and painful, someone here discov-
ered to his misfortune that a wildcard, when passed to the restore pro-
gram, retrieves only the first file it matches, not every matching file!

But maybe that’s considered featureful “minimalism” for a file sys-
tem without backup bits.

More Sticky Tape


Suppose that you wanted to copy a 500-page document. You want a perfect
copy, so you buy a new ream of paper, and copy the document one page at
a time, making sure each page is perfect. What do you do if you find a page
with a smudge? If you have more intelligence than a bowling ball, you
recopy the page and continue. If you are Unix, you give up completely, buy
a new ream of paper, and start over. No kidding. Even if the document is
500 pages long, and you've successfully copied the first 499 pages.


Unix uses magnetic tape to make copies of its disks, not paper, but the
analogy is extremely apt. Occasionally, there will be a small imperfection
on a tape that can't be written on. Sometimes Unix discovers this after
spending a few hours to dump 2 gigabytes. Unix happily reports the bad
spot, asks you to replace the tape with a new one, destroy the evil tape, and
start over. Yep, Unix considers an entire tape unusable if it can’t write on
one inch of it. Other, more robust operating systems, can use these “bad”
tapes. They skip over the bad spot when they reach it and continue. The
Unix way translates into lost time and money.


Unix names a tape many ways. You might think that something as simple
as /dev/tape would be used. Not a chance in the Berkeley version of Unix.
It encodes specific parameters of tape drives into the name of the device
specifier. Instead of a single name like “tape,” Unix uses a different name

Free download pdf