Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been reading about etckeeper, but I can't work out if you can use it on any other directories other than /etc.

There seems to be no reference to /etc in any configuration file (that I can find) so I assue this is hard coded and you can't chose directories to monitor. Is this true? I'd like to also have it manage /opt. Can this be done?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

It is right there in the man page.

  • Create a directory /foo
  • Initialize with etckeeper: etckeeper -d /foo init
  • Commit apply commits to the directory: etckeeper -d /foo commit 'message'

But as ErikA mentioned you could just as easily use git or your favorite DVCS directly.

share|improve this answer
Ah yes I see now, I just had to play around with this option a bit until I could get the behaviour I wanted. Thanks :) –  jwbensley Aug 13 '12 at 10:44

Etckeeper is merely a wrapper for mercurial or git. It provides some nice hooks into package management tools to automatically grab a commit after updates, and optionally on a schedule. This additional functionality is most likely not needed outside of /etc.

Depending on your needs, I'd just use vanilla git (or any other version control tool you're familiar with). If needed, schedule regular commits via cron or as part of your application deployment process.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.