cloning drive

D. Michael McIntyre michael.mcintyre at rosegardenmusic.com
Fri Jul 6 05:21:15 UTC 2007


On Thursday 05 July 2007, Tim M wrote:

> using -R do just what you were writing about in your last paragraph? I see
> I need to learn a LOT MORE! Thanks for the link and the interesting
> discussion.

-a includes -R, and if you try a simple copy it will recurse.  I can't 
remember exactly how I handled this last time.  I guess what I probably did 
was copy the directories in / one by one, omitting /mnt entirely (or wherever 
I had my new hard drive mounted up temporarily.)

That seems right.

bin/   cdrom@  etc/   initrd/      initrd.img.old@  lost+found/  mnt/  proc/  
sbin/  sys/  usr/  vmlinuz@
boot/  dev/    home/  initrd.img@  lib/             media/       opt/  root/  
srv/   tmp/  var/  vmlinuz.old@

mount -t ext3 /dev/hd_foo1 /mnt/new/root
mount -t ext3 /dev/hd_foo2 /mnt/new/var
mount -t ext3 /dev/hd_foo3 /mnt/new_root/home
for f in bin etc intrd sbin sys usr boot dev home lib media opt root srv tmp 
var do;cp -a blah foo;done

Or something.

I seem to recall just creating an empty /mnt and /media and /proc 
under /mnt/new_root, and going directory by directory in order to avoid the 
recursion issue.

Or something.  I've still only managed to waste 54% of my current 300 GB, so I 
haven't had to do this in a couple three years.

Another thing to play with is rsync.  There's some way to tell rsync to avoid 
recursion, but I'm way too tired to look at the man page at the moment.
-- 
D. Michael McIntyre 




More information about the kubuntu-users mailing list