X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=docs%2Fmanual%2Fsqlite.tex;h=2c52a5266bb6a73555ee164ed4efdabb9044da39;hb=b51eef22af4b788c48b6d3a438d6ed09a5fc3190;hp=b2bfba7fcc25d9672b40e4e9bc82344b23c25441;hpb=e8bc3a36ffa590ae0e73124a9831e815e50d59e3;p=bacula%2Fdocs diff --git a/docs/manual/sqlite.tex b/docs/manual/sqlite.tex index b2bfba7f..2c52a526 100644 --- a/docs/manual/sqlite.tex +++ b/docs/manual/sqlite.tex @@ -20,9 +20,12 @@ depkgs/sqlite-2.8.16}. Please note that the version will be updated as new versions are available and tested. You may install and use SQLite version 3.x with Bacula by using: -{\bf ./configure \verb:--:with-sqlite3}. However, our testing indicates -that SQLite version 3.x is 4 to 10 times slower than version 2.8.16, and -consquently, we do not recommend using it. +{\bf ./configure \verb:--:with-sqlite3}. You should ensure that +when the database is created that you have used +\begin{verbatim} +PRAGMA synchronous = NORMAL; +\end{verbatim} +otherwiset SQLite version 3.x is 4 to 10 times slower than version 2.8.16. Installing and Configuring is quite easy. @@ -32,18 +35,18 @@ Installing and Configuring is quite easy. {\bf tar xvfz depkgs.tar.gz} -Note, the above command requires GNU tar. If you do not have GNU tar, a -command such as: + Note, the above command requires GNU tar. If you do not have GNU tar, a + command such as: -{\bf zcat depkgs.tar.gz | tar xvf -} + {\bf zcat depkgs.tar.gz | tar xvf -} -will probably accomplish the same thing. + will probably accomplish the same thing. \item {\bf cd depkgs} \item {\bf make sqlite} - \end{enumerate} +\end{enumerate} At this point, you should return to completing the installation of {\bf Bacula}. @@ -80,9 +83,9 @@ At this point, you can create the SQLite database and tables: \item ./make\_sqlite\_tables This script creates the SQLite database as well as the tables used by {\bf -Bacula}. This script will be automatically setup by the {\bf ./configure} -program to create a database named {\bf bacula.db} in {\bf Bacula's} working -directory. + Bacula}. This script will be automatically setup by the {\bf ./configure} + program to create a database named {\bf bacula.db} in {\bf Bacula's} working + directory. \end{enumerate} \subsection*{Linking Bacula with SQLite} @@ -98,13 +101,31 @@ the SQLite libraries will be linked into {\bf Bacula}. \index[general]{Testing SQLite } \addcontentsline{toc}{subsection}{Testing SQLite} -We have much less ``production'' experience +We have much less "production" experience using SQLite than using MySQL. SQLite has performed flawlessly for us in all our testing. However, several users have reported corrupted databases while using SQLite. For that reason, we do not recommend it for production use. +If Bacula crashes with the following type of error when it is started: +\footnotesize +\begin{verbatim} +Using default Catalog name=MyCatalog DB=bacula +Could not open database "bacula". +sqlite.c:151 Unable to open Database=/var/lib/bacula/bacula.db. +ERR=malformed database schema - unable to open a temporary database file +for storing temporary tables +\end{verbatim} +\normalsize + +this is most likely caused by the fact that some versions of +SQLite attempt to create a temporary file in the current directory. +If that fails, because Bacula does not have write permission on +the current directory, then you may get this errr. The solution is +to start Bacula in a current directory where it has write permission. + + \subsection*{Re-initializing the Catalog Database} \index[general]{Database!Re-initializing the Catalog } \index[general]{Re-initializing the Catalog Database }