Use FSVS to keep track of Linux server configuration changes

Posted in Linux

FSVS is the abbreviation for “Fast System Versioning” and is pronounced [fisvis].

It is a complete backup/restore/versioning tool for all files in a directory tree or whole filesystems, with a subversion repository as the backend. 

Using this application, all files(almost) in /etc/ are maintained in a subversion repository. As files get created in /etc/ they are added to the repository automatically. commit’s to the repository are executed on a daily basis with a cron job in /etc/cron.daily.  Configuration creation, updates, and deletions are easy to see and track down long after the fact, eliminating questions like, “When did this get changed?? and what the heck did it look like before!?”

  • fsvs does not pollute directories with .svn folders.
  • It keeps track of everything with file lists and hashes in /etc/fsvs/ and /var/spool/fsvs/
  • All fsvs repositories can be stored in one place to make it easy to back up.

I think of it as a safety parachute, incase the regular one doesn’t work. (my regular method of backing up a config is to copy the original file with the extension “.old”, “.bak”, or “.orig”)

How to install it

Commands to run from the subversion server, “TheServer”

# yum install fsvs
# mkdir /RAID/fsvs_repos
# svnadmin create /RAID/fsvs_repos/TargetHost

Commands run from the client machine, “TargetHost”

# yum install fsvs
# cd /etc   ($pwd must be the base directory you want to use to populate the repository)
# fsvs urls svn://theserver/fsvs_repos/TargetHostName  (this points to the berkley db you just created on “theserver”)
# fsvs ignore ./fsvs
# fsvs ignore ./ld.so.cache
# fsvs ignore ./prelink.cache
# fsvs ignore ./lvm
# fsvs ignore ./localtime
# fsvs ignore ./.pwd.lock
# fsvs ignore ./selinux
# fsvs commit -m “Initial fsvs commit”

Daily cron commit setup

A one liner cron in /etc/cron.weekly/fsvs.cron should be all you need.

/usr/bin/fsvs commit -m “cron commit at `date +%R_%d-%m-%Y`”

Posted by admica   @   14 October 2008
Tags : , , , , , ,

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« Tricky little OpenLDAP replication gotcha’s
Next Post
ICMP type 3 - Destination unreachable messages »
Powered by Wordpress   |   Lunated designed by ZenVerse