From: Kern Sibbald Date: Thu, 25 Sep 2008 18:46:00 +0000 (+0000) Subject: Add Joao's libdbi documentation X-Git-Tag: Release-3.0.0~936 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9d7e898cfdb19c19b7df532b8f1a4dc2750070c;p=bacula%2Fdocs Add Joao's libdbi documentation --- diff --git a/docs/manuals/en/concepts/concepts.kilepr b/docs/manuals/en/concepts/concepts.kilepr index b2e64431..0f8d2dd8 100644 --- a/docs/manuals/en/concepts/concepts.kilepr +++ b/docs/manuals/en/concepts/concepts.kilepr @@ -161,10 +161,10 @@ order=-1 [item:newfeatures.tex] archive=true -column=25 +column=28 encoding=UTF-8 highlight=LaTeX -line=972 +line=509 open=true order=0 diff --git a/docs/manuals/en/concepts/newfeatures.tex b/docs/manuals/en/concepts/newfeatures.tex index 3a19ebe8..0cb0b6b5 100644 --- a/docs/manuals/en/concepts/newfeatures.tex +++ b/docs/manuals/en/concepts/newfeatures.tex @@ -437,6 +437,73 @@ By using different command lines to {\bf bpipe}, you can backup any kind of data (ASCII or binary) depending on the program called. +\section{libdbi framework} +As a general guideline, Bacula has support for a few catalog database drivers coded natively by the Bacula team. +With the libdbi implementation, which is a Bacula driver that uses libdbi to access the catalog, we have an +open field to use many different kinds database engines following the needs of users. + +The according to libdbi (http://libdbi.sourceforge.net/) project: libdbi implements a database-independent +abstraction layer in C, similar to the DBI/DBD layer in Perl. Writing one generic set of code, +programmers can leverage the power of multiple databases and multiple simultaneous database +connections by using this framework. + +Currently the libdbi driver in Bacula project only supports the same drivers natively coded in Bacula. +However the libdbi project has support for many others database engines. You can view the list at http://libdbi-drivers.sourceforge.net/. In the future all those drivers can be supported by Bacula, +however, they must be tested properly by the Bacula team. + +Some of benefits of using libdbi are: +\begin{itemize} + \item The possibility to use proprietary databases engines in which your proprietary +licenses prevent the Bacula team from developing the driver. + \item The possibility to use the drivers written for the libdbi project. + \item The possibility to use other database engines without recompiling Bacula to use them. + Just change one line in bacula-dir.conf + \item Abstract Database access, this is, unique point to code and profiling catalog database access. + \end{itemize} + + The following drivers have been tested: + \begin{itemize} + \item PostgreSQL, with and without batch insert + \item Mysql, with and without batch insert + \item SQLite + \item SQLite3 + \end{itemize} + +In the future, we will test and approve to use others databases engines (proprietary or not) like DB2, Oracle, Microsoft SQL. + +To compile Bacula to support libdbi we need to configure the code with the --with-dbi and --with-dbi-driver=[database] +./configure options, where [database] is the database engine to be used with Bacula +(of course we can change the driver in file bacula-dir.conf, see below). +We must configure the access port of the database engine with the option +--with-db-port, because the libdbi framework doesn't know the default access port +of each database. + +The next phase is checking (or configuring) the bacula-dir.conf, example: +\begin{verbatim} +Catalog { + Name = MyCatalog + dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306 + dbname = regress; user = regress; password = "" +} +\end{verbatim} + +The parameter {\bf dbdriver} indicates that we will use the driver dbi with a mysql database. +Currently the drivers supported by Bacula are: postgresql, mysql, sqlite, sqlite3; +these are the names that may be added to string "dbi:". + +The following limitations apply when Bacula is set to use the libdbi framework: + - Not tested on the Win32 platform + - A little performance is lost if comparing with native database driver. + The reason is bound with the database driver provided by libdbi and the + simple fact that one more layer of code was added. + +It is important to remember, when compiling Bacula with libdbi, the following packages are needed: + \begin{itemize} + \item libdbi version 1.0.0, http://libdbi.sourceforge.net/ + \item libdbi-drivers 1.0.0, http://libdbi-drivers.sourceforge.net/ + \end{itemize} + +You can download them and compile them on your system or install the packages from your OS distribution. \section{Display Autochanger Content}