[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using subversion to manage system config files

From: Steven Brown <swbrown_at_ucsd.edu>
Date: 2004-06-22 05:58:02 CEST

Paul Moore wrote:

> I've just started to use Subversion to manage source code, and overall
> I like the feel of it. However, a significant portion of my job is
> managing configuration files (Apache httpd.conf, Oracle init.ora,
> etc). I'd like to keep these files under some form of version control,
> as well.
> It's not immediately clear to me how, or if, I could use Subversion
> for this. I can put (copies) of all the config files in a central
> directory, and treat that as a working copy and put it under version
> control. But I can't see a good way that I can automate the process of
> ensuring that the "real" copies are in line with the latest revision
> from Subversion. I suppose this is a similar sort of issue to that of
> program releases, and hence somewhat outside the scope of Subversion.
> But has anyone tried to manage this sort of data with Subversion, and
> if so do you have any tips?
> I guess that I could use a post-commit script, along with a per-file
> property for the "release location" of the file, to copy any changed
> files to their correct location on a commit. Maybe a second property,
> to specify a command to run after a change (eg, restart Apache). And
> maybe a pre-commit hook to confirm (somehow!) that the change is
> authorised. Is this type of approach plausible?

The safest way is to just use the tried and true RCS approach. "ci -l"
the file initially, and "ci -l" every time you want to commit a change.
  It'll drop the revision history file right next to the file you're
working on, which is perfect for things like /etc where each file is
usually a repository unit, and is highly visible to other admins poking
around /etc. It's probably the only use remaining for RCS, but it fits
the niche well.

Personally, I'd like to see version controlled filesystems that could be
used to mount /etc, personal 'Documents' directories, etc.. Maybe
Subversion one day will be handling this.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 22 06:00:14 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.