home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / admin / 6248 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.9 KB

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