i’m upgrading my home server. a faithful 1GHz PIII with 512MB has served(!) me well for 4 years but i though it was time to expand. got a rather nice box with a 1.6GHz processor (quad core atom d510), 4GB of RAM and a 500GB SATA disk (room for another 2 disks also).
the old machine runs debian 6.0.3 and deals with a few chores…apache, postfix, remote ssh tunnelling, subsonic and a couple of samba shares. the old install is obviously 32 bit…the new one will be 64 bit (also running debian 6.0.3…i haven’t found a more stable server os) so that prevents a straight rsync as many of the packages will be incompatible with the different architecture. a chum got me thinking…a simple way to get a new box running the same apps as the old one is to replicate the packages that are installed. this can be done simply with the following…on the old box issue the following in a terminal…doesn’t need to be as root…
dpkg –get-selections > installedpackages
this creates a file called ‘installedpackages’ that contains all the applications that have been installed on the old system. if you have the new server up and running and accessible via ssh you can then copy the file over with scp…if not use USB
scp installedpackages username@newserver:/home/username
this will plonk it into your home folder on the new machine. so now log into your new machine and as root issue the command
dpkg –set-selections < installedpackages
and then
apt-get dselect-upgrade
this will install all the packages that ran on the old box…to the new one.
NB that this, obviously, doesn’t move your /home directories, email, web sites or any configuration files. you can do this via USB or using the scp method detailed above. lots of the configuration files are stored in /etc, web sites are generally in /var/www. i’m not dealing with things like mysql now but here’s some info on that.

















