home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!spool.mu.edu!sgiblab!munnari.oz.au!metro!otc!bag_end!panissec
- From: panissec@nms.otca.oz.au (Colin Panisset)
- Newsgroups: comp.unix.admin
- Subject: Re: Fastest way to transfer whole filesystems?
- Message-ID: <panissec.722053148@bag_end>
- Date: 18 Nov 92 02:19:08 GMT
- References: <40335@unix.SRI.COM> <1992Nov16.064402.9186@cssc-syd.tansu.com.au>
- Sender: news@otc.otca.oz
- Lines: 39
-
- rodney@cssc-syd.tansu.com.au (Rodney Campbell) writes:
-
- }cole@unix.SRI.COM (Susan Cole) writes:
-
- }>What's the fastest way to transfer an entire filesystem from one
- }>disk partition to another (different type disk, larger partition)?
- }>I thought that a tar would be much faster than a dump and restore
- }>from tape, but when I tried it, using a command like:
-
- }> tar cf - . | ( cd /otherfs; tar xpf - )
-
- }If you are moving files on the same machine then you can use the simple
- }version of cpio. Try something like:
-
- }% cd sourcedir
- }% find . -depth -print | cpio -pdmv destdir
-
- }This will make a nice duplicate of the filesystem within sourcedir at the
- }destdir location, symlinks, permissions, ownerships and all.
-
- You will find, however, that this creates a duplicate filesystem that actually
- uses more space than did the original. This is due to the block allocation
- methods used when tar and cpio both do their restore.
-
- Instead, use dump & restore - you'll get an exact duplicate of the original,
- inode for inode - and with the same degree of fragmentation as the original.
-
- Try:
-
- # dump 0bf 5000 - /origfs | (cd /otherfs ; restore xf -)
-
- "b 5000" gives you a blocking factor of 5000, which gives quite acceptable
- performance for this sort of thing.
-
- --
-
- -Colin Panisset *:^) | "CTBCPP (Clay Tablet By
- {panissec|colinp}@nms.otca.oz.au | Carrier Pigeon Protocol),
- So There. | defined in RFC-39127"
-