etckeeper on custom directory

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?

Answer

It is right there in the man page.

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

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

Attribution
Source : Link , Question Author : jwbensley , Answer Author : Florian Heigl

Leave a Comment