Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Greetings, I currently have a Debian Lenny server running (on a slow machine) and recently I bought a stronger server and need to move/copy the old debian setup to this new server as whole(accounts, directories, installed software etc). It would consume so much time to set up a new Debian with all directory fixes and software installations.

What would be the easy/fast method to achieve this ?


share|improve this question
up vote 3 down vote accepted

If you can get a trusted network, a combination of netcat and tar is probably the quickest. See for example Dan Walronds guide.

share|improve this answer
if I might add, don't forget to boot the new server with a live distro, chroot into system and reinstall mbr. furthermore, the kernel might not be the best choice - depends on the hardware and if it had a custom-built kernel. – lorenzog Dec 17 '09 at 11:16
If you are using ACLs, make sure to use "bsdtar". – Teddy Dec 17 '09 at 13:26

Use rsync to copy the contents of the current machine to the new machine.

share|improve this answer

It would be much easier if you used a configuration manager software, such as puppet or cfengine. Ideally, if you had done it before, you would just have to reapply the same classes to the new server and let it deploy your configuration, but you could still do it now, describing your current configuration with puppet and applying it to the current server to check that it works fine, and then applying it to the new server. This will allow you to cleanly duplicate the server whenever you change again.

share|improve this answer
If there isn't enough time to do a manual configuration, there really isn't time to learn and deploy Puppet. – womble Dec 17 '09 at 9:07
That's very true, but it's a good thing to know for another time. Better be prepared for the future ;-) – ℝaphink Dec 17 '09 at 11:13

You could save a list of current installed packages with

OLD> dpkg --get-selections > selections.txt

and use that list on your other maschine by typing

NEW> dpkg --set-selections < selections.txt

Afterthat you have to make sure the /etc/apt/sources.list -files are equal and install your packages with

NEW> apt-get update; apt-get dist-upgrade

Now you have the same systems and can copy the /usr and /home parts.

If you consider that way, let me know...


share|improve this answer
Copying /usr is like installing all packages; however it does not copy configurations, which are the important thing here. – lorenzog Dec 17 '09 at 11:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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