LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-11-2009, 05:36 AM   #1
abharsair
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Rep: Reputation: 0
Migrating from one server to another


Hi Guys,

I'm planning to migrate a RH Linux system from its current PC hardware to a half decent IBM 440 server using the following instructions...

Firstly do you think this will actually work and if so have ai got the commands correct any help will be greatly appreciated

1. Download a Linux Live-CD ISO (e.g. Knoppix)

2. Burn two copies

3. Reboot both the original Linux box and the new destination server with the Knoppix CD's

4. Check that both live CDs have a lan connection with IP configured and they can ping each other.

5. On the destination server type this:

nc -l -p 10000 | dd of=/dev/sda (or is it hda????)

6. On the machine you're migrating, type:

dd conv=noerror if =/dev/sda | nc $<ip of new server> 10000

7. Wait until dd finishes its job and do a clean reboot of the new machine.

8. Boot in to rescure mode with the distro's first CD or DVD and chroot on to the new system

9. Run kudzu to remove old devices and find the new ones (or manually edit your /etc/modules.conf file, which is the most important since it includes your scsi-device).

10. Create a new init using mkinitrd on your kernel version.

e.g. /sbin/mkinitrd -v -f /boot/initrd-2.6.20-1-new.img 2.6.20-1

11. Edit your /boot/grub/menu.lst file to boot your newly created initrd image.

12. Keep your fingers crossed and reboot the new server.

Thanks
 
Old 03-11-2009, 05:53 AM   #2
mephisto23
LQ Newbie
 
Registered: Mar 2009
Posts: 20

Rep: Reputation: 1
hi,

i think it will work but is it necessary to copy the whole machine? why you dont want to setup a new one and migrate the user- or service data and some configurations. after that you will definitely have a clean system.

regards,

mephisto23
 
Old 03-11-2009, 06:03 AM   #3
abharsair
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mephisto23 View Post
hi,

i think it will work but is it necessary to copy the whole machine? why you dont want to setup a new one and migrate the user- or service data and some configurations. after that you will definitely have a clean system.

regards,

mephisto23
it's probably not necessary but... out of lack of linux knowledge and fear of buggering something up I was hoping for an "easy" option
 
Old 03-11-2009, 06:17 AM   #4
mephisto23
LQ Newbie
 
Registered: Mar 2009
Posts: 20

Rep: Reputation: 1
Is there a raid controller in the current box which you want to migrate?
 
Old 03-11-2009, 06:19 AM   #5
abharsair
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mephisto23 View Post
Is there a raid controller in the current box which you want to migrate?
not in the one I'm hoping to migrate first, but there are in other boxes I'd like to migrate
 
Old 03-11-2009, 06:21 AM   #6
mephisto23
LQ Newbie
 
Registered: Mar 2009
Posts: 20

Rep: Reputation: 1
ok, then make the disk dump as descibed above and test the new server. the step by step instruction is ok and should work.
 
Old 03-11-2009, 06:22 AM   #7
abharsair
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Original Poster
Rep: Reputation: 0
thank you
 
Old 03-11-2009, 06:29 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
dd is about the worst option for this - do you *really* want to just blithely carry on if it gets a read error on the source ?.
Presumably this is a production server ... ???
And you don't care ... ???

Set up the target partitioning in advance and use a filesystem level utility like [s]cp or rsync - that way you get to know about any errors.
You'll probably need to re-install the bootloader and fix fstab as well if you do it this way.
 
Old 03-11-2009, 06:37 AM   #9
abharsair
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
dd is about the worst option for this - do you *really* want to just blithely carry on if it gets a read error on the source ?.
Presumably this is a production server ... ???
And you don't care ... ???

Set up the target partitioning in advance and use a filesystem level utility like [s]cp or rsync - that way you get to know about any errors.
You'll probably need to re-install the bootloader and fix fstab as well if you do it this way.
One of the issues I have is that I don't know what all of the programmes installed onto the system are, if I use scp will i need to reinstall any programmes, also there are numerous samaba shares on the system, will they scp across or will they need to be set up again from scratch?

(hence looking for an easy option really, I have time to learn before I try the options I just need to weigh up the pros and cons before I choose which option I go for...)
 
Old 03-11-2009, 07:05 AM   #10
mephisto23
LQ Newbie
 
Registered: Mar 2009
Posts: 20

Rep: Reputation: 1
as allready mentioned above, a reinstall would be the best solution but if you really want to clone the server, you can not do it with scp or rsync because this tools are not able to clone a complete partition structure.
 
Old 03-11-2009, 07:21 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by mephisto23 View Post
if you really want to clone the server, you can not do it with scp or rsync because this tools are not able to clone a complete partition structure.
Nor would you want it to.
Every upgrade I have done has involved bigger/ better disk subsystems.
You'll note I said "Set up the target partitioning in advance" - each partition is copied to its appropriate target partition in turn - safely and completely.

As for the samba query, I don't use it, but I expect it would only care about mountpoints.

BTW, I have no argument with a re-install as the preferred solution - sometimes it just doesn't fit the situation.
 
Old 03-11-2009, 03:25 PM   #12
mephisto23
LQ Newbie
 
Registered: Mar 2009
Posts: 20

Rep: Reputation: 1
Quote:
Originally Posted by syg00 View Post
BTW, I have no argument with a re-install as the preferred solution - sometimes it just doesn't fit the situation.
Thats right but my practice showed me, that old systems always come with traditional or so named historical mess. Thats the reason I said a reinstall will be the cleanest solution. If the partitioning is done before, I will agree to you, that a rsync / scp (you can combine it) solution ist the easiest one.
 
  


Reply



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 server to vmserver nazs Linux - Newbie 2 10-13-2007 08:07 AM
Migrating a server sharptech Fedora 8 04-03-2007 11:51 AM
seamisly migrating server MrSako Linux - Newbie 1 10-29-2006 01:18 PM
Migrating Windows Email Server to Linux Server fredidehen Linux - Newbie 3 09-05-2006 09:18 PM
Migrating NT Server to Linux cloro_x Linux - Networking 4 08-30-2003 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:18 PM.

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
Open Source Consulting | Domain Registration