Skip to main content
Ubuntu

Using etckeeper in Ubuntu 12.04 to maintain server configuration

By October 2, 2013September 12th, 2022No Comments



If you want to implement a simple low maintenance Version Control System on your Ubuntu Linux server, then perhaps, etc keeper is worth looking at. It provides a simple automation to the VCS bzr but redeuces the complexity that is usually needed in bzr or other VCS. Installing etckeeper will also install bzr for you. Once installed the system will create its firts reference version of all files below /etc/. If you do not change the defaults then a daily commit of changes will be made based on cron.daily, usually 6.27 am.

We can view versions that we have with :

sudo bzr log /etc or of a specific file sudo bzr log /etcpasswd

If we make changes to the /etc directory contents we can comitt those changes to a new version :

sudo etckeeper commit “New user added”

If we would need to view the differences of a file to a version we have stored :

sudo bzr log /etc/passwd to show version we have

sudo bzr diff –revision 1 /etc/passwd to display the differences between the current file and rev 1 of the file

If I would then like to revert that file then I can use the command

sudo bzr revert –revision 1 /etc/passwd