I had a problem this past weekend when restoring my system from tape.
Heres the scenerio:
I'm running Microport 2.3U and have an Everex external 60MB tape drive.
I wanted to re-do my file systems and change a few partition sizes around.
So I did a total system backup via cpio like so:
find . -depth -type f -print | cpio -ocv > /dev/mt/rmt0
It proceeds with the backup as per usual. After this, I boot from my
boot.floppy and re-run fdisk and divvy and re-create the file systems. I
then reload runtime.1 & runtime.2 which loads just enough to boot back from
the hard disk. I boot from the hard disk. At this point the system has
virtually nothing on it, just enough restored from release media to enable
the restore from tape (this ok?). So I restore the files with this:
cpio -icvdum < /dev/mt/rmt0
And away it goes. I have switches to cpio set to create directory if
needed, copy even if exsisting file is older, and preserve previous file
modification times. All appears well. Now the problems start!!
Upon rebooting the system after the restore I find News wont work,
LP spooler wont work and I cant even write files to my own home directory.
The problem is that during the restore, every directory that cpio needed
to create was created with a permissions of 755 and an owner ROOT, group
SYS (not the permissions, owner, group of the original directory). This
wreaked havok with News. Also, directories that were empty were omitted
entirely. This caused problems with LP where /lp/class and /lp/requests
are usually empty. And....... I notice CPIO does not backup special files
like the ones in /dev, etc.
Question: How can I get cpio to backup special files as well as
regular files ? What went wrong with the directory creation ? I read in the
docs that as long as super-user did the backup, the restored directories
should have the same permissions as when backed up. And... what needs to
be done to enable empty directories to be re-created with the proper
permissions. Is what happened to me a problem with Microport CPIO or
is there some procedure Im not following for backup/restore ? Im
basically interested in being able to restore a blank disk back to the
running configuration. Any help/suggestions are appreciated!
John Gayman, WA3WBU | UUCP: uunet!wa3wbu!john