Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as not a real question by womble, Zoredache, kce, Scott Pack, Dan Jul 19 '12 at 13:12

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

What's wrong with etckeeper? – mgorven Jul 14 '12 at 18:34
Theres nothing wrong with etckeeper. The problem is that commits are spammed by changes that are APT etc. done. Dozens of config files and other crap gets updated all the time, and I have nothing with them. They're mostly fine, as they are completely automated. Every server has basically two kinds of knowledge: - User-generated - Auto-generated Mixing them two is adding a lot of noise. Its like monkey-patching a library in /usr/lib and then five months later unable to find the change because 1000 other things changed in lib. – jiriki Jul 15 '12 at 19:00
I don't see how people rate this -3 though. Are people enjoying going through massive diff lists and searching a needle in haystack? I am not. – jiriki Jul 15 '12 at 19:05
Your question is getting downvoted because it is not really clear what you are asking, sounds like a product/shopping recommendation and is so general that no can really give you a decent answer. Please read the FAQ and re-focus your question to one that is answerable instead of a very general "I don't like this, what else can I do?". – kce Jul 15 '12 at 22:19
My question is: how to automatically keep user and system level diffs separate? I edited the OP. I don't think the question itself is vague but my phrasing might have been. – jiriki Jul 17 '12 at 9:54

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'
share|improve this answer
Yeah thanks, that's one solution, but sysadmin would still have to commit every time sysadmin makes changes. When sysadmin forgets it, the changes will be lost to the deep space of auto-commits. Given that most changes are made with text editor like vim, it could actually just commit every time use makes changes, and amend the changes to last commit. Renames, copy's etc. would still go to other commits. To take that into account, you'd have to script bash I guess. Needs a bit of scripting, I guess I'll do this unless someone has implemented this already. – jiriki Jul 17 '12 at 10:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.