On Wed, Apr 20, 2005 at 01:33:30PM -0700, Lan Barnes wrote:
> 
> If you're at all familiar with RCS, you'll immediately concede that it
> won't make the cut. Mind you, I'm a great advocate of RCS for file
> archiving, and will in a separate email address methods for doing
> exactly that with RCS. RCS belongs in everyone's kit of tools IMHO
> because of its smallness and flexibility. It is to SCM what lynx is to
> browsers -- an essential tool that is not necessarily the first choice.

This is my missive on using RCS for backing up critical directories,
such as /etc/

Sometimes all you want to do with a SCM tool is provide roll-back to a
former state. This can be particularly true in a directory like /etc/
which has a gazillion config files, only a few of which you may be
hacking at.

Here is my partial list:

hosts
fstab
inittab
maybe passwd(-) and group(-) (LDAP and/or NIS are really designed for
this)

Here is one technique.

1. make the directory /etc/RCS/ as root

2. while in the /etc/ dir, use the command:

   ci -l <filename>

to make archives of the files you want to track

3. add the following to root's crontab (or script it as root and add it
to one of the /etc/cron.xxxx directories):

  cd /etc/
  ci -l -q -m"" RCS/*,v
  rcs -nYOUR_LEGAL_RCS_LABEL_HERE: RCS/*,v

That's all. Please note in the rcs command that the "-n" and following
":" are not part of the tag.

Because RCS archives may be searched for check-in times, the labeling
step (rcs -n) may be skipped. Read "man rcs" before deciding you know
what a legal label is.

That's all there is to it. The archives will be updated as frequently as
the cron job, but only with files that you've initialized to track. Only
changed files will be checked in. The tip of each archive is the last
revision checked in. The blanket tag will allow you to recover a set of
interrelated files that were simultaneously working.

The downside to this technique is that it requires you to jump around
from dir to dir (and have an .../RCS subdir in each) to follow files in
multiple directories.

HTH,

-- 
Lan Barnes                    [EMAIL PROTECTED]
Linux Guy, SCM Specialist     858-354-0616
-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to