(Answer) (Category) Faq-O-Matic Faq-O-Matic : (Category) Administrators' Guide : (Category) Suggestions : (Category) A web interface for recovering old text :
Use RCS symbolic names to set a "baseline"
To solve the "global consistency" problem across the RCS files, you can set a RCS symbolic name (symname) stamp on all of the files. A maintenance cron job could also mark the files with date-stamp symbolic names. Using symbolic names makes it easy to recover all the files back to a know state (even if it is done manually).

Example crontab:

05 01 * * * rcs -N$(date +m\%md\%d): /home/httpd/cgi-bin/fom-meta/RCS/*,v

Eventually you'll end up with about 365 symnames in each file. (The -N option will allow a symname be updated with a new value.) This seems like a good compromise for automatically marking the files each day, with no need to remove old symnames. You can include the year in the symname, but then you should periodically remove old symnames.

For longer term protection, you could mark the files, monthly, with a symname that includes the year:

05 01 01 * * rcs -N$(date +y\%Ym\%m): /home/httpd/cgi-bin/fom-meta/RCS/*,v

Example of a manual recovery to roll files back to Nov. 14:

cd /home/httpd/html/fom
# Create a directory to put the recovered files in.
mkdir item.recover
cd item.recover
# Need to use -f (force), because FOM locks the files and they are writable.
co -fm11d14 /home/httpd/cgi-bin/fom-meta/RCS/*,v
# Make the files writable, because the "co" leaves them read-only.
chmod u+w *
# Move the recovered files to replace the current files (saving the
# current files).
cd ..
mv item item.orig.$(date +%Y%m%d)
mv item.recover item
[Rebuild the cache]

Symnames can also be used to "mark" a released set of files (or some other noteworthy event). For example, if the FAQ is exported to a CD-ROM with a product (with version 2.3), a special symname can be used to mark the versions that went on the CD-ROM:

rcs -NRel2-3: /home/httpd/cgi-bin/fom-meta/RCS/*,v

[Append to This Answer]
Previous: (Answer) Web interface to RCS backup data
This document is: http://www.jonh.net/cgi-bin/faqomatic/fom?file=595
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by SourceForge Logo and jonh.net.