Mailinglist Archive: opensuse (4749 mails)

< Previous Next >
Re: [SLE] Putting a server's config under CVS by snarfing /etc
  • From: James Oakley <joakley@xxxxxxxxxxxxxxx>
  • Date: Wed, 28 May 2003 09:47:30 -0300
  • Message-id: <200305280947.34881.joakley@xxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 28 May 2003 03:51 am, Michael.James@xxxxxxxx wrote:
> Much as I love Suse there is the buisness of OS upgrades.
>
> Upgrading tends to leave cruft so I always do clean installs.
> At a minimum, I preserve a seperate /home partition
> with a copy of the old /etc/directory in it.
>
> Once build then comes the nightmare of re-implementing
> all the config changes that defined that machine.
>
> What I want to do is put the whole /etc/ directory under CVS.
> (A cron job would take nightly snapshots
> and capture any un-comitted changes.)
>
> That way the upgrade aftermath nightmare becomes
> a systematic CVS merge operation,
> bringing the old /etc branch back onto the new install.
> Then CVS will hold the differences from a stock Suse install
> for system recovery.
>
> Useful also when there are multiple sysadmins,
> (or one absent-minded one).
>
> Anyone played with something like this?
> How would CVS cope with the web of links in /etc/init.d?

I have thought about this myself in the past. Here are a couple of thoughts:

- - cvs does not handle symlinks. They are generated by insserv and contain no
content so there's no need to keep them under revision control

- - You can't remove directories in cvs without modifying the repository
directly

- - You should only control files that you have changed. Stuff like
/etc/sysconfig/* and /etc/mail/*. What I would do is check against the RPM
database with rpm -V. If the MD5sum changed, the file should be controlled.
If not, then you are using defaults

- - Use subversion instead of cvs. It's probably better suited to this kind of
thing because you can remove directories and it versions the entire
repository instead of individual files

All of that said, I find myself using the YaST2 backup because it only backs
up changed or new files. That way I don't use so much space and I get stuff I
forget about.

- --
James Oakley
Engineering - SolutionInc Ltd.
joakley@xxxxxxxxxxxxxxx
http://www.solutioninc.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE+1K/k+FOexA3koIgRAjBfAKCZE5ejKDbN+LI/sAT1nh6xXVcs/wCfd4s8
Mp+ILXHj5dWgdWXuKRmWYt8=
=yRUf
-----END PGP SIGNATURE-----


< Previous Next >
Follow Ups
References