Results 1 to 2 of 2
  1. #1

    Question config files and version control

    I'm considering managing all config files under version control on my RH 7.1 installation. Using /etc/hosts as an example, how about this approach:

    1. create a top-level directory named config
    2. In /etc, mv hosts to /config
    3. in /etc, create a link to /config/hosts named hosts
    4. import /config/hosts as a new sysconfig project into cvs

    Basically, you would wind up with all configuration files in the /config directory and in their reespective places would be a link to the real files in /config. You could edit the file in it's ordinary place or from within the /config directory.

    Let's say that you're adding a new virtual host to httpd.conf. You would need to edit httpd.conf, named.conf, (reverse dns), and Then you'd need to restart named and httpd.

    If all of these files were under version control and the updates were correct they could be committed with a single command:

    cvs commit -m "added" sysconfig

    Is this just busy-work? It does give you a history of changes to your installation that is useful and valuable, but is there a better way? I don't use a control panel (as I'm sure you guessed).

    Thanks in advance for opinions.
    your prime source for quality hosting services

  2. #2
    Join Date
    Jan 2002
    If you are used to use cvs or you are going to, then it's a nice way to keep old versions of config files.

    If you just need to keep copies of the old files, you can create a shell script that gets all these files from there respective places, tar, gzip and store them somewhere.

    However, cvs gives you extra features like quick rollback to older versions, update notes, easily compare different versions of the files, store only updates in files (save space?), as well as other features related to concurrent editing (merging, conflict resolution, branches, .. etc).
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts