Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have 2 server one is old server like 4 year old other one is just brought both the hardware is similar, on the old server we using centos 4.5 last 1900days old server is not rebooted.

Now we want to make clone without reboot old server (oldserver = serverone)all production data is there on serverone with that we wanted to clone.

We had work around like as follow:-


tar cfl /boot /tmp/boot.tar
tar cfl /(root) /tmp/root.tar
tar cfl /data /tmp/data.tar

SERVERTWO as rescue mode using 1st cd of centos

fdisk -l /dev/sda

creating new partition

/dev/sda1 * /boot 300MB (same as serverone)
/dev/sda2   <swap> 2G
/dev/sda3   /  

fdisk -l /dev/sdb

creating new paration

/dev/sdb1   /data

mkfs.ext3 /dev/sda1
mkfs.ext3 /dev/sda3
mksf.ext3 /dev/sdb1
mkswap /dev/sdb2


cd /dev/sda1
scp root@serverone:/tmp/boot.tar .

cd /dev/sda3
scp root@serverone:/tmp/root.tar .

cd /dev/sdb1
scp root@serverone:/tmp/data.tar .

cd /dev/sda1
tar xf boot.tar

cd /dev/sda3
tar xf root.tar

cd /dev/sdb1
tar xf data.tar

chroot /mnt/root


please help me if you any suggestion for above work around or any tools which make .iso of live and we can use on servertwo.

share|improve this question

If you back up your data like this and processes are still writing to disk files, you'll risk inconsistencies (files not archived since they were written/changed after the tar run has already completed the directory).

To avoid this, you should make sure that nothing is writing to your disks. To do that in turn, you would need to end all processes having open write handles on your filesystems (lsof /mountpoint | egrep '[0-9]+[wu]' will be of help here) and remount the filesystems read-only (mount -o remount,rw /mountpoint). At this occasion, you might want to run fsck /mountpoint to check fpr filesystem errors. After that, you could simply use dd to make a byte-for-byte clone.

This way you would avoid a reboot, but nontheless you would have downtime for all meaningful services on that server.

share|improve this answer

If they really are the same, why not just boot up the new box from CD, mount the physical partitions somewhere and rsync the data across.

Note that regardless of which route you take you'll still need to perform a cleanup afterwards, i.e.

  • truncate the mtab

  • install the bootloader

  • check the fstab naming schema matches (i.e. uses same device files or change disk ids)

  • change the hostname/ip if applcable

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.