Cloning a Debian server

From IridiaWiki
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
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.
 
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.
  +
  +
The cloning consists of four different steps:
  +
  +
# Installing the correct packages
  +
# Cloning the configuration
  +
# Copying all user files
  +
# Loading all application data (databases, mail, etc.)
   
 
== Installing packages ==
 
== Installing packages ==
Line 23: Line 30:
   
 
== Cloning the configuration ==
 
== Cloning the configuration ==
  +
  +
== User files ==
  +
  +
== Restoring application data ==

Revision as of 16:40, 23 January 2006

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.

The cloning consists of four different steps:

  1. Installing the correct packages
  2. Cloning the configuration
  3. Copying all user files
  4. Loading all application data (databases, mail, etc.)

Contents

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

User files

Restoring application data

Personal tools