Version your /etc

Seems like we are on a bit of a roll with regard to the topic of versioning lately. Yesterday Legooolas commented about using version control for your home directory. I do and I’ll cover that in a different post but I use it for a different task. Now on to todays topic.
Do you keep track of configuration changes? You should. Maybe your using an advanced configuration management system like puppet. Even if you are you should keep your puppet configs versioned.
At any rate etckeeper is a great tool to version your configuration files stored in /etc. etckeeper hooks into your package manager and updates the repo each time changes are detected.
Its super easy to setup. In a debian based system just install via apt.

sudo aptitude install etckeeper

Once etckeeper is installed you need to initialize the git repository and do the initial check in.

sudo etckeeper init
sudo etckeeper commit

5 Comments

  • I’m famous! 😉

    I use Puppet for this kind of thing and couldn’t recommend it highly enough. Puppet and SVN on the puppet config gives me versioned configs for both the etc files which puppet manages and the puppet config of what runs on which nodes.

  • Indeed you are, even Matt Simmons mentioned you.
    I’ve played with puppet several times. Still trying to get over the rubyness of it. 🙂 It is definitely the best thing I have seen for the job. One of these days I will get it implemented. I do like etckeeper for one off servers in small environments that don’t have the luxury of a well managed infrastructure.

  • I use fsvs, it’s really nice: http://fsvs.tigris.org/

    It’s based on SVN. I’m pretty sure git is superior to svn for developers, but I can’t figure why it’d be better for admin revision control. It’s not like you’re going to make heavy use of branching/merging ..

  • I use git for all of my revisioning stuff. One thing thats nice about it is not having to setup a git server. Each git repo is a full repository and I am not bound to having a single central repository. I can use that workflow if I want, but I don’t have to.

  • The problem with using git alone for revisioning is that in the world of devops where you are using git for your puppet modules/directory, git does not keep track of directory and file permissions so commits of your puppet directory from repos/branches will break parts of puppet that require specific permissions.

    Technology is great…when it works.

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha