Server configuration and version control

One of the (few?) good habits I managed to pick up during 2010 was that I became serious about keeping server configuration under version control. While it might primarily have been something I was taught at work it is definitely a practice I have adopted privately as well.

The most obvious benefit, and potentially the most valuable one, is the historic record version control provides. Yet, the part I appreciate most is how easy it becomes to compare new configuration against current one; to verify that you only made  just those changes which you  intended to make. There is a certain comfort in being able to run a git diff before restarting a local service or before pushing new cluster configuration.

(Not that I do not appreciate having access to the configuration history. When being asked about something which happend a few months ago, those commit messages and those diffs becomes awful handy.)

For your local /etc this is as a good time as any to take a peak at etckeeper.

  1. Another thing I miss by not running a proper OS :-(

  2. Do you push some/all your /etc to a repo somewhere as a “backup” and to compare setups, or do you only keep it as a local tool?

    • Well, at work there are a few snowflakey servers from which I have the /etc git repository pulled to a central admin server. Otherwise, I now generally try to keep /etc managed by Puppet, which of course is under revision control.

Leave a Comment