Clone Server to New Hardware
I have a older Gentoo qmail server that is dying from the rapid growth of our email requirements. We are eventually migration to a brand new Exchange Server (different story). But in the mean time (4 more months) I need to get the current system stable. We are getting lots of hard drive issues and the server is unable to handle the SPAM/AV scanning it's doing.
What I would like to do is clone the system over a new server (more RAM, faster CPU). My question is: What is the best way to handle this? I am not worried about trying to adjust partition sizes so I was planning on using dd and plug the clone into the new server and see what happens. Is there a chance this will actually work? Or are the major hardware changes going to wreak havoc on the server? Any suggestions would be appreciated. Thanks, David |
That all depends on what type of hard disk you have and what hard disk controller.
I have in the past put a second hard disk into an ide machine and ran: cat /dev/hda > /dev/hdb This clones all partitions and makes an exact copy. You will of course need to do some modifications to the drive if you plan on using additional space in the event of a bigger drive. With scsi disks that do not share the same controller you may need to boot to rescue and load a driver and then build a new initrd image. |
The current server has an IDE hard drive. The new server has a SATA hard drive. No RAID controllers involved.
|
Quote:
|
if all you want is to clone the hda disk to the hdb you can use "dd", just be sure both hard drives are unmount.
dd if=/dev/hda of=/dev/hdb |
Quote:
Okay with that being said. I want to make sure I understand. I scenario I would like to work on tonight maybe you can lead me there. I have this one Centos box with only a 250GB hard drive in it. It's a low end P4. I have built a new server that doesn't have an O/S yet since I want the one I am now duplicated. If the source PC has only one drive, how do I unmount them and do the copy? It will go from the 250GB to a 500GB. |
ok, let me try to explain this a little more,
1.- you need to install both HD in the same machine. 2.- boot your machine with a live CD ( I like knoppix). 3.- open a shell session 4.- you can use the fdisk -l to see the disks 5.- ensure both drives are unmount. 6.- then use dd if=/dev/hda off=/dev/hdb be really careful because the dd = disk destoyer I use this only with disk to disk clone. |
Quote:
Okay got ya. Is there any problem going from a smaller drive to a larger for any reason? |
no I do that a lot of times, but the dd is a exactly copy of the old drive so if you want to use the remain space in the disk you need to create a new partition in the unused space
|
When I needed to move my ext3 partition and resize it I used "dd" to backup and restore the partition. Then got it to recognize the new partition size with "resize2fs". No need to create an additional partition to use the new disk size.
--Bryan |
All times are GMT -5. The time now is 11:38 AM. |