> > >  > From: steve rader
 > > >  >  - (cd /master; tar -cf - .) | (cd /slave; tar -xpf -)

 > > Net Llama! <[EMAIL PROTECTED]> wrote:
 > > It should be faster with dd:
 > > dd if=/dev/sda7 of=/dev/sdb1 bs=1024

 > From: Roger Oberholtzer
 > You should not use tar as it is bad about special files. There is a specif
 > ic
 > mode of cpio designed to do this right. It would be my choice. The syntax
 > (also in the cpio info docs) is:
 > 
 >      mkdir /slave
 >      cd /master
 >      find . -depth -print0 | cpio --null -pvd /slave
 > 
 > All files will be made proper in dest. tar does not make all types of file
 > s.
 > 
 > To make it less wordy, I replace the -v option to cpio with -V
 > 
 > The -print0 and -null options work together to allow file names that even
 > contain newline or other unexpected characters.

Also, here's one more reason to avoid tar: it has a 100 char
max file name length restriction.  I suspect cpio and certainly
dd don't have that problem.

(A few years ago when I first put together my cloning stuff,
dd was failing and I was in a hurry to get cloning going, so I
just used/scripted tar|tar.  Yesterday I realised that telling
fdisk to make "2048M" partitions doesn't always end up creating
parititions with 2097152 1K blocks.  Da.  Variable cylinder
sizes mean slightly variable 2 GB partitions or somesuch?
At any rate, my master has 2055 MB partitions and my slave
destination partitions where 2048 MB.)

steve
- - -

_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to