Menu

How to version control /etc in Linux (using etckeeper)

It is a good idea to “version control” everything in /etc directory, so that you can track configuration changes, or recover from a previous configuration state if need be.

etckeeper is a collection of tools for versioning content, specifically in /etc directory. Uses existing revision control systems (e.g., git, bzr, mercurial, or darcs) to store version history in a corresponding backend repository. It integrates with package managers (e.g., apt, yum) to automatically commit any changes made to /etc directory during package installation, upgrade or removal. It tracks file metadata that revison control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow.