[WBEL-users] How can I cloning a freshly tweaked system?

John Morris jmorris@beau.org
Tue, 14 Dec 2004 13:26:08 -0600 (CST)


On Tue, 14 Dec 2004, Andrew Vong wrote:

> Rather than reformat, reinstall, configure and re-tweak the system which 
> could take me a good couple of weeks or so, can I somehow make a clone of 
> the HDD of a freshly installed and fully tweaked & optimized WBEL server? 
> Then store the clone/image somewhere else. That way, when disaster strikes, 
> I can just duplicate the clone back onto a new HDD slot it back into the 
> server, copy latest backed-up /home files into it and I'll be up and 
> running again.

You can often get away with just doing cp -ax on a running machine to
clone but I prefer to boot from a rescue disc and do it from there so that
I get a snapshot of a machine in a known stable state.  Just hook up an
extra drive (either pop the case and hook to the internal chain or use a
USB2 drive) of equal or greater size, partition it the same and then just
do "cp -ax" to copy all of the partitions.  Making the spare bootable is 
possible but a more advanced topic and not really required.  Come the day 
you need to drop the spare in you will find it easier to make it bootable 
since it will then be in the right spot.

If you ever decide to clone to make more machines, as in a rack of servers
or for workstations, you do need to twiddle the ethernet config in
/etc/sysconfig/network-scripts/ifcfg-eth0 to remove the MAC address.  RH
has it rigged so you can swap out an ethernet card and the system will
keep it's original MAC, which is handy in a DHCP environment and all hoopy
if you are doing things the RH way, i.e. using kickstart to make lots of
identical systems, but you will lose if you clone a machine because you 
get two boxes using the same MAC.

-- 
John M.      http://www.beau.org/~jmorris        This post is 100% M$ Free!
Geekcode 3.1:GCS C+++ UL++++$ P++ L+++ W++ w--- Y++ b++ 5+++ R tv- e* r