[olug] Server config revision control

Christopher Cashell topher-olug at zyp.org
Wed May 18 04:08:15 UTC 2011


On Tue, May 17, 2011 at 8:33 PM, Adam Lassek <adam at doubleprime.net> wrote:
> I'm looking for something that would watch /etc or any set of files I configure and automatically push changes to a git repository. Does anything like this exist?

If git is a requirement, check out etckeeper
(http://kitenet.net/~joey/code/etckeeper/).

Description from the Debian package:

 The etckeeper program is a tool to let /etc be stored in a git, mercurial,
 bzr or darcs repository. It hooks into APT to automatically commit changes
 made to /etc during package upgrades. It tracks file metadata that version
 control systems do not normally support, but that is important for /etc, such
 as the permissions of /etc/shadow. It's quite modular and configurable, while
 also being simple to use if you understand the basics of working with version
 control.

It includes a cron job that runs daily to commit any changes.

If git isn't a hard requirement, and you just want to store changes
(possibly with automatic e-mailing of diffs), check out changetrack
(http://changetrack.sourceforge.net).  One of my favorite tools, it's
a self-contained perl program that requires nothing more than cron and
rcs.  You configure what directories/files to monitor, and setup a
cronjob to run it periodically (I run it hourly).  It will check in
the file changes along with sending an e-mailed unified diff of the
changes (if configured to).  Due to the usefulness of it along with
the negligible effort to install and configure it, changetrack is one
of the tools that gets installed on almost every server I manage.

-- 
Christopher



More information about the OLUG mailing list