Restoring system from tape backup (how ?)

Bill.Stewart wcs at ho95e.ATT.COM
Sun Feb 14 10:30:24 AEST 1988


In article <476 at wa3wbu.UUCP> john at wa3wbu.UUCP (John Gayman) writes:
:So I did a total system backup via cpio like so:
:find . -depth -type f -print | cpio -ocv > /dev/mt/rmt0
: [.....]  So I restore the files with this:
:cpio -icvdum < /dev/mt/rmt0
: [...] 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 [ ... ] And....... I notice CPIO does not backup special files

The find option "-type f" means "only tell me about regular files".
So it did.  So cpio was never told the names of directories or special
files, so it didn't output them to the tape.  When you unpacked the
tape with cpio, the "-d" option allowed it to make any directories it
needed, and it made them with default permissions since there wasn't
anything on the tape telling it what you *really* wanted.  Presumably
when you unpacked the tape, you were root, with umask 022?

As for "how do I repair the situation now?", I'm afraid you may be out
of luck; you didn't save that information on the tape, so you lost it
when you reorganized the disk.   A recovery technique that sometimes
helps is to do
	find . -type d >/tmp/junk
and edit /tmp/junk into a shell script that will fix things
	g/fred/s/^/chown fred /
It won't do the special files for you , but it's better than nothing.
-- 
#				Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs



More information about the Comp.unix.questions mailing list