Currently, I have Debian installed on a desktop computer with an Intel P4. It is a web server. As my website starts to be more and more popular, I want to migrate to a real server.

So I bought a new server (IBM eSeries 235) and I want to migrate the whole debian system into the new server.

The new server has 2 CPUs (sockets) instead of 1 in the old server. Can this cause issues?

I would just backup the whole old system using tar and then install Debian 6.0.3 on the new server, and then untar the backup onto the freshly installed OS on the new server. Is this a good way to migrate? If not, what should I do.


In terms of hardware compatibility, if your server does not require proprietary drivers you should be fine. New CPU cores will be detected. One way to find out is to run Debian LiveCD on your server and see what is detected and what is not. With regards to migration you have few options :

- Set up your new server from scratch.

This would probably be most time consuming but a good way to revise your setup for a new environment e.g remove unnecessary packages ( GUI or other desktop packages etc.. ), harden security.

- RSYNC / Copy

Cumbersome but will require least downtime if you need to have you existing server up and running and don't want to set up from scratch.

  • Mount your new server hard drive on your existing system
  • replicate partition layout to mirror your existing system

    sfdisk -d /dev/sda | sfdisk /dev/sdb

    sda is your exisitng server sdb is your new server

  • create filesystem / swap on your new drive partitions and mount root, boot and any other partitions from your new drive on your existing system.

  • copy contents of your existing system to the new drive

    rsync -azv --progress --exclude=proc --exclude=sys --exclude=dev --exclude=/mnt/NEW / /mnt/NEW/
    mkdir /mnt/NEW/{proc,sys,dev}

    /mnt/NEW is the mountpoint of root (/) from the new drive.

  • repeat for /boot and other partitions if there are any

  • Setup grub on your new drive.

    Run 'grub' and :

    grub> root (hd0,0) 
    grub> setup (hd1)

    You might have to modify grub menu.cfg file to update root partition if LABEL is used.
    Commands will vary depending on your partitions layout or if you have raid/LVM etc.. This should leave you with a ready to boot system. If there were changes on your current system while you were doing rsync and you want them to appear on your new system, shut down your system with both drives (current and new ) plugged in and boot into Live CD (SystemRescueCD is great), mount root partitions from both and re-run rsync commands. This should only copy the difference and take little time. Make sure you are copying in the right direction old->new drive.

- DD / Clone

Best option in terms of perfect and easiest migration. This will leave you with an identical copy of you existing system but will require downtime.

Boot your PC with both drives plugged into Live CD (SystemRescueCD is great) and run DD

 dd if=/dev/sda of=/dev/sdb

NOTE : Make sure /dev/sdb is your NEW EMPTY drive. This will take time depending on the size of your disk but when complete your new drive will be ready to boot and will be an identical copy of you current system. Ofcourse your new drive needs to be of the same / larger size.

Your NIC naming will change on the new system, just modify /etc/udev/rules.d/70-persistent-net.rules file and rename as required.

Good luck.


I think that the better way to migrate is install Debian on the new server and configure it properly , then copy only what you need, for example website root folder, configuration file and so on ...

Do not copy everything but just what you really need is my suggestion.


Do not just copy everything, it will not work. Set up a new Debian server and test is. Once you are certain everything is OK, move what you need. (Databases, Webfiles,...).

When you just tar the root filesystem, and extract it on the new server you will end up with a broken system.

  • 2
    There are reasons to not copy everything - but saying that it won't work is a tad bit too pessimistic for my taste. Linux is quite excellent at adapting to new hardware. The only real snags here, are paths of the new block devices.
    – Kvisle
    Nov 5 '11 at 14:07
  • 1
    Since we are talking about debian here, networking would fail because the mac-addresses don't correspond. You would be in a world of pain to get everything working (believe me, I tried it). It's far more easier to configure a new box. I also like the feeling and mindset behind a freshly installed box. Nov 5 '11 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.