[K12OSN] Server Clone

Paul Pianta pantz at lqt.ca
Wed Jun 2 18:20:03 UTC 2004


Jim Kronebusch wrote:

> 
>  
>
>>On the rsync topic - when you boot the new server with a 
>>knoppix cd - do 
>>you see the raid-enabled sda?
>>If so - have you tried this :
>>1. partition disk with fdisk - setting up partitions the same as the 
>>original machine except home is smaller IIRC ...
>>2. mkfs.ext3 /dev/sda1
>>3. mkfs.ext3 /dev/sda2
>>4. swapon /dev/sdX (not sure you need this step)
>>5. mkdir /tmp/newroot
>>6. mkdir /tmp/newroot/boot
>>7. mount /dev/sda2 /tmp/newroot
>>8. mount /dev/sda1 /tmp/newroot/boot
>>9. run the rsync command which syncs original /boot to 
>>/tmp/newroot/boot 10. run the rsync command which syncs 
>>original / to /tmp/newroot 11. chroot /tmp/newroot 12. 
>>grub-install /dev/sda 13. reboot
>>    
>>
>
>What would be the syntax you would use to rsync the 2 machines?  There
>are a lot of switches and suggestion in Google.  I assume I would issue
>the rsync command from the Knoppix booted machine?
>
Here is the syntax I use in a script I have:

rsync -avzL -e "ssh -i /root/.ssh/id_rsa" --delete --stats 
/data/updates/ root at remotehost:/home/yum-repository/redhat/updates/

But for you this would mean syncing FROM the original TO the new 
machine. That means running the rsync command on the 'original' and 
finding out the ip of the knoppix-booted 'new' machine (I'm not sure 
about password for knoppix root either ...). Also note that the tailing 
slashes in both paths are important. If the source path ends in a slash 
- it copies the contents of the directory, if it doesn't end in a slash 
- it will copy the directory.

I'm sure there is a way to reverse my rsync command so you can run it 
from the knoppix machine (maybe just switch source/destination order?) 
but i will leave that to you if you're interested ...

>Right now I am trying a different approach (and it feels sloppy), I
>loaded a minimal install of WBEL, booted the machine up and logged in as
>root, then issued "rsync -a -e ssh root at masterserver:/ /" and it is
>chuggin away.  But I have a feeling this will just turn up crap :-)
>  
>
Mmm, not sure how it will go replacing your / partition when you are 
currently in it running commands?? Let us know ...

pantz

-- 
Before you criticize someone, walk a mile in their shoes ...
That way when you do criticize them, you're a mile away and you have their shoes!





More information about the K12OSN mailing list