LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Migrating Servers between same distribution but different hardware (https://www.linuxquestions.org/questions/linux-server-73/migrating-servers-between-same-distribution-but-different-hardware-651553/)

marcusone 06-25-2008 09:00 AM

Migrating Servers between same distribution but different hardware
 
I want to move my server from a VPS to a dedicated server... i have Sendmail (multi domain mail send/receive), Apache (with vhosts), Webmin, DNS, SSH, FTP, etc. running and want to have the same settings on the new machine. I am using CentoOS 5 fully patched on both machines.

I have found an easy way to copy the users accounts from one system to the other, but is there an easy way to copy the various service settings from on to the other? I don't think I can just copy the /etc directory...?

I assume copying /etc/httpd will work, and /etc/mail, a so forth, but /etc its self has hardware specific items in it?

Appreciate any help/guidance you can offer!

hob 06-25-2008 03:12 PM

Quote:

Originally Posted by marcusone (Post 3194676)
I have found an easy way to copy the users accounts from one system to the other, but is there an easy way to copy the various service settings from on to the other? I don't think I can just copy the /etc directory...?

I assume copying /etc/httpd will work, and /etc/mail, a so forth, but /etc its self has hardware specific items in it?

There are a few files in /etc that are machine-specific (e.g. /etc/fstab), but the biggest issue to watch out for is network-specific settings in service configuration files.

If you work service by service methodically and check each set of config files before you start up the service on the new system you'll be able to copy the service configurations across without too much trouble.

Several server products have options or separate tools specifically for sanity-checking the current configuration. With Apache you run httpd with an option, with BIND there are separate named-checkzone and named-checkconf utilities.

EDIT: It's also worth considering at this point whether you can dispense with some services, rather than migrating them; e.g. in most cases SSH makes FTP unnecessary, and outsourcing DNS and email to a specialist provider can make a lot of sense for small domains.

Ronin_tekorei 06-25-2008 07:17 PM

Helo :D
 
If all you want is to copy the same server on another machine with diferent hardware, take a look at Acronis True Image Echo ( this is a pay software ) or a free software that linux have called "dd" its really good :) look for info about it ;)

hob 06-26-2008 02:11 PM

Quote:

Originally Posted by Ronin_tekorei (Post 3195272)
If all you want is to copy the same server on another machine with diferent hardware, take a look at Acronis True Image Echo ( this is a pay software ) or a free software that linux have called "dd" its really good :) look for info about it ;)

IMHO, dd and cloning is not so useful on Linux servers. Most of the files on the system are provided by packages, so an automated install with Kickstart or similar will do most of the work, and let the install routines do their job of configuring the system to match the hardware.

For servers you inevitably also have a small number of service configuration files that need to be managed, whose contents will vary by network and other circumstances. These can be moved around and edited manually, or automatically dealt with by management systems like Puppet, but block copying from one system to another has a lot of scope for problems.

marcusone 06-26-2008 05:37 PM

Thanks everyone... it seems my answer is to just copy the config files over manually and edit them as needed (which I knew I would have to change network config options, but was hoping there was a faster way to copy them all into the correct place).

Thanks again, I'll just do one service at a time and run the two servers in parallel for a bit.

Red Squirrel 06-26-2008 08:02 PM

I've had good luck "trans planting" linux systems on a totally different machine. But iti's hit or miss, so best bet is image the drive for backup purposes, then take the physical drive and put it in the new server as boot and see if it will boot up.

This will be a headache if you're going from Sata to IDE or IDE to sata though, or if raid is involved.

marcusone 06-27-2008 02:55 PM

Quote:

Originally Posted by Red Squirrel (Post 3196362)
I've had good luck "trans planting" linux systems on a totally different machine. But iti's hit or miss, so best bet is image the drive for backup purposes, then take the physical drive and put it in the new server as boot and see if it will boot up.

This will be a headache if you're going from Sata to IDE or IDE to sata though, or if raid is involved.


I'm going from a VPS (OpenVZ based) system, so there is no physical drive, and it uses a special kernel, so I don't want any modules etc moving over as who knows what that will do.

I'm having success just moving folders from /etc that I need and using a perl script to search and replace IP addresses.

Taking some time, but at least i know it will work.


All times are GMT -5. The time now is 10:47 PM.