On Fri, 17 Sep 2010, Kwan Lowe wrote:
My general method is to keep a CVS committed directory somewhere on the root filesystem with all configurations. Then I symlink the tracked files back to that repository. For example:
/etc/hosts --> /configs/HOSTNAME/etc/hosts /etc/syslog.conf --> /configs/HOSTNAME/etc/syslog.conf
Restoring a machine's "identity" is just a simple matter of checking out that host's configuration directory then running a script to create the symlink.s
I've keyed configuration repositories to HOSTNAME before (and still do for very small installations), but over the long haul I've found the service-keyed repository more to my liking. In particular, cfengine makes it easy to work that way:
/etc/motd -> /r/systems/motd/motd.HOSTNAME /etc/openldap/slapd.conf -> /r/services/openldap/slapd.conf.HOSTNAME
One benefit of this method is that you can have a single file that works for a whole class of machines, e.g.,
/etc/syslog.conf -> /r/services/syslog/syslog.conf.client-linux
where "client" becomes "server" for syslog servers and "linux" becomes "macosx" or "sunos" depending on the platform.
As I said, however, a lot of that arrangement is a function of the way that cfengine works. I'd probably do it differently if I were using a different tool.