Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
mention InnoDB and clean up mysql repair section
Browse files Browse the repository at this point in the history
Signed-off-by: Joerg Steffens <joerg.steffens@dass-it.de>
  • Loading branch information
sebastianlederer authored and joergsteffens committed Sep 16, 2013
1 parent 4e1e20c commit 2744275
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions manuals/en/main/catmaintenance.tex
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 2744275

Please sign in to comment.