logo

Let’s Work Together

Partner with you to deliver responsive and cost-effective IT & Support solutions
Reponsive
Cost-Effective
Partner with you
Focus
Attitude to Serve
Professional
These are the reasons why AionSolution is your vendor when you are seeking someone to support your IT in your office.
info@aionsolution.com
+852 2636 6177

Checking and Repairing the tables in the Zimbra logger database

Here is an example, using the “raw_logs” table:

$ logmysql zimbra_logger

mysql> check table raw_logs;
+————————+——-+———-+———-+
| Table                  | Op    | Msg_type | Msg_text |
+————————+——-+———-+———-+
| zimbra_logger.raw_logs | check | status   | OK       |

+————————+——-+———-+———-+
1 row in set (1.06 sec)
If a table does not show OK status, try repairing:

mysql> repair table raw_logs;
+————————+——–+———-+———-+
| Table                  | Op     | Msg_type | Msg_text |
+————————+——–+———-+———-+
| zimbra_logger.raw_logs | repair | status   | OK       |
+————————+——–+———-+———-+

1 row in set (2.32 sec)

How to shrink logger database
For first time is good to clean db manually if the database is very big. The commands bellow will delete all data in three tables (mta, amavis, raw_logs). If you need this data don’t execute them!

$zmlogswatchctl stop (don’t execute “zmloggerctl stop” this also stops logger mysqld)
$logmysql -D zimbra_logger
mysql> delete from amavis;
mysql> optimize table amavis;
mysql> delete from mta;
mysql> optimize table mta;
mysql> delete from raw_logs;
mysql> optimize table raw_logs;
mysql> quit
$zmlogswatchctl start