DescriptionThis page covers how to install and set up revision control and tracking for your server configuration directory using a program called etckeeper.
- An recent Ubuntu server.
- etckeeper (see below)
InstallationTo install the etckeeper run the following command.
sudo apt-get install etckeeper
ConfigurationOn Ubuntu, etckeeper is configured by default to use GIT. If you wish to change this, open the configuration file.
sudo nano /etc/etckeeper/etckeeper.confEdit the VCS line and select one of the other available choices.
# The VCS to use. #VCS="hg" VCS="git" #VCS="bzr" #VCS="darcs"If you change the VCS from the default, you will need to initialize etckeeper
cd /etc sudo etckeeper initNow each time you install new software, etckeeper will automatically update and commit the changes. If you make any manual changes to files in /etc, then you should commit the change using etckeeper as per below.
sudo etckeeper commit "Describe the reason for the change"
TestingIf you want to see the results of the last commit enter the following.
sudo etckeeper vcs showIf you want to see a log of previous commits enter the following.
sudo etckeeper vcs logIf you want to see the results of a specific commit, you can choose one of the commit ID's from the commit log and issue the show command.
sudo etckeeper vcs show cbc5b1b7