Cloning a Debian server

From IridiaWiki
Revision as of 15:32, 23 January 2006 by Christensen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Cloning a server an be necessary for various reasons, e.g. due to hardware failures and upgrades as well as after hacker attacks. Notice that in order to clone a server using the method described below, you need access to the server that you want to clone. Hence, it is a good idea to take the steps described below BEFORE a machine crashes or is compromised.

Installing packages

On the server that you wish to clone, you have get a list of installed packages:

$ dpkg --get-selections > packages_selected.txt

The machine on which you want to install the server clone has to be up and ready to receive a Debian fresh installation. Find a [1]] Debian installation image and install a minimal system. Copy the file containing the package selections (packages_selected.txt) to the newly installed system and:

$ cat packages_selected.txt | dpkg --set-selections 

This will selected the packages that were selected on the server you want to clone. In order to actually install the packages run:

$ dselect

And choose "Install". Don't worry too much about the various configuration options as you are likely going to overwrite during the configuation cloning.

Cloning the configuration