]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/main/sqlite.tex
main ok but web
[bacula/docs] / docs / manuals / en / main / sqlite.tex
index a5ef8790a82ebde9086f420e931fa2f35d0219ba..9d94f8f608e6e62d91f31a1ed35183e6dff70596 100644 (file)
@@ -21,53 +21,57 @@ such as {\bf bscan}, ...
 \index[general]{Phase I!Installing and Configuring SQLite -- }
 \index[general]{Installing and Configuring SQLite -- Phase I }
 
-If you use the {\bf ./configure \verb:--:with-sqlite} statement for configuring {\bf
+If you use the {\bf ./configure \lstinline:--:with-sqlite} statement for configuring {\bf
 Bacula}, you will need SQLite version 2.8.16 or later installed. Our standard
 location (for the moment) for SQLite is in the dependency package {\bf
 depkgs/sqlite-2.8.16}. Please note that the version will be updated as new
-versions are available and tested. 
+versions are available and tested.
 
-Installing and Configuring is quite easy. 
+Installing and Configuring is quite easy.
 
 \begin{enumerate}
-\item Download the Bacula dependency packages  
+\item Download the Bacula dependency packages
 \item Detar it with something like:
 
-   {\bf tar xvfz depkgs.tar.gz}  
+\begin{lstlisting}
+   tar xvfz depkgs.tar.gz
+\end{lstlisting}
 
    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 -}
+\begin{lstlisting}
+   zcat depkgs.tar.gz | tar xvf -
+\end{lstlisting}
 
-   will probably accomplish the same thing. 
+   will probably accomplish the same thing.
 
 \item {\bf cd depkgs}
 
-\item {\bf make sqlite}  
+\item {\bf make sqlite}
 
 \end{enumerate}
 
 
 Please note that the {\bf ./configure} used to build {\bf Bacula} will need to
-include {\bf \verb:--:with-sqlite} or {\bf \verb:--:with-sqlite3} depending
+include {\bf \lstinline:--:with-sqlite} or {\bf \lstinline:--:with-sqlite3} depending
 one which version of SQLite you are using. You should not use the {\bf
-\verb:--:enable-batch-insert} configuration parameter for Bacula if you
+\lstinline:--:enable-batch-insert} configuration parameter for Bacula if you
 are using SQLite version 2 as it is probably not thread safe.  If you
-are using SQLite version 3, you may use the {\bf \verb:--:enable-batch-insert} 
+are using SQLite version 3, you may use the {\bf \lstinline:--:enable-batch-insert}
 configuration option with Bacula, but when building SQLite3 you MUST
-configure it with {\bf \verb:--:enable-threadsafe} and 
-{\bf \verb:--:enable-cross-thread-connections}.
+configure it with {\bf \lstinline:--:enable-threadsafe} and
+{\bf \lstinline:--:enable-cross-thread-connections}.
 
 By default, SQLite3 is now run with {\bf PRAGMA synchronous=OFF} this
-increases the speed by more than 30 time, but it also increases the 
+increases the speed by more than 30 time, but it also increases the
 possibility of a corrupted database if your server crashes (power failure
 or kernel bug).  If you want more security, you can change the PRAGMA
 that is used in the file src/version.h.
 
 
 At this point, you should return to completing the installation of {\bf
-Bacula}. 
+Bacula}.
 
 
 \section{Installing and Configuring SQLite -- Phase II}
@@ -76,7 +80,7 @@ Bacula}.
 \index[general]{Installing and Configuring SQLite -- Phase II }
 
 This phase is done {\bf after} you have run the {\bf ./configure} command to
-configure {\bf Bacula}. 
+configure {\bf Bacula}.
 
 {\bf Bacula} will install scripts for manipulating the database (create,
 delete, make tables etc) into the main installation directory. These files
@@ -85,21 +89,21 @@ are also available in the \lt{}bacula-src\gt{}/src/cats directory after
 running ./configure. If you inspect create\_bacula\_database, you will see
 that it calls create\_sqlite\_database. The *\_bacula\_* files are provided
 for convenience. It doesn't matter what database you have chosen;
-create\_bacula\_database will always create your database. 
+create\_bacula\_database will always create your database.
 
-At this point, you can create the SQLite database and tables: 
+At this point, you can create the SQLite database and tables:
 
 \begin{enumerate}
 \item cd \lt{}install-directory\gt{}
 
-   This directory contains the Bacula catalog  interface routines.  
+   This directory contains the Bacula catalog  interface routines.
 
 \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. 
+   directory.
 \end{enumerate}
 
 \section{Linking Bacula with SQLite}
@@ -107,7 +111,7 @@ At this point, you can create the SQLite database and tables:
 \index[general]{Linking Bacula with SQLite }
 
 If you have followed the above steps, this will all happen automatically and
-the SQLite libraries will be linked into {\bf Bacula}. 
+the SQLite libraries will be linked into {\bf Bacula}.
 
 \section{Testing SQLite}
 \index[general]{SQLite!Testing }
@@ -120,13 +124,13 @@ 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}
+\begin{lstlisting}
 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}
+\end{lstlisting}
 \normalsize
 
 this is most likely caused by the fact that some versions of
@@ -142,27 +146,27 @@ to start Bacula in a current directory where it has write permission.
 
 After you have done some initial testing with {\bf Bacula}, you will probably
 want to re-initialize the catalog database and throw away all the test Jobs
-that you ran. To do so, you can do the following: 
+that you ran. To do so, you can do the following:
 
 \footnotesize
-\begin{verbatim}
+\begin{lstlisting}
   cd <install-directory>
   ./drop_sqlite_tables
   ./make_sqlite_tables
-\end{verbatim}
+\end{lstlisting}
 \normalsize
 
 Please note that all information in the database will be lost and you will be
 starting from scratch. If you have written on any Volumes, you must write an
-end of file mark on the volume so that Bacula can reuse it. Do so with: 
+end of file mark on the volume so that Bacula can reuse it. Do so with:
 
 \footnotesize
-\begin{verbatim}
+\begin{lstlisting}
    (stop Bacula or unmount the drive)
    mt -f /dev/nst0 rewind
    mt -f /dev/nst0 weof
-\end{verbatim}
+\end{lstlisting}
 \normalsize
 
 Where you should replace {\bf /dev/nst0} with the appropriate tape drive
-device name for your machine. 
+device name for your machine.