Git

Version Control for Linux Configuration (/etc) with etckeeper

Keeping a version history of files under /etc is essential for maintaining a healthy system. The benefits of tracking changes to /etc include:

  • Documentation: The log messages that are attached to configuration changes serve as documentation. These log messages record who made the change, when and why. Understanding the contents of a config file becomes much easier if you have a full history of the changes that were made to this file.
  • Troubleshooting: Misconfiguration can result in a variety of problems. When a service starts to misbehave, one of the things you can do to troubleshoot the issue is to check the version history of its config file. There, you can see if any changes were made around the time frame in which the problem happened. If you spot a change that may be causing the issue, you can easily revert it to fix the problem.

You can set up your own repository to track changes to /etc, or you can use a tool called etckeeper to handle the setup for you. This tool supports multiple version control systems, including Git, Mercurial and Bazaar. It integrates with the package management systems of a number of Linux distros, including APT (used by Debian, Ubuntu), YUM (RedHat, CentOS, Fedora), Pacman (Arch Linux). Using etckeeper instead of rolling your own has some advantages:

  • etckeeper integration with package managers means than you don't need to manually commit changes in /etc after installing packages.
  • etckeeper comes pre-configured with a list of files that live in /etc but usually do not benefit from version control (like some cache files).

Read on to learn how to install, configure and use etckeeper.

Read more

Tags:
Submitted by Ayman on Sun, 2009/08/16 - 6:01pm

Syndicate content

About

Ayman Hourieh

Computer Science graduate, Open Source enthusiast and Software engineer (Site reliability) at Google.

I'm 26 years old, and live in Dublin, Ireland.

This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

More

Feeds

RSS Feed Twitter

Books

Django 1.0 Website Development

Django 1.0 Website Development
Build powerful web applications, quickly and cleanly, with the Django application framework.

The second edition of my Django book. Published by Packt Publishing in March 2009.

Learning Website Development with Django

Learning Website Development with Django
A beginner's tutorial to building web applications, quickly and cleanly, with the Django application framework.

My first book. Published by Packt Publishing in April 2008.