Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!ho95e!wcs From: wcs@ho95e.ATT.COM (Bill.Stewart) Newsgroups: comp.unix.questions Subject: Re: Restoring system from tape backup (how ?) Message-ID: <1980@ho95e.ATT.COM> Date: 14 Feb 88 00:30:24 GMT References: <476@wa3wbu.UUCP> Reply-To: wcs@ho95e.UUCP (46323-Bill.Stewart,2G218,x0705,) Organization: AT&T Bell Labs 46133, Holmdel, NJ Lines: 28 In article <476@wa3wbu.UUCP> john@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