How do I migrate configuration between computers with different hardware?

First, if you're going to keep running 32-bit binaries, you're not actually changing the processor architecture: you'll still be running an x86 processor, even if it's also capable of doing other things. In that case, I recommend cloning your installation or simply moving the hard disk, as described in Moving linux install to a new computer.

On the other hand, if you want to have a 64-bit system (in Ubuntu terms: an amd64 architecture), you need to reinstall, because you can't install amd64 packages on an i386 system or vice versa. (This will change when Multiarch comes along).

Many customizations live in your home directory, and you can copy that to the new machine. The system settings can't be copied so easily because of the change in processor architecture.

On Ubuntu 10.10 and up, try OneConf.

OneConf is a mechanism for recording software information in Ubuntu One, and synchronizing with other computers as needed. In Maverick, the list of installed software is stored. This may eventually expand to include some application settings and application state. Other tools like Stipple can provide more advanced settings/control.

One of the main things you'll want to reproduce on the new installation is the set of installed packages. On APT-based distributions, you can use the aptitude-create-state-bundle command (part of the aptitude package) to create an archive containing the list of installed packages and their debconf configuration, and aptitude-run-state-bundle on the new machine. (Thanks to intuited for telling me about aptitude-create-state-bundle.) See also Ubuntu list explicitly installed packages and the Super User and Ask Ubuntu questions cited there, especially Telemachus's answer, on how to do this part manually.

For things you've changed in /etc, you'll need to review them. Many have to do with the specific hardware or network settings and should not be copied. Others have to do with personal preferences — but you should set personal preferences on a per-user basis whenever possible, so that the settings are saved in your home directory.

If you plan in advance, you can use etckeeper Install etckeeper to put /etc under version control (etckeeper quickstart). You don't need to know anything about version control to use etckeeper, you only need to start learning if you want to take advantage of it to do fancy things.


Here's how to get everything except what you've manually configured:

dpkg --get-selections > packages.txt
debconf-get-selections > debconf.txt

Edit these files as necessary for anything that's arch dependent (e.g., linux-image), but I don't think there will be much.

Copy these files to the new system then run:

debconf-set-selections < debconf.txt
dpkg --set-selections < packages.txt
apt-get dselect-upgrade

You'll also want to copy (preferably with rsync) /home and any other data directories to the new system.

The only thing left will be config files from major packages (e.g., apache, bind, cronjobs, et al.).