Recording and copying system configuration in Debian/Ubuntu

July 9, 2010 at 7:03 pm | DEBIAN/UBUNTU, HOW-TOS | 2 comments

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.

What’s In Your .gitconfig?

March 18, 2010 at 10:43 pm | GIT | 1 comment

git-logo_medI have been using git for over 2 years now. My current .gitconfig is below. What’s in your .gitconfig?

[user]
    name = vinod (mercury)
    email = myname@mydomain.com
    editor = vim
[diff]
    tool = vimdiff
[color]
    branch = auto
    diff = auto
    status = auto
    interactive = auto
    ui = true
    pager = true
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "diff"]
    meta = yellow bold
    frag = magenta bold
    old = red bold
    new = green bold
[color "status"]
    added = yellow
    changed = green
    untracked = cyan
[alias]
    st = status
    ci = commit
    br = branch
    df = diff
    lg = log -p
    co = checkout
    tree = log --graph --pretty=oneline --decorate
    pom = push origin master
    amend = commit --amend -C HEAD
[core]
    pager = less -FRSX
    whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
[apply]
  whitespace = fix

Happy Giting :-)