3

I have a debian server that I need to move from one hosting provider to another. I don't really know how the old server was setup, all I know is that it's running a Ruby on Rails application with a lot of custom libraries installed and that I should prepare myself for a painful migration.

Old server:
-os: debian 5.0.9
-used disk space: 3.2GB
-architecture: i686

New server:
-os: debian 5.0.9
-free disk space: 10GB
-architecture: x86_64

As you can see the problem is that the servers are running different architectures.

Q: Is there anyway I could somehow migrate the old to the new server in a few steps (or am I just dreaming I could) ?

I was thinking maybe I could:
-get list of packages and gems installed on old server and use for loop to install them all on the new
-copy the disk content from old to new server while excluding what is architecture-specific (the problem is that I don't really know what to exclude).

Max
  • 3,373
  • 15
  • 51
  • 71
  • 1
    I don't see how this would be a painful migration; it's a pretty standard thing for a sysadmin to do. – womble Mar 23 '12 at 08:51

2 Answers2

5

There is a step-by-step guide in the Debian Wiki to upgrade from 32 to 64 bit. http://wiki.debian.org/Migrate32To64Bit This is really ugly plus you have the problem with your Ruby installation. Are you sure your Ruby libs are running with 64 bit? I would do definitley do a full backup/image/whatever of the machine, so you can rollback to a functional state in case things go wrong.

duenni
  • 2,939
  • 1
  • 22
  • 38
4

dpkg --get-selections > /backup/installed-software.log should dump everything installed to installed-software.log

dpkg --set-selections < /backup/installed-software.log then dselect should restore it.

You may also need to copy config files from /etc/ - this will depend on your specific set up.

you may also want to install ia-32-libs for supportng ia32 software on x86

Up until this point, you shouldn't have too many issues.

Now, debian does support running x86 libs on x64, so its a matter of copying over the files, looking at what breaks, and installing the appropriate libraries should do the trick

Alternately, a trickier, but 'simpler' option may be to set up a 32 bit chroot in the system, then simply copy over the setup of the old server into the newer one. Another install guide here

Journeyman Geek
  • 6,969
  • 3
  • 31
  • 49