Archive

Archive for April, 2013

Clone your Debian server’s packages to new server with dpkg

April 28, 2013 Comments off

First run
dpkg –get-selections * > installed-packages on your old server
then sftp the installed-packages file to your new server.
on your new server, make sure you have /etc/apt/sources.list exactly like the
one on your old server.

On your new machine run:
dpkg –set-selections < installed-packages
and then run
apt-get -u dselect-upgrade –yes

Your new server should now have all the packages your old server has.
You can copy the /etc/*.conf files to your new server (I would make a new place for them)
and add them back as needed to the new server.

Categories: sysadmin