[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

BDB Log handler script

From: Kirby C. Bohling <kbohling_at_birddog.com>
Date: 2002-02-05 04:40:06 CET

Attached is a simple script which will process a list of repositories.
It lacks a usage or help message. I am not a shell expert, this is a
very simple script which checks fairly basic things and runs them.
Given db_archive's current behavior of not printing anything at all if
there is an -h followed by something that is a legal directory I can't
find any glaring flaws with it. db_archive segfaults if it isn't a real
directory, but I check for that in the script.

        gzip in place is there and commented out, the default behaviour is
deleting the old logs. The user can provide an alterative script to
process files. One highly useful one would be to move the files to a
different directory, and gzip. Point tmpwatch at that directory in cron
and you will have old log removal after a certain number of days.

        It can be done in a script, but tmpwatch is easier and more robust then
any script I will write. Using find with the ctime option is the way I
have done it previously. If somebody wants one I will modify a local
script I have to act like tmpwatch.

        The script also allows the user to pick an alterative way to figure out
what log files are to be archived in case db_archive turns out to be
flawed. I presume that db_archive doesn't list it as ready to be
archived until it is completely written to disk. If it doesn't there
could be a minor race condition during a log file write.

I'm not a shell god, hopefully I didn't screw anything up too badly.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat Oct 21 14:37:04 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.