Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

To manage the configuration of a server, I keep some configuration flies (located in /etc) under version control (in the home folder) and then symlink to them from their /etc locations:

/etc/someprog/c.conf -> /home/ubuntu/etc-config/someprog/c.conf

Is this a reasonable approach? Any potential downsides?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

I noticed you add git as a tag--it sounds like /home/ubuntu/etc-config is a git repository with all your configs in it. In which case, it sounds like you're trying to manage configuration files from a central location. If that's the case, I highly recommend looking for a real solution.

Take a look at something like puppet, chef, cfengine, or any of the major configuration manage engines out there. Many of them are free and open source, widely used, and are typically very easy to setup and manage. If you're trying to use a "lightweight" method instead, you'll likely come to regret it later.

share|improve this answer
1  
+1 for "use a real configuration engine" –  Alex Holst Nov 4 '11 at 20:08
    
fair point :) I had a feeling that might be the answer to this question. what's your config engine of choice? –  Matt Sweeney Nov 4 '11 at 20:15
1  
I'm partial to puppet, but there as many opinions as there are configuration management systems. :) Since a lot of them have different strengths and weaknesses, definitely try a few of them out. Most packages manages (i.e., apt) have them--so give them a whirl! Nothing will tell you if it fits like trying it on. –  Andrew M. Nov 4 '11 at 20:25
add comment

If these are on different filesystems, then this is a very bad idea. If the other filesystem does not mount then you will have problems.

share|improve this answer
    
Fair point. In this case it's the same filesystem –  Matt Sweeney Nov 4 '11 at 19:43
add comment

I wouldn't use symlinks like this. If you break the link (for any number of reasons) you'll break the config. It's more appropriate to point the server/daemon/app to the actual location of the config file in the init script.

If you just want version control, look at RCS. I've actually found git to be a poor stand-alone server config solution (no locking, no permissions management, the whole directory becomes the repo). If you need something more robust for configuration management, then I'd strongly suggest taking a look at Puppet, Chef, or (gasp) CFEngine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.