5

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?

3 Answers 3

6

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.

3
  • 1
    +1 for "use a real configuration engine"
    – Alex Holst
    Nov 4, 2011 at 20:08
  • fair point :) I had a feeling that might be the answer to this question. what's your config engine of choice? Nov 4, 2011 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, 2011 at 20:25
3

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.

1
  • Fair point. In this case it's the same filesystem Nov 4, 2011 at 19:43
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .