LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 06-25-2008, 10:00 AM   #1
marcusone
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Rep: Reputation: 0
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!
 
Old 06-25-2008, 04:12 PM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
Quote:
Originally Posted by marcusone View Post
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.

Last edited by hob; 06-25-2008 at 04:21 PM.
 
Old 06-25-2008, 08:17 PM   #3
Ronin_tekorei
Member
 
Registered: May 2006
Distribution: Fedora
Posts: 57

Rep: Reputation: 15
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
 
Old 06-26-2008, 03:11 PM   #4
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
Quote:
Originally Posted by Ronin_tekorei View Post
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.
 
Old 06-26-2008, 06:37 PM   #5
marcusone
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 06-26-2008, 09:02 PM   #6
Red Squirrel
Member
 
Registered: Dec 2003
Distribution: FC9 on main server
Posts: 798

Rep: Reputation: 36
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.
 
Old 06-27-2008, 03:55 PM   #7
marcusone
LQ Newbie
 
Registered: Jun 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Red Squirrel View Post
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.
 
  


Reply

Tags
migration


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
migrating users between 2 linux servers javier_ccs Linux - General 3 09-12-2006 02:21 PM
Migrating an existing linux install to new disks/hardware quiffhanger Linux - Software 4 02-24-2006 02:40 PM
migrating accounts from maching and distribution version linuxnube Linux - General 2 03-08-2005 07:53 PM
Migrating domain to my own DNS servers... Erik Thorsson Linux - Networking 1 12-18-2004 04:06 AM
migrating nis servers mkaczm Linux - General 0 04-26-2004 01:03 PM


All times are GMT -5. The time now is 07:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration