> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:amavis-user- > [EMAIL PROTECTED] On Behalf Of Mark Martinec > Sent: Friday, December 15, 2006 9:46 PM > To: [email protected] > Subject: Re: [AMaViS-user] disaster recovery backup fo bayesian DB? > > Leon, > > > I thought of disaster recovery backup. > > I've read the man pages but still not clear about backing up Bayesian > > DB files (I don't use SQL DB for now). > > > > 1) Is the following command is legit? > > sa-learn --sync --showdots --backup > backup.txt > > I guess so. It's been long time since I used it (with a move to SQL), > but SA docs still suggests it (sql/README.bayes). > > > Is this command make backup of bayes_seen, bayes_toks, user_prefs, > > auto-whitelist altogether? > > Just the bayes_seen and bayes_toks I believe. > > > > 2) Should I stop SA(amavisd-new) from running during this backup? > > Preferably if you can afford it (but it can take a long time). > A good compromise is probably to just disable bayes autolearning, > so the database would run essentially in read-only mode, > and SA/amavisd may still be running. >
OK. That gives me an idea to add "bayes_learn_to_journal 1" to my local.cf. This will cause learning to be done into a "journal" file which periodically gets merged into the main bayes DB. This causes the live bayes to be delayed in update until the next sync (once a day or every 100k of bayes data by default), but I can force-sync any manual training runs by running sa-learn --sync afterwards. In this case, in theory, I'll do (no need to stom amavis or to disable bayes autolearning): a) make my usual manual sa-learn b) sa-learn --sync c) sa-learn --showdots --backup > backup.txt d) next automatic sync will occur once a day or every 100k of bayes data by default > > 3) Where can I read amore about AWL backup and .mutex files (I'm not > > familiar with those)? > > I don't think there is an equivalent to sa-learn --backup > for AWL. Just stop amavisd and copy the database. Or do a db_dump > if you have a Berkeley database. > The script from here looks promising, I'll check it: http://mail-archives.apache.org/mod_mbox/spamassassin-users/200402.mbox/%3C4 [EMAIL PROTECTED] It makes a backup copy of the "old" AWL db, creates a fresh db and copies only those addresses that have a count greater than 1 from old to new. It then moves the new db over the old one and makes sure ownership of the new db is correct if running as root. Didn't want to autodelete the old db in case something broke. - http://www.deepnet.cx/~kdeugau/spamtools/trim_whitelist > It is probably not a big deal to start AWL from scratch > if the database is lost. > > About .mutex I don't know. A general suggestion\ > is to have a > lock_method flock > in local.cf Already have this in local.cf > > Mark > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > AMaViS-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/amavis-user > AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 > AMaViS-HowTos:http://www.amavis.org/howto/ Regards. Leon ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ AMaViS-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
