I'm considering hardlinking config files into a working copy of my SVN config repository. Is there any reason why not to manage config files this way?

Assume /home/user/confmgr/confs is a working copy of my config repository. Then I could hardlink config files as follows-

ln /etc/php.ini /home/user/confmgr/confs/php.ini
ln /etc/httpd/conf/httpd.conf /home/user/confmgr/confs/httpd.conf

Then when I need to edit a config file it's this simple

cd /home/user/confmgr/confs
vi httpd.conf
/sbin/service httpd configtest
/sbin/service httpd graceful
svn commit -m 'adding virtual host to httpd.conf for new project'

3 Answers 3


A few observations in almost reverse order:

  1. Why not symlink instead?
  2. Consider turning your workflow around. Safely make your changes to a second working copy, review and commit, then svn up the working copy in live use.
  3. There are more sophisticated tools to manage complex config structures from version control. Consider using Puppet, BCFG2, etckeeper and so on.

I wouldn't put them in /home

Place the config files somewhere in the root filesystem.

This is because / is mounted before the other filesystems and there is a chance it might need config files that are located on a not yet mounted filesystem.

I would also use symlinks and not hardlinks. Cross filesystem hardlinks aren't allowed (iirc) and you might get broken links when you check out updated files from SVN (changing inodes).

You'll need to be very careful but I can't see a reason why you can't run with this config.


etc-keeper is probably a good reference design for you:

etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository.

It stores the repo in /etc/.$RCS, but it doesn't support SVN. I'm not sure why; the author merely states he tried it and it sucks. Essentially, this approach makes /etc the working copy.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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