<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
-------- Original MessageĀ  --------<br>
Subject: Re: [CentOS] Copy OS live to different hardware<br>
From: Les Mikesell <a class="moz-txt-link-rfc2396E" href="mailto:lesmikesell@gmail.com"><lesmikesell@gmail.com></a><br>
To: CentOS mailing list <a class="moz-txt-link-rfc2396E" href="mailto:centos@centos.org"><centos@centos.org></a><br>
Date: Monday, October 12, 2009 9:48:32 AM<br>
<blockquote cite="mid:4AD341C0.7000305@gmail.com" type="cite">
  <pre wrap="">Bob Puff wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hello,

I've got some CentOS 5.3 servers that I want to clone to a backup server,
possibly a VM machine.  I want this to be done while the server is up, and
keep it synced at least once a day.

I've done this already by using RSYNC, but here's the twist: the backup
machine could be different hardware, and needs to have a different IP address
(so they don't conflict).

My question: exactly what files should I exclude, so that I copy everything
-except- what pertains to the ethernet card(s), and hard drive mounts.  I know
of at least:

/etc/fstab
/etc/sysconfig/network-scripts/*
/var/run
/proc

But what else?  The original servers may have software raid, so those files
can't be copied either.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
/dev, /sys and /boot - but it is a good idea to use rsync's 
--one-file-system option and explicitly copy the filesystems you want. 
Also, if you are changing files underneath running applications, expect 
some wierd things to happen.  It would be safer to plan to reboot the 
backup if you ever need to activate it - and if you do that you could 
have it running from a different root for the copies.

  </pre>
</blockquote>
<br>
I think you'll have better luck if you virtualize the hardware on the
production machine first. With virtualized hardware you don't need to
worry so much about potential differences with RAID, NICs, etc - just
shut down the existing instance of the VM and bring up the new one. Xen
has a tool to do exactly what you are asking - clone a live VM. Most
other VM technologies have a cloning feature, but only support cloning
of a VM that has been shut down first.<br>
<br>
</body>
</html>