Restoring system from tape backup (how ?)

Wolf Paul wnp at killer.UUCP
Wed Feb 3 02:13:47 AEST 1988


In article <476 at wa3wbu.UUCP> john at wa3wbu.UUCP (John Gayman) writes:
> ...
>find . -depth -type f -print | cpio -ocv > /dev/mt/rmt0
> ...
>cpio -icvdum < /dev/mt/rmt0
> ...
>    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 

I can see a number of things which could have gone wrong. The first is
that in your find command line you specifically told find to list only
ordinary files (-type f), which excludes empty directories and special files.
Thus, only ordinary files and directories containing them were backed up.

Secondly, I think you need to first extract /etc/passwd so that there are
entries in it for the user id's contained in your archive. Otherwise, 
they get reset to the id of the user doing the restore, i.e. root, since 
it would not make sense to have files owned by non-existent users.

Finally, the permissions on the restored files depend on who does the RESTORE,
not on who does the BACKUP.

I have done numerous backups and restores with Microport CPIO, and I found
that both ownership and permissions were maintained, so I don't think there
is a bug in the program. The "installit" procedure uses cpio, so since it
creates files owned by bin, uucp, etc, there is proof that it works ...

Check the things I listed above, and let me know how it goes.

Wolf Paul
ihnp4!killer!wnp



More information about the Comp.unix.questions mailing list