Etckeeper is a useful tool to store /etc in a version control system. It allows you to read the changes that have been made to the files in /etc, document these changes and recover a previous version of a modified file in case we made some changes that we don’t want to keep. It’ s a great system to control your server and find very quickly solutions.
Its installation is very trivial:
1 | aptitude install etckeeper |
Create tracjing repository:
1 2 3 4 5 6 7 8 9 | crunch:~# cd /etc/ crunch:/etc# etckeeper init Initialized empty Git repository in /etc/.git/ crunch:/etc#etckeeper commit 'Initial Сommit' crunch:/etc# git gc Counting objects: 1476, done. Compressing objects: 100% (1068/1068), done. Writing objects: 100% (1476/1476), done. Total 1476 (delta 91), reused 0 (delta 0) |
Set some global variables:
1 2 | git config --global user.name "Your Name" git config --global user.email kiwi@zeldor.biz |
To show etckeeper’s history:
1 | git log |
To see all changes:
1 | git log -p |
Leave a Reply