Migrate existing linux os, php, apache, mysql to new server

Discussion in 'Site & Server Administration' started by mfscripts, Apr 21, 2010.

  1. #1
    Hi all,

    I've been asked to look into moving the entire linux OS, php apache, mysql etc of an old server and onto a new one. The setup is to remain the same in software terms/os on the new box so I'm wondering whether I can just do a straight copy of the existing files from the old server onto the new?

    I'm assuming there may be some configuration bits to be done since it's on a new IP but in theory should it work?

    I want to avoid manually setting up the os, apache, php, mysql etc directly on the new box if I can help it since it could prove to be a tricky job to match the config, installed rpms etc.

    Thanks in advance.
     
    mfscripts, Apr 21, 2010 IP
  2. etc

    etc Well-Known Member

    Messages:
    3,235
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    158
    #2
    try creating an iso file for that existing system you have. make it as a livecd.
     
    etc, Apr 21, 2010 IP
  3. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #3
    Cool, will check that out.

    What about using dd? I found some info which suggested that I could copy an entire partition like this:

    dd if=/dev/sdb2 | ssh user@host "dd of=/home/user/partition.image"
     
    mfscripts, Apr 21, 2010 IP
  4. casius

    casius Peon

    Messages:
    168
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Don't you think that it's risky to migrate with all OS image to the different server? It's like if the server has other CPU and other drivers will you be ok updating them?
     
    casius, Apr 22, 2010 IP
  5. xerophyte

    xerophyte Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    setup your new server as xen host and create xen domU off the old server. Which makes easy to migrated in the future too
     
    xerophyte, Apr 22, 2010 IP
  6. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #6
    Thanks guys for all your help. I ended up just setting up the new box to match the environment on the existing one. Then moving the code/dbs/files etc. It probably took longer than it would taking an image however it seems to be all working fine now. Thanks again.
     
    mfscripts, Apr 25, 2010 IP