Strategy for managing files in /etc, suggestions?
Alessandro Dentella
sandro.dentella at gmail.com
Thu Dec 17 00:41:37 UTC 2020
On Wed, Dec 16, 2020 at 10:32:23PM +0000, Chris Green wrote:
> I use mercurial for managing all the little bash and python utilities
> that I write for my various Linux systems and it's very handy.
>
> I'm thinking that it would be an excellent idea to keep track of
> changes I do to system configuration files in /etc, I try to keep
> these to a minimum but some are inevitable.
>
> What's the best way of handling this, changes to very few files in a
> directory with (probably) thousands of files? Is it best simply to
> copy them out to a development area, do changes there and copy them
> back to /etc? I'm not entirely happy with this method but I can't
> really see a better way. I suppose one could set up a mercurial
> repository in /etc and have a .hgignore that ignores everything then
> 'add' files that I'm changing.
>
> Does anyone else do anything like either of the above? ... or is my
> OCD getting the better of me! :-)
I've been keeping track of /etc of all my servers since I started using mercurial
(maybe 15 years ago?).
It's definitely very useful! I have a repo in /etc. I commit in a cronjob once a
day and almost never commit myself. I can tell any single configuration when has
been set.
I set the read/write permission so that only root can enter /etc/.hg and I push
once a day the repo to a central mercurial-server that currently has more than
500 configurations. Sometime it's also usefull when you install something and
want to understand in which way it changes your /configuration.
sandro
*:-)
More information about the Mercurial
mailing list