1

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 ?

Cheers

raphink
  • 11,337
  • 6
  • 36
  • 47
Hellnar
  • 143
  • 1
  • 6

4 Answers4

3

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

Anders Lindahl
  • 1,011
  • 1
  • 9
  • 12
  • 1
    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
  • 1
    If you are using ACLs, make sure to use "bsdtar". – Teddy Dec 17 '09 at 13:26
2

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

womble
  • 95,029
  • 29
  • 173
  • 228
2

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.

raphink
  • 11,337
  • 6
  • 36
  • 47
  • 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 09:07
  • That's very true, but it's a good thing to know for another time. Better be prepared for the future ;-) – raphink Dec 17 '09 at 11:13
0

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...

Regards
Mike
[;-)

DerMike
  • 117
  • 4
  • 1
    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