[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Versioned /etc ?



Hallo Jeronimo,

Jeronimo Pellegrini wrote:
> So, I was trying to figure out a way to get automatic versioning
> for all files in /etc, and I wonder if someone tried that already.
> 
> I would like to:
> 
> 1. Not have to add files to a list when I add them to etc (like,
>    I don't want to have to "csv add" any files);
> 
> 2. Not have to manually check in (although I could get vim to
>    automatically do that, I guess);
> 
> 3. Be robust and not too complex. Simplicity is something I am willing
>    to give up if nothing else works (but robustness is a must).
> 
> What I could think of is:
> 
> - Use version control. From simple rcs to full mercurial/monotone,
>   this would be interesting, but this fails (1) and (2).
>   Maybe a cronjob could automatically add unknown files, but I don't
>   feel comfortable with that.
>   (But I see lots of advantages in putting /etc in a distributed VCS,
>   like automatic incremental backups, easy propagation to other
>   similar hosts, etc);
> 
> - Use a versioning filesystem, like CopyFS[0]. This is nice, but
>   the only filesystems I could find with versioning are FUSE-based,
>   and I'm not sure if it would be possible to get /etc mounted on
>   FUSE. Maybe with initrd (anyone ever mounted root or /etc on FUSE?),
>   but it fails (3).
> 
> Does anyone have other ideas?
> 
> Thanks,
> J.
> 
> [0] http://n0x.org/copyfs

I use bzr and bzr-tools for version control of /etc among other dirs.
It's simple to use and does the job for me.

'bzr add' adds all new files automatically and shows a list. If you'd do
that in a cron job, it will satisfy 1 and 2. However I wouldn't want to
add all (malicious???) files automatically (when I'm finished with the
job, I like to get a short summary: files x, y, z were changed and file
a, b, c were added), so for me there is no good way to satisfy 2. (One
could think about automatically mailing these, and this could also be
done via the cron job and bzr and still involves the manual step of
verifying the list).

I think it's also a good idea to manually commit changes. It is just one
more line, when you are busy changing some files and gives you a log
book of what you did, when files x, y, z were changed.

YMMV, take care, etc.

Johannes



Reply to: