etckeeper user and system diffs [closed]

I’m looking for a way to keep user and system-made changes to /etc using etckeeper seperate automatically.

Basically different commits for user and system. I’m sure many other sysadmins could benefit from this too.

To clarify, each server has roughly 2 kinds of knowledge: user-generated, auto-generate. Mixing them together is like mixing /usr/local and /usr. You are wasting time going through massive diff lists of automated changes. It is like developing a Rails application and having each diff list get spammed by changes in ActiveRecord. When its time to replicate the system or find an old manual change you’ll be looking for a needle in haystack. This no fun as some times it took ages to figure out a solution.

Not asking anyone to build anything, but if you have a ready solution, I wouldn’t want to re-invent the wheel.

Answer

If you always manually commit changes you make using etckeeper you can just filter the commits to remove all automated commits. For example, using Bazaar:

% sudo bzr log --line | egrep -v 'daily autocommit|apt run|puppet catalog run'

Attribution
Source : Link , Question Author : jiriki , Answer Author : mgorven

Leave a Comment