List Info

Thread: Backing up Maia configuration




Backing up Maia configuration
user name
2006-05-12 23:36:51
Hello,

I would like to separate the "configuration" and
the "data" part of my backup
of Maia system, so I would really like to know which tables
in Maia database
could be emptied (deleted all rows) and Maia would still
work normally - I
would like to preserve users and their settings but for
example I don't need
to preserve quarantined and "probably ham" mail
(I guess these are stored in
maia_mail table). I am asking this because I would like to
backup my Maia config
part daily but not the data part - and in the case of
disaster, if I would
recreate Maia database without that data part, it should
still work.

I hope I was clear enough,

Thanks.
Nejc
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
Backing up Maia configuration
user name
2006-05-13 20:53:30
Nejc Skoberne wrote:

> I would like to separate the
"configuration" and the "data" part
of my backup
> of Maia system, so I would really like to know which
tables in Maia database
> could be emptied (deleted all rows) and Maia would
still work normally - I
> would like to preserve users and their settings but for
example I don't need
> to preserve quarantined and "probably ham"
mail (I guess these are stored in
> maia_mail table). I am asking this because I would like
to backup my Maia config
> part daily but not the data part - and in the case of
disaster, if I would
> recreate Maia database without that data part, it
should still work. 

Well, it depends on what you consider
"configuration" vs. "data", of
course.  Obviously cached mail and references to it are
"data", but what
about your whitelists/blacklists, your Bayes database or AWL
table?
Maia can certainly work even if you wipe all the rows from
those tables
(since they're "data"), but on the other hand
they get used to help
determine spam from non-spam, so you probably want them to
be persistent
like the rest of your "configuration" data.

It may be best to just explain what the various tables are
used for, so
you can decide for yourself what you want to backup:

Address/account information:

users
policy
maia_users

Domain information:

maia_domains
maia_domain_admins

Whitelists/blacklists:

mailaddr
wblist

System-wide configuration:

maia_config
schema_info

Lookup tables:

maia_themes
maia_languages
maia_viruses
maia_virus_aliases
maia_sa_rules

Statistics:

maia_stats
maia_stats_history

SpamAssassin AWL and Bayes databases:

awl
bayes_expire
bayes_global_vars
bayes_seen
bayes_token
bayes_vars

Cached mail and references to it:

maia_mail
maia_mail_recipients
maia_viruses_detected
maia_sa_rules_triggered
maia_banned_attachments_found

Digest login/confirm tokens:

maia_tokens

Based on your description, I'd guess that you probably want
to consider
the cached mail tables and the digest token tables
"data", and leave
everything else as "configuration" data for your
purposes.

-- 
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
Backing up Maia configuration
user name
2006-05-14 11:01:40
Hi Robert,

> It may be best to just explain what the various tables
are used for, so
> you can decide for yourself what you want to backup:

Well, that's exactly what I wanted.  Thanks a
lot.

> SpamAssassin AWL and Bayes databases:
> 
> awl
> bayes_expire
> bayes_global_vars
> bayes_seen
> bayes_token
> bayes_vars

One more question: I have been running Maia 1.0.0 RC5 for
quite some time on many
servers, and I just noticed that the tables above are empty
everywhere. Instead,
I can always find these files on my systems:

rootIllusion:/var/amavis/.spamassassin# ls -al
total 6788
drwx------  2 vscan  vscan      512 14 maj 12:55 .
drwxr-x---  6 vscan  vscan      512 14 maj 02:27 ..
-rw-------  1 vscan  vscan  2654208 14 maj 12:55
auto-whitelist
-rw-------  1 vscan  vscan    30216 14 maj 12:55
bayes_journal
-rw-------  1 vscan  vscan  2539520 14 maj 12:55 bayes_seen
-rw-------  1 vscan  vscan  2654208 14 maj 12:55 bayes_toks
-rw-r--r--  1 vscan  vscan     1175 26 jul  2005 user_prefs

How can I make SpamAssassin store its data into Maia table
instead into these
files? (I'd check the docs again the web page, but the
Maia's webserver seems
to be down?)

> Cached mail and references to it:
> 
> maia_mail
> maia_mail_recipients
> maia_viruses_detected
> maia_sa_rules_triggered
> maia_banned_attachments_found
> 
> Digest login/confirm tokens:
> 
> maia_tokens
> 
> Based on your description, I'd guess that you probably
want to consider
> the cached mail tables and the digest token tables
"data", and leave
> everything else as "configuration" data for
your purposes.

Yes, I guess I will really use these as "data"
and perhaps also statistics,
since they are of no practical use to me (they are not
needed for Maia to
operate I guess).

Thanks again!

Nejc
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
Backing up Maia configuration
user name
2006-05-14 11:58:08
Hi,

awl
bayes_expire
bayes_global_vars
bayes_seen
bayes_token
bayes_vars 

Those are SpamAssassin (SA) specific tables. They are used
by SA process ONLY if SA is configured to use SQL as Bayes
and AWL rules data storage. 

> I can always find these files on my systems:
> 
> rootIllusion:/var/amavis/.spamassassin# ls -al
> total 6788
> drwx------  2 vscan  vscan      512 14 maj 12:55 .
> drwxr-x---  6 vscan  vscan      512 14 maj 02:27 ..
> -rw-------  1 vscan  vscan  2654208 14 maj 12:55
auto-whitelist
> -rw-------  1 vscan  vscan    30216 14 maj 12:55
bayes_journal
> -rw-------  1 vscan  vscan  2539520 14 maj 12:55
bayes_seen
> -rw-------  1 vscan  vscan  2654208 14 maj 12:55
bayes_toks
> -rw-r--r--  1 vscan  vscan     1175 26 jul  2005
user_prefs

In your case you are using Berkeley DB as SA data storage
and those files are SA data Berkeley databases.

I STRONGLY advise you (and anybody else, who is still using
Berkeley DB as SA data stage) to move to SQL data storage as
it is MUCH faster and more reliable. You will need SA
version >= 3.1 and preferably MySQL >= 4.1.

A few hints:

- read everything in
/usr/local/share/doc/p5-Mail-SpamAssassin/sql/
- read http://www200.pair.com/mecham/spam/debian-spamass
assin-sql.html

and general SA local.cf for MySQL 4.1.* data storage (I'm
using separate database (spamassassin) for SA, but tables
are the same as in Maia DB):

bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn                  
DBI:mysql:spamassassin:localhost
bayes_sql_username              spamassassin
bayes_sql_password              ***

auto_whitelist_factory         
Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                   
DBI:mysql:spamassassin:localhost
user_awl_sql_username           spamassassin
user_awl_sql_password           ***

user_scores_dsn                
DBI:mysql:spamassassin:localhost
user_scores_sql_password        ***
user_scores_sql_username        spamassassin


-- 
Kind regards, Marko Kobal.
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
Backing up Maia configuration
user name
2006-05-14 16:43:41
Nejc Skoberne wrote:

> How can I make SpamAssassin store its data into Maia
table instead into
> these files?

There's a FAQ item that explains the steps involved in
converting your
Berkeley DB-style Bayes and AWL databases to SQL:
<https://secure.renaissoft.com/maia/wiki/SpamAss
assin3SQLBayes>

-- 
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )