zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Second chance: etckeeper

February 1, 2011 by Igor Drobot Leave a Comment

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

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)

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

git config --global user.name "Your Name" git config --global user.email kiwi@zeldor.biz

To show etckeeper’s history:

1
git log

git log

To see all changes:

1
git log -p

git log -p

Filed Under: Bash, Debian, Linux Tagged With: Etckeeper, GIT

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok