Home > DEBIAN/UBUNTU, HOW-TOS > Recording and copying system configuration in Debian/Ubuntu

Recording and copying system configuration in Debian/Ubuntu

July 9th, 2010

debianYou can make a local copy of the package and debconf selection states using dpkg and debconf-get-selections command. The debconf-get-selections command output the content of current debconf database.

You will require the “debconf-utils” packages to do that.

Install debconf-utils:

$ sudo aptitude install debconf-utils
$ sudo dpkg --get-selections '*' > selection.dpkg
$ sudo debconf-get-selections    > selection.debconf

Here, “*” makes “selection.dpkg” to include package entries for “purge” too.

You can transfer these 2 files to another computer, and install there with the following.

$ sudo dselect update
$ sudo debconf-set-selections < myselection.debconf
$ sudo dpkg --set-selections  < myselection.dpkg
$ sudo apt-get -u dselect-upgrade    # or dselect install

If you are thinking about managing many servers in a cluster with practically the same configuration, you should consider to use specialized package such as fai to manage the whole system.

Related posts:

  1. Using The Debian Alternatives System
  2. Purge Removed Packages On Ubuntu/Debian
  3. Automatic download and upgrade of packages In Debian/Ubuntu
  4. Keep Track Of Configuration Changes Using etckeeper
  5. Basic Package Management Operations Using Aptitude
  1. July 11th, 2010 at 11:19 | #1

    This isn't really system configuration, just the sum total of a given system's packages.
    You also need apt's config files, etc.

    But really, it might be better to be using dd for a cluster of nigh-identical machines. Install once, copy many.
    Be nice to Debian's servers, they're free.

  1. July 12th, 2010 at 00:43 | #1
Comments are closed.

Switch to our mobile site