[Discuss] Reading Linux book

Bill Bogstad bogstad at pobox.com
Thu Mar 27 13:33:03 EDT 2014


On Thu, Mar 27, 2014 at 12:28 PM, Daniel Barrett
<dbarrett at blazemonger.com> wrote:
> On March 27, 2014, Kent Borg wrote:
>>... I always maintain a file called adminlog.txt. It is my notes, an
>>old fashioned journal with dated entries of what I do to the OS. If I
>>need to reproduce my config, I can "replay" this journal.
>
> Another idea along these lines: I maintain a separate file tree,
> /usr/local/src, that contains copies of the OS files I have modified.
> By keeping this sparse tree under subversion control, I can see a
> complete history of the OS changes I've made at any time and
> recall/revert changes pretty earily. I've migrated even from one
> distro to another pretty manageably this way.
>
> To make things easier, I also wrote a script "srccopy" that, when run
> within the /usr/local/src tree, emits "cp" commands to make life
> easier. ...

Some Linux distributions make available a package called etckeeper
which does this for /etc.   It even has hooks into the package
management system for a distribution so if a package upgrade modifies
config files, you have a snapshot from before it does so.
Unfortunately, it doesn't do this for anything besides /etc.   It
would be nice if it also kept track of crontabs and a few other things
in /var as well.   On the spectrum from chaos to full configuration
management, I think it can be helpful when you have just a few systems
with little commonality.

It can also be helpful when you have a team of administrators managing
these kinds of systems.  If the last person to touch a system checked
in their changes, you can read their commit message to see both what
and why info for their changes.   And if they didn't, you can always
run the appropriate command for the underlying source code control
system (git, mercurial, bazaar, or  darcs) to diff /etc against the
repository to see everything they changed.  (Not just what they
remembered to document.)  You can install etckeeper at any time and it
will track changes in /etc from that point on, but doing it at initial
sytem install would obviously be preferable.

Bill Bogstad



More information about the Discuss mailing list