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}. 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.
\begin{enumerate}
{\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}.
\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}
\index[general]{Testing SQLite }
\addcontentsline{toc}{subsection}{Testing SQLite}
-As of this date (20 March 2002), we have much less ``production'' experience
-using SQLite than using MySQL. That said, we should note that SQLite has
-performed flawlessly for us in all our testing.
+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 }