I store configuration files under revision control
Submitted by root
| Never |
![]() 64% | 386 votes |
| Sometimes |
![]() 25% | 152 votes |
| Always |
![]() 8% | 52 votes |
| Total 598 votes |
[ Parent ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
I find rcs useful for this - as it lets you edit files in place, keeping the history in x.org,v for the file x.org.
It doesn't require a repository so it is very lightweight - plus it will allow you to easily see the differences between versions, something which is commonly useful on configuration files and hard to achieve with dated-backup files.
Steve
--
[ Parent ]
[ Parent ]
[ Parent ]
http://linuxjournal.com/article/5976
[ Parent ]
[ Parent ]
does anyone know an solution of using a rcs like svn, but without having the .svn directorys everywhere in /etc?
greetings
Anton
[ Parent ]
I don't use it for /etc, i prefer a classic incremental backup with cp -al and rsync -aH...
[ Parent ]
Are there any well tested Versioning File System under Linux?
---
László Kiss
[ Parent ]
#!/bin/sh
#
# Save a copy of any file in /etc that has been changed.
# To be run daily from via cron
# RGB
#
#ert -x # Trace
#set -e # Exit on error
SRCDIR=/etc
DESTDIR=/var/local/etcBackup
CYCLES=10
/usr/bin/test -d $DESTDIR || mkdir -p -m755 $DESTDIR
cd $DESTDIR
for file in `/usr/bin/find $SRCDIR \( -type f -o -type l \)`; do
# Exceptions. Do not backup
case $file in
*~) /bin/rm $file; continue;;
/etc/modules.conf.old) continue;;
/etc/.serial.conf.old) continue;;
/etc/sgml/*.old) continue;;
/etc/webmin/webmin.acl.bak) continue;;
*bak|*.dpkg*|*.old) echo "Check $file"; continue;;
/etc/ld.so.cache|/etc/mtab|/etc/adjtime) continue;;
esac
# do nothing if file is empty
test -s $file || continue
if [ -e ./$file ]; then
/usr/bin/cmp -s $file ./$file && continue
/usr/bin/savelog -p -c $CYCLES ./$file >/dev/null
else
dir=`/usr/bin/dirname $file`
test -d ./$dir || mkdir -p ./$dir
fi
/bin/cp -dp $file ./$file
done
[ Parent ]
I'm not sure if it's even possible, but from working with FreeBSD quite alot lately, I've noticed that alot of the system config files have what look like RCS style keywords, but with a $FreeBSD: $ tag rather than something more common like $Id: $.
I'd really like to have subversion do something similar, but using a format like $hostname: $ so that an "Id" style tag wouldn't overwrite the actual package release version that's often also in config files.
Anyone know how I might achieve this, or have any links?
Cheers.
[ Parent ]

64%
[ Send Message | View Weblogs ]
--
"It's Not Magic, It's Work"
Adam
[ Parent ]