From 2744275785f4b7b02e2e1e7baa6f5bb7f43b1341 Mon Sep 17 00:00:00 2001 From: Sebastian Lederer Date: Mon, 16 Sep 2013 15:58:57 +0200 Subject: [PATCH] mention InnoDB and clean up mysql repair section Signed-off-by: Joerg Steffens --- manuals/en/main/catmaintenance.tex | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/manuals/en/main/catmaintenance.tex b/manuals/en/main/catmaintenance.tex index e824142..60cb871 100644 --- a/manuals/en/main/catmaintenance.tex +++ b/manuals/en/main/catmaintenance.tex @@ -107,10 +107,12 @@ \subsection{Compacting Your MySQL Database} Even though Bareos regularly prunes files, {\bf MySQL} does not automatically reuse the space, and instead continues growing. +It is assumed that you are using the {\bf InnoDB} database engine (which is the default since MySQL Version 5.5). + It is recommended that you use the {\bf OPTIMIZE TABLE} and {\bf ANALYZE TABLE} statements regularly. This is to make sure that all indices are up to date and to recycle space inside the database files. -Please note that the database files are never shrunk by {\bf MySQL}. + You can do this via the {\bf mysqlcheck} command: \footnotesize @@ -119,6 +121,8 @@ \subsection{Compacting Your MySQL Database} \end{verbatim} \normalsize +Please note that the database files are never shrunk by {\bf MySQL}. + If you really need to shrink the database files, you need to recreate the database. This only works if you use per-table tablespaces by setting the {\bf innodb\_file\_per\_table} configuration option. @@ -145,13 +149,14 @@ \subsection{Repairing Your MySQL Database} If you find that you are getting errors writing to your MySQL database, or Bareos hangs each time it tries to access the database, you should consider -running MySQL's database check and repair routines. The program you need to -run depends on the type of database indexing you are using. If you are using -the default, you will probably want to use {\bf myisamchk}. For more details -on how to do this, please consult the MySQL document at: -\elink{ -http://www.mysql.com/doc/en/Repair.html} -{http://www.mysql.com/doc/en/Repair.html}. +running MySQL's database check and repair routines. + +This can be done by running the {\bf mysqlcheck } command: +\footnotesize +\begin{verbatim} +mysqlcheck --all-databases +\end{verbatim} +\normalsize If the errors you are getting are simply SQL warnings, then you might try running \command{bareos-dbcheck} before (or possibly after) using the MySQL database repair