Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!jgaltstl!terry From: terry@jgaltstl.UUCP (terry linhardt) Newsgroups: comp.unix.questions Subject: Re: Tape backups and Disk management Summary: restoring the files with cpio Message-ID: <216@jgaltstl.UUCP> Date: 27 Feb 90 04:46:57 GMT References: <9782@batcomputer.tn.cornell.edu> <876@pmday_2.Dayton.NCR.COM> Organization: The Lafayette Group, St. Louis, MO. Lines: 28 In article <876@pmday_2.Dayton.NCR.COM>, steve@pmday_2.Dayton.NCR.COM (Steve Bridges) writes: | When our file systems get really fragmented, we backup up the file | system with cpio to an 8mm tape drive (it can hold up to 2GB) with | cpio using the following commands, e.g. | | cd /usr/acct | find . -print | cpio -ocvB > /dev/rmt/64yy | | Then after the backup is done | | cd /usr/acct (THIS IS A MOST IMPORTANT STEP) | rm -r * | cpio -idmuvcB < /dev/rmt/64yy | | This will put it all back on disk, unfragemented. Actually, I don't believe this is necessarily correct. The method in which Unix (at least System V) reuses blocks is on a 'last one used, first one reused' basis. Therefore, when the files are restored from tape, they may *still* be fragmented. In the above example, if /usr/acct is an entire file system, one could remake their file system with mkfs and then restore the files. As an alternative, one could do an fsck on an unmounted file system with the -s option and then restore the files. -- |---------------------------------------------------------------------| | Terry Linhardt The Lafayette Group uunet!jgaltstl!terry | |---------------------------------------------------------------------|