On Mon, 8 Dec 2003, Theo Van Dinter wrote: > On Mon, Dec 08, 2003 at 01:11:06PM -0600, [EMAIL PROTECTED] wrote: > > I'd like to back up the journal periodicly to disk. Right now I have > > There's really no point to that. Just sync the journal to the DB.
Ok, then I guess I have a faulty understanding between journal and DB. I thought that the bayes engine wrote its information directly to the database (which is stored in the location specified by the local.cf file "bayes_path" option in sleepycat format). In this directory (which I've configured to be: /tmp/spamassassin/.spamassassin), there are the following bayes files: bayes_journal bayes_seen bayes_toks I thought that bayes_journal was the database that the bayes engine was writing to, and I wanted to back it up in case of power failure. However, after reading the sa-learn page once more, I see that the bayes_toks file is the actual database, and that the bayes_journal and bayes_toks are sync'd periodicly, which is what you were suggesting, I guess. So rather than backing up all three files, I just need to back up the bayes_toks file periodicly. And I could use a file lock for this purpose, as you confirmed below. Further questions: what config option controls how often the _journal and _toks files are sync'd? would the sa-learn --rebuild do the sync of the journal and db manually? Thanks for the quick response, Theo! cary > > > searching through the archives and docs, I've not found anything > > regarding this issue. How have others solved this problem of backing > > up a live bayes journal database? Would a perl script using file > > locking be a viable workaround, at least allowing the MTA to continue > > processing email? > > sure. I forget the details of bayes file locking, but you can probably > just make a bayes.lock file (open O_EXCL), copy the DBs, then remove > the lock file. > ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk