Disk cloning

Renaud MICHEL renaud.michel.defimedia at gmail.com
Tue Jan 20 06:09:47 CST 2009


Le mardi 20 janvier 2009 à 12:48, Dimitri Yioulos a écrit :
> I understand about disk consistency but, really, the system can't be
> brought down for any length of time, and there's no one available at the
> colo to do tasks like inserting CDs or DVDs.  so, most everything has to
> be done remotely on a live system.  The job could be done during
> s0-called "quiet time", say 3:00AM.

The rule is: never use dd on a live system, rsync is what you are looking 
for. And it will be possible to change the partitions type/size/mount 
point.

Create the needed partitions on the second disk, format them.
Mount the root on some directory, let's say /mnt/newroot, create there 
directories for the other partitions (if needed, for 
example /mnt/newroot/home) and mount them.
Then use rsync to synchronize the current system:
 
rsync -aH --exclude='/mnt/*' --exclude='/proc/*' --exclude='/sys/*' / /mnt/newroot/

(you may want to add other exclude paterns for some specific locations)
Note that if you have some database running on that server youy probably 
need to exclude its data folder/files from rsync and backup/restore it with 
dedicated software.

The good thing with rsync is that if you need to synchronize it again it 
will only copy the files that changed.

Note that you still need to copy (or recheate) the MBR on the second disk.

-- 
Renaud MICHEL
defimedia S.A.



More information about the Linux-PowerEdge mailing list