Search This Blog

Monday, July 15, 2013

configuration - Is there an application to manage config files in the /etc folder with version control software? - Ask Ubuntu

configuration - Is there an application to manage config files in the /etc folder with version control software? - Ask Ubuntu:

The package etckeeper is specifically intended to manage your configuration files (located in the/etc directory) under a version control system(VCS).
What is etckeeper?:
etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers) to automatically commit changes made to /etc during package upgrades.
How to do I install etckeeper?:
To install the package, click on the link provided below to install in Ubuntu Software Center(USC), or runsudo apt-get install etckeeper from the terminal(Ctrl-Alt-t).
How do I change etckeeper from the default VCS(bzr) to use git?:
By default, etckeeper uses Bazaar(bzr) for version control management. This can be changed in the configuration file /etc/etckeeper/etckeeper.conf.
First, you will need to have git installed.
  • sudo apt-get install git
  • sudo apt-get install git-core
Now, you will need to edit your etckeeper.conf file to change your VCS. Here is what the first five lines of the default configuration should look like:
# The VCS to use.
# VCS="hg"
# VCS="git"
VCS="bzr"
# VCS="darcs"
This is where to switch to using git. Open a text editor (i.e. gksu gedit /etc/etc/keeper/etckeeper.conf) and change the file to look like this:
# The VCS to use.
# VCS="hg"
VCS="git"
# VCS="bzr"
# VCS="darcs"
Uncomment the line VCS="git" and comment out the line VCS="bzr"
Now, run sudo etckeeper init to initialize your repository.
As mentioned here:
This sets up version control for all files in /etc. You don't need to do anything else to manage etckeeper; you only need to interact with it when you want to do a version control operation, such as referring to older files. Files are automatically committed before and after each run of apt and every night (this is configurable).
Additional information on etckeeper:
also

No comments:

Post a Comment