From owner-freebsd-questions@FreeBSD.ORG Fri Jun 1 22:10:03 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EADC216A46D for ; Fri, 1 Jun 2007 22:10:02 +0000 (UTC) (envelope-from lacoste@miage.univ-paris12.fr) Received: from smtp23.orange.fr (smtp23.orange.fr [193.252.22.30]) by mx1.freebsd.org (Postfix) with ESMTP id 63F0613C4AD for ; Fri, 1 Jun 2007 22:10:02 +0000 (UTC) (envelope-from lacoste@miage.univ-paris12.fr) Received: from smtp23.orange.fr (mwinf2302 [10.232.4.24]) by mwinf2335.orange.fr (SMTP Server) with ESMTP id 84E921C28AC9 for ; Fri, 1 Jun 2007 22:18:53 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2302.orange.fr (SMTP Server) with ESMTP id 4B7C81C000A4; Fri, 1 Jun 2007 22:18:52 +0200 (CEST) Received: from [192.168.1.24] (ASte-Genev-Bois-151-1-56-38.w82-121.abo.wanadoo.fr [82.121.14.38]) by mwinf2302.orange.fr (SMTP Server) with ESMTP id 0DFB71C0008F; Fri, 1 Jun 2007 22:18:52 +0200 (CEST) X-ME-UUID: 20070601201852573.0DFB71C0008F@mwinf2302.orange.fr From: Thierry Lacoste Organization: MIAGE To: freebsd-questions@freebsd.org Date: Fri, 1 Jun 2007 22:17:38 +0200 User-Agent: KMail/1.9.5 References: <26ddd1750706011227g224eaa1dh93233400c704595e@mail.gmail.com> In-Reply-To: <26ddd1750706011227g224eaa1dh93233400c704595e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706012217.39361.lacoste@miage.univ-paris12.fr> Cc: Maxim Khitrov Subject: Re: Recommendations for config file revision control X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2007 22:10:03 -0000 I keep track of my servers config files with CVS. Let's say I want to track a machine named 'box'. On this machine I have a working copy of the cvs module box in /root/box. I have a couple of scripts cvs-add and cvs-ci. 'cvs-add /etc/rc.conf' copies /etc/rc.conf to /root/box/etc/rc.conf and then adds it to the cvs repository. 'cvs-ci -m message /etc/rc.conf' verifies that /root/box/etc/rc.conf exists and that the two files are indeed different then makes the copy and checks it in the repository. Finally I install a cronjob which checks if the files in the working copy are indeed identical to the 'real' files they mirror. It's very simple but very handy. However I'd like to hear about alternative solutions. Regards, Thierry. On Friday 01 June 2007 21:27, Maxim Khitrov wrote: > Hi everyone, > > I'm currently setting up a new server, and I'd like to keep track of > all changes made to various config files (in /etc, /usr/local/etc, and > a few other places perhaps). My first thought was to setup a > subversion server which would contain the partial directory structure > that matches that of the server's starting at /. It would contain > versioned copies of all the configuration files that I want to keep > track of in their appropriate locations. What I would do then is write > a hook for subversion that will issue an automatic export command > (don't want .svn directories everywhere) every time a commit is made > to the repository. So to edit some configuration file I would first > checkout a working copy of the repository to some other location, make > the change and commit it. The server would be automatically updated > with the new file and I would be able to keep track of every change. > > This seems like a decent strategy to me, but before I go off writing > the scripts and setting up the server I wanted to ask what you guys > might be using to keep track of the server configuration (backups > don't count)? Is there an easier way of doing the same thing, for > example, eliminating the need to do a working copy checkout first? > Perhaps a way to monitor certain files for changes, and automatically > commit them every time a change is saved. I'd be glad to hear any > suggestions you might have in this regard. If possible, I'd like all > the versioned files to contain an id string, so that it's easy to > determine when the file was last changed and by whom, but this is > optional. For the most part I just need a way of going back to > previous versions. > > Thanks, > Maxim Khitrov > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"