Tape backups and Disk management

terry linhardt terry at jgaltstl.UUCP
Tue Feb 27 15:46:57 AEST 1990


In article <876 at pmday_2.Dayton.NCR.COM>, steve at 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  | 
|---------------------------------------------------------------------|



More information about the Comp.unix.questions mailing list