4.2BSD restore(8)

Dave Martindale dave at onfcanim.UUCP
Sun May 11 00:34:21 AEST 1986


In article <27300011 at convex> berliner at convex.UUCP writes:
>
>Ah, now I see.  So all this trauma over the need to make level 0 dumps after
>a full filesystem restore only applies to the "restore r" operation and not
>the the "restore x" (or "restore i" for that matter) operation!  With
>4.2BSD, there is (in my opinion) virtually no need to do "restore r" to
>restore a file system -- I just run newfs and do "restore x".  Yes, I get a
>new I-list, but who cares.  The end result is the same, is it not?

No.  Suppose I have just restored a filesystem from tape (because I had
a head crash) and this filesystem contains files A, B, and C. It also
contains D and E, which are two links to the same file.  Instead of
doing a level 0 dump, I just edit /etc/dumpdates. 

Then I edit file A, delete file B, and mv file C to F then edit it.  I
also delete E, leaving D as the sole link to the file, then create a new
file named E. Now, I have files called A, D, E, and F. I do an
incremental dump, and a good thing too, because I have another head
crash that night. 

When I restore from the old level 0 dump, I get back A, B, C and D/E
again.  Then doing a restore x from the incremental extracts A, D, E,
and F. Unfortunately, this isn't the state of the filesystem as of the
crash - the file B is still there, and I thought I had deleted it.  And
so is C, which looks like an old copy of F.

Worst of all, D and E are still links to the same file, and now,
depending on the order of extraction from the tape, it contains what
either D or E should contain.  So, to me, it appears that either D
contains what should be (and is) in E, or E contains what should be in D.
The contents of one of these files is gone!  (It's still on the tape,
so if I happen to notice the problem and figure out what happened,
I can delete the incorrect file and re-extract it from the tape.
But I don't read every one of my files to check them after a restore,
so I don't notice the problem until 6 months later and by then the
tape has been reused.)

This sort of problem has occurred everywhere in that filesystem, not
just my own directory.  My users are either seen wandering the halls
muttering to themselves about their faulty memories, or waiting in line
to yell at me. 

In future, I take the time to do a new level 0 dump, which allows me to
do a "restore r" on the incremental, and everything *is* restored
correctly after our next crash. 


For me, the few extra hours required to do the level 0 dump after a
full restore (after all, how often do disks crash or their contents
get destroyed?) is *well* worth it to avoid the trauma of all users
trying to sort out their files after a restore.

Now, a question for system V administrators out there:  Doesn't cpio
suffer from exactly the same problems described above if it is used
for incremental saves?

	Dave Martindale



More information about the Comp.unix.wizards mailing list