From c9bea3254432fb735d13e44c706df66cc74931e8 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 6 Jun 2007 10:40:41 +0000 Subject: [PATCH] Updates --- docs/developers/version.tex | 2 +- docs/manual-de/version.tex | 2 +- docs/manual-fr/autochangers.tex | 19 ++--- docs/manual/bootstrap.tex | 21 +++++ docs/manual/console.tex | 45 ++++++----- docs/manual/dirdconf.tex | 2 +- docs/manual/dvd.tex | 3 + docs/manual/fileset.tex | 2 +- docs/manual/install.tex | 136 +++++++++++++++++++++----------- docs/manual/kaboom.tex | 37 ++++++--- docs/manual/postgresql.tex | 41 ++++++++-- docs/manual/progs.tex | 34 ++++++-- docs/manual/quickstart.tex | 7 +- docs/manual/restore.tex | 68 +++++++++++++--- docs/manual/sqlite.tex | 22 +++++- docs/manual/version.tex | 2 +- 16 files changed, 320 insertions(+), 123 deletions(-) diff --git a/docs/developers/version.tex b/docs/developers/version.tex index 2b98235d..b89eb851 100644 --- a/docs/developers/version.tex +++ b/docs/developers/version.tex @@ -1 +1 @@ -2.1.10 (18 May 2007) +2.1.12 (04 June 2007) diff --git a/docs/manual-de/version.tex b/docs/manual-de/version.tex index 2b98235d..b89eb851 100644 --- a/docs/manual-de/version.tex +++ b/docs/manual-de/version.tex @@ -1 +1 @@ -2.1.10 (18 May 2007) +2.1.12 (04 June 2007) diff --git a/docs/manual-fr/autochangers.tex b/docs/manual-fr/autochangers.tex index 04b5dc4c..e5d530fb 100644 --- a/docs/manual-fr/autochangers.tex +++ b/docs/manual-fr/autochangers.tex @@ -58,19 +58,12 @@ voyez la section "Support des lecteurs de codes barres" plus loin. Le support des librairies dans Bacula n'inclue pas, pour le moment, la gestion du nettoyage des lecteurs, ni celle des bacs de cartouches ou des silos. -Cependant, sous certaines conditions, vous pouvez parvenir \`a le faire -fonctionner avec des stackers (tels que gravity feed et apparent\'es). -(NDT : le dernier paragraphe n'est pas clair. Voici la vo : -Current Bacula autochanger support does not include cleaning, stackers, or -silos. However, under certain conditions, you may be able to make Bacula -work with stackers (gravity feed and such).) -Le support des librairies \`a plusieurs lecteurs requiert la ressource -\ilink{Autochanger resource}{AutochangerRes}, qui est aussi recommand\'ee -pour les librairies \`a un seul lecteur. +Le support des librairies \`a un ou plusieurs lecteurs requiert la ressource +\ilink{Autochanger resource}{AutochangerRes}. En principe, si {\bf mtx} fonctionne correctement avec votre librairie, ce -n'est qu'une question d'avaptation du script {\bf mtx-changer} pour que +n'est qu'une question d'adaptation du script {\bf mtx-changer} pour que Bacula s'interface correctement avec la librairie. Vous pouvez trouver une liste des librairies support\'ees par {\bf mtx} en suivant le lien suivant : \elink{http://mtx.opensource-sw.net/compatibility.php} @@ -102,7 +95,7 @@ cat /proc/scsi/scsi \normalsize pour conna\^itre vos p\'eriph\'eriques SCSI. Vous pouvez aussi examiner les fichiers -/proc/scsi/sg/device_hdr et /proc/scsi/sg/devices : +/proc/scsi/sg/device\_hdr et /proc/scsi/sg/devices : footnotesize \begin{verbatim} @@ -932,8 +925,8 @@ doivent retourner les informations : list -- retourne une ligne par cartouche pr\'esente dans la librairie au format : o\`u {\bf slot} est un entier non-nul repr\'esentant le num\'ero du slot, et {\bf barcode} est le code barres, - s'il existe et si la librairie le prend en charge, associ\'e \`a la cartouche - (dans le cas contraire, le champ "barcode" est laiss\'e blanc. + s'il existe et si la librairie le prend en charge, associ\'e \`a la cartouche + (dans le cas contraire, le champ "barcode" est laiss\'e blanc. slots -- retourne le nombre total de slots dans la librairie. \end{verbatim} \normalsize diff --git a/docs/manual/bootstrap.tex b/docs/manual/bootstrap.tex index ab2c3908..9e38a17e 100644 --- a/docs/manual/bootstrap.tex +++ b/docs/manual/bootstrap.tex @@ -347,6 +347,27 @@ in-memory tree, selecting everything and creates the bootstrap file. The {\bf no} answers the {\bf Do you want to run this (yes/mod/no)} question. +\label{bscanBootstrap} +\section{Bootstrap for bscan} +\index[general]{bscan} +\index[general]{bscan!bootstrap} +\index[general]{bscan bootstrap} +If you have a very large number of Volumes to scan with {\bf bscan}, +you may exceed the command line limit (511 characters). I that case, +you can create a simple bootstrap file that consists of only the +volume names. An example might be: + +\footnotesize +\begin{verbatim} +Volume="Vol001" +Volume="Vol002" +Volume="Vol003" +Volume="Vol004" +Volume="Vol005" +\end{verbatim} +\normalsize + + \section{A Final Example} \index[general]{Example!Final } \index[general]{Final Example } diff --git a/docs/manual/console.tex b/docs/manual/console.tex index 3acaebf4..bad65df0 100644 --- a/docs/manual/console.tex +++ b/docs/manual/console.tex @@ -290,15 +290,15 @@ The following commands are currently implemented: and want to later add it back. Normally, the {\bf label} command is used rather than this command - because the {\bf label} command labels the physical media (tape) and - does the equivalent of the {\bf add} command. The {\bf add} command - affects only the Catalog and not the physical media (data on Volumes). - The physical media must exist and be labeled before use (usually with - the {\bf label} command). This command can, however, be useful if you - wish to add a number of Volumes to the Pool that will be physically - labeled at a later time. It can also be useful if you are importing a - tape from another site. Please see the {\bf label} command below for - the list of legal characters in a Volume name. + because the {\bf label} command labels the physical media (tape, disk, + DVD, ...) and does the equivalent of the {\bf add} command. The {\bf + add} command affects only the Catalog and not the physical media (data + on Volumes). The physical media must exist and be labeled before use + (usually with the {\bf label} command). This command can, however, be + useful if you wish to add a number of Volumes to the Pool that will be + physically labeled at a later time. It can also be useful if you are + importing a tape from another site. Please see the {\bf label} command + below for the list of legal characters in a Volume name. \item [autodisplay on/off] \index[console]{autodisplay on/off} @@ -317,9 +317,9 @@ The following commands are currently implemented: \item [automount on/off] \index[console]{automount on/off} This command accepts {\bf on} or {\bf off} as the argument, and turns - auto-mounting of the tape after a {\bf label} command on or off + auto-mounting of the Volume after a {\bf label} command on or off respectively. The default is {\bf on}. If {\bf automount} is turned - off, you must explicitly {\bf mount} the tape after a label command to + off, you must explicitly {\bf mount} tape Volumes after a label command to use it. \item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{} ujobid=\lt{}unique-jobid\gt{}]}] @@ -489,8 +489,8 @@ label storage=>storage-name> volume=>volume-name> If you leave out any part, you will be prompted for it. The media type is automatically taken from the Storage resource definition that you supply. Once the necessary information is obtained, the Console program - contacts the specified Storage daemon and requests that the tape be - labeled. If the tape labeling is successful, the Console program will + contacts the specified Storage daemon and requests that the Volume be + labeled. If the Volume labeling is successful, the Console program will create a Volume record in the appropriate Pool. The Volume name is restricted to letters, numbers, and the special @@ -516,13 +516,16 @@ The label command can fail for a number of reasons: \begin{enumerate} \item The Volume name you specify is already in the Volume database. -\item The Storage daemon has a tape already mounted on the device, in which - case you must {\bf unmount} the device, insert a blank tape, then do the - {\bf label} command. -\item The tape in the device is already a Bacula labeled tape. (Bacula will - never relabel a Bacula labeled tape unless it is recycled and you use the + +\item The Storage daemon has a tape or other Volume already mounted on the + device, in which case you must {\bf unmount} the device, insert a blank + tape, then do the {\bf label} command. + +\item The Volume in the device is already a Bacula labeled Volume. (Bacula will + never relabel a Bacula labeled Volume unless it is recycled and you use the {\bf relabel} command). -\item There is no tape in the drive. + +\item There is no Volume in the drive. \end{enumerate} There are two ways to relabel a volume that already has a Bacula label. The @@ -536,10 +539,12 @@ system {\bf mt} program, something like the following: \end{verbatim} \normalsize +For a disk volume, you would manually delete the Volume. + Then you use the {\bf label} command to add a new label. However, this could leave traces of the old volume in the catalog. -The preferable method to relabel a tape is to first {\bf purge} the volume, +The preferable method to relabel a Volume is to first {\bf purge} the volume, either automatically, or explicitly with the {\bf purge} command, then use the {\bf relabel} command described below. diff --git a/docs/manual/dirdconf.tex b/docs/manual/dirdconf.tex index 7f739e55..93e69f99 100644 --- a/docs/manual/dirdconf.tex +++ b/docs/manual/dirdconf.tex @@ -817,7 +817,7 @@ JobDefs { in which case the value in the Pool resource overrides any value in the Job. This Storage resource definition is not required by either the Job resource or in the Pool, but it must be specified in - one or the other. If not configuration error will result. + one or the other, if not an error will result. \item [Max Start Delay = \lt{}time\gt{}] \index[dir]{Max Start Delay} diff --git a/docs/manual/dvd.tex b/docs/manual/dvd.tex index 925626b8..6928edd4 100644 --- a/docs/manual/dvd.tex +++ b/docs/manual/dvd.tex @@ -29,6 +29,9 @@ or patch {bf dvd+rw-tools-6.1.bacula.patch} if you have version 6.1 on your system. Unfortunately, this requires you to build the dvd\_rw-tools from source. +Note, some Linux distros such as Debian dvd+rw-tools-7.0-4 package already +have the patch applied, so please check. + The fact that Bacula cannot use the OS to write directly to the DVD makes the whole process a bit more error prone than writing to a disk or a tape, but nevertheless, it does work if you diff --git a/docs/manual/fileset.tex b/docs/manual/fileset.tex index 1f68d7e2..34afa78d 100644 --- a/docs/manual/fileset.tex +++ b/docs/manual/fileset.tex @@ -1,7 +1,7 @@ -% %% -\chapter{The FileSet Resource} +\section{The FileSet Resource} \label{FileSetResource} \index[general]{Resource!FileSet} \index[general]{FileSet Resource} diff --git a/docs/manual/install.tex b/docs/manual/install.tex index ac3716e4..02468b1f 100644 --- a/docs/manual/install.tex +++ b/docs/manual/install.tex @@ -26,23 +26,23 @@ four separate tar files each corresponding to a different module in the Bacula SVN. The released files are: \begin{description} -\item [bacula-1.38.0.tar.gz] +\item [bacula-2.0.3.tar.gz] This is the primary source code release for Bacula. On each - release the version number (1.38.0) will be updated. + release the version number (2.0.3) will be updated. -\item [bacula-docs-1.38.0.tar.gz] +\item [bacula-docs-2.0.3.tar.gz] This file contains a copy of the docs directory with the documents prebuild. English HTML directory, single HTML file, and pdf file. The French and German translations are in progress, but are not built. -\item [bacula-gui-1.38.0.tar.gz] +\item [bacula-gui-2.0.3.tar.gz] This file contains the non-core GUI programs. Currently, it contains bacula-web, a PHP program for producing management viewing of your Bacula job status in a browser; and bimagemgr a browser program for burning CDROM images with Bacula Volumes. -\item [bacula-rescue-1.8.1.tar.gz] +\item [bacula-rescue-2.0.0.tar.gz] This is the Bacula Rescue CDROM code. Note, the version number of this package is not tied to the Bacula release version, so it will be different. Using this code, you can burn a CDROM @@ -51,11 +51,19 @@ the Bacula SVN. The released files are: repartition and reformat your hard disks and reload your system with Bacula in the case of a hard disk failure. -\item [winbacula-1.38.0.exe] + Note, this package evolves slower than the Bacula source code, + so there may not always be a new release of the rescue package when + making minor updates to the Bacula code. For example, when releasing + Bacula version 2.0.3, the rescue package may still be at version + 2.0.0 if there were no updates. + +\item [winbacula-2.0.3.exe] This file is the 32 bit Windows installer for installing the Windows client (File daemon) on a Windows machine. + This client will also run on 64 bit Windows machines. Beginning with Bacula version 1.39.20, this executable will - also load the Win32 Director and the Win32 Storage daemon. + also optionally load the Win32 Director and the Win32 + Storage daemon. \end{description} @@ -311,6 +319,7 @@ The basic installation is rather simple. \begin{enumerate} \item Install and build any {\bf depkgs} as noted above. This should be unnecessary on most modern Operating Systems. + \item Configure and install MySQL or PostgreSQL (if desired). \ilink{Installing and Configuring MySQL Phase I}{MySqlChapter} or \ilink{Installing and Configuring PostgreSQL Phase @@ -327,14 +336,9 @@ The basic installation is rather simple. can skip this phase provided that you have built the thread safe libraries. And you have already installed the additional rpms noted above. -\item As an alternative to MySQL and PostgreSQL, configure and install SQLite, - which is part of the {\bf depkgs} and also available with most modern - Operating Systems. - \ilink{Installing and Configuring SQLite}{SqlLiteChapter}. SQLite is - probably not suited to a fair size production environment because it - tends to be slow compared to MySQL and it has few or poor tools for - repairing database damage. - + SQLite is not supported on Solaris. This is because it + frequently fails with bus errors. + \item Detar the Bacula source code preferably into the {\bf bacula} directory discussed above. @@ -365,9 +369,6 @@ machine to another. If the {\bf make distclean} fails, just ignore it and continue on. \item make -\begin{verbatim} - -\end{verbatim} If you get errors while linking in the Storage daemon directory (src/stored), it is probably because you have not loaded the static libraries on your system. I noticed this problem on a Solaris system. @@ -402,14 +403,14 @@ continue on. as the passwords and names must agree between the configuration files for security reasons. +\label{CreateDatabase} \item Create the Bacula MySQL database and tables (if using MySQL) \ilink{Installing and Configuring MySQL Phase II}{mysql_phase2} or create the Bacula PostgreSQL database and tables \ilink{Configuring PostgreSQL II}{PostgreSQL_configure} or alternatively if you are using - SQLite - \ilink{Installing and Configuring SQLite Phase II}{phase2}. + SQLite \ilink{Installing and Configuring SQLite Phase II}{phase2}. \item Start Bacula ({\bf ./bacula start}) Note. the next chapter shows you how to do this in detail. @@ -556,7 +557,8 @@ support it. Before building Bacula you need to decide if you want to use SQLite, MySQL, or PostgreSQL. If you are not already running MySQL or PostgreSQL, you might -want to start by testing with SQLite. This will greatly simplify the setup for you +want to start by testing with SQLite (not supported on Solaris). +This will greatly simplify the setup for you because SQLite is compiled into Bacula an requires no administration. It performs well and is suitable for small to medium sized installations (maximum 10-20 machines). However, we should note that a number of users have @@ -583,7 +585,7 @@ requires a certain knowledge to install and maintain. If you wish to use SQLite as the Bacula catalog, please see \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of -this manual. +this manual. SQLite is not supported on Solaris. \section{Quick Start} \index[general]{Quick Start} @@ -617,8 +619,8 @@ The following command line options are available for {\bf configure} to customize your installation. \begin{description} -\item [ {-}{-}sysbindir=\lt{}binary-path\gt{}] - \index[general]{{-}{-}sysbindir} +\item [ {-}{-}sbindir=\lt{}binary-path\gt{}] + \index[general]{{-}{-}sbindir} Defines where the Bacula binary (executable) files will be placed during a {\bf make install} command. @@ -665,12 +667,40 @@ customize your installation. keeping this option enabled as it helps detect memory leaks. This configuration parameter is used while building Bacula +\item [ {-}{-}enable-bat ] + \index[general]{{-}{-}enable-bat} + If you have Qt4 >= 4.2 installed on your computer including the + libqt4 and libqt4-devel libraries, and you want to use the + Bacula Administration Tool (bat) GUI Console interface to Bacula, you + must specify this option. Doing so will build everything in the {\bf + src/qt-console} directory. + +\item [ {-}{-}enable-batch-insert ] + \index[general]{{-}{-}enable-batch-insert} + This option enables batch inserts of the attribute records (default) in + the catalog database, which is much faster (10 times or more) than + without this option for large numbers of files. However, this option + will automatically be disabled if your SQL libraries are not + thread safe. SQLite2 is not thread safe, so this option cannot + be enabled when using it. However, on most systems, PostgreSQL, + and SQLite3 are thread safe. Bacula always links to the thread safe + MySQL libraries. + + As far as we can determine SQLite2 is not thread safe and so should + not be used if you have enabled batch insert in Bacula. + + As a default, Bacula runs SQLite3 with {\bf PRAGMA synchronous=OFF} + because it improves performance by more than 30 times. However, it + increases the possibility of a corrupted database. If you want more + security, please modify src/version.h appropriately (it should be + obvious when you look at the file). + \item [ {-}{-}enable-gnome ] \index[general]{{-}{-}enable-gnome} If you have GNOME installed on your computer including the GNOME development libraries, and you want to use the GNOME GUI Console interface to Bacula, you must specify this option. - Doing so will build everything in the {\bf src/gnome-console} directory. + Doing so will build everything in the {\bf src/gnome2-console} directory. \item [ {-}{-}enable-bwx-console ] \index[general]{{-}{-}enable-bwx-console} @@ -681,7 +711,6 @@ customize your installation. to install GNOME, as wxWidgets can work with GTK+, Motif or even X11 libraries. - \item [ {-}{-}enable-tray-monitor ] \index[general]{{-}{-}enable-tray-monitor} If you have GTK installed on your computer, you run a graphical @@ -760,7 +789,7 @@ customize your installation. \item [ {-}{-}enable-static-cons] \index[general]{{-}{-}enable-static-cons} This option causes the make process to build a {\bf static-console} and - a {\bf static-GNOME-console} in addition to the standard console. This + a {\bf static-gnome-console} in addition to the standard console. This static version will include statically linked libraries and could be useful during a Bare Metal recovery. @@ -838,7 +867,7 @@ customize your installation. sqlite-path} is not normally specified as Bacula looks for the necessary components in a standard location ({\bf depkgs/sqlite}). See \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of - this manual for more details. + this manual for more details. SQLite is not supported on Solaris. See the note below under the {-}{-}with-postgresql item. @@ -848,7 +877,7 @@ customize your installation. sqlite3-path} is not normally specified as Bacula looks for the necessary components in a standard location ({\bf depkgs/sqlite3}). See \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of - this manual for more details. + this manual for more details. SQLite3 is not supported on Solaris. \item [ {-}{-}with-mysql=\lt{}mysql-path\gt{}] \index[general]{{-}{-}with-mysql} @@ -1138,7 +1167,7 @@ CFLAGS="-g -Wall" ./configure \ --with-working-dir=$HOME/bacula/working \ --with-pid-dir=$HOME/bacula/bin/working \ --with-subsys-dir=$HOME/bacula/bin/working \ - --enable-GNOME \ + --enable-bat \ --enable-conio \end{verbatim} \normalsize @@ -1156,7 +1185,7 @@ CFLAGS="-g -Wall" ./configure \ --with-working-dir=$HOME/bacula/working --with-pid-dir=$HOME/bacula/bin/working \ --with-subsys-dir=$HOME/bacula/bin/working - --enable-GNOME \ + --enable-gnome \ --enable-conio \end{verbatim} \normalsize @@ -1171,7 +1200,7 @@ CFLAGS="-g -Wall" ./configure \ --sysconfdir=/etc/bacula \ --with-scriptdir=/etc/bacula \ --enable-smartalloc \ - --enable-GNOME \ + --enable-bat \ --with-mysql \ --with-working-dir=/var/bacula \ --with-pid-dir=/var/run \ @@ -1182,12 +1211,6 @@ CFLAGS="-g -Wall" ./configure \ Note, Bacula assumes that /var/bacula, /var/run, and /var/lock/subsys exist so it will not automatically create them during the install process. -Note, with gcc (GCC) 4.0.1 20050727 (Red Hat 4.0.1-5) on -an AMD64 CPU running 64 bit CentOS4, there is a compiler bug that generates -bad code that causes Bacula to segment fault. Typically you will see this -in the Storage daemon first. The solution is to compile Bacula ensuring -that no optimization is turned on (normally it is -O2). - \section{Solaris} \index[general]{Solaris} @@ -1198,6 +1221,11 @@ stdc++ and gcc\_s libraries), make 3.8 or later. You will probably also need to: Add /usr/local/bin to PATH and Add /usr/ccs/bin to PATH for ar. +It is possible to build Bacula on Solaris with the Solaris compiler, but +we recommend using GNU C++ if possible. + +A typical configuration command might look like: + \footnotesize \begin{verbatim} #!/bin/sh @@ -1241,6 +1269,25 @@ PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/o \end{verbatim} \normalsize +If you have installed special software not normally in the Solaris +libraries, such as OpenSSL, or the packages shown above, then you may need +to add {\bf /usr/sfw/lib} to the library search path. Probably the +simplest way to do so is to run: + +\footnotesize +\begin{verbatim} +setenv LDFLAGS "-L/usr/sfw/lib -R/usr/sfw/lib" +\end{verbatim} +\normalsize + +Prior to running the ./configure command. + +Alternatively, you can set the LD\_LIBARY\_PATH and/or the LD\_RUN\_PATH +environment variables appropriately. + +It is also possible to use the {\bf crle} program to set the library +search path. However, this should be used with caution. + \section{FreeBSD} \index[general]{FreeBSD} @@ -1280,7 +1327,8 @@ CFLAGS="-g -Wall" \ --sysconfdir=$HOME/bacula/bin \ --mandir=$HOME/bacula/bin \ --enable-smartalloc \ - --enable-GNOME \ + --enable-gnome \ + --enable-bat \ --enable-bwx-console \ --enable-tray-monitor \ --with-pid-dir=$HOME/bacula/bin/working \ @@ -1454,9 +1502,9 @@ going to run it to backup your system. After doing a {\bf make install} the following files will be installed on your system (more or less). The exact files and location (directory) for each file -depends on your {\bf ./configure} command (e.g. GNOME-console and -GNOME-console.conf are not installed if you do not configure GNOME. Also, if -you are using SQLite instead of mysql, some of the files will be different). +depends on your {\bf ./configure} command (e.g. bgnome-console and +bgnome-console.conf are not installed if you do not configure GNOME. Also, if +you are using SQLite instead of MySQL, some of the files will be different). \footnotesize \begin{verbatim} @@ -1483,8 +1531,8 @@ delete_catalog_backup drop_bacula_tables drop_mysql_tables fd -GNOME-console -GNOME-console.conf +bgnome-console +bgnome-console.conf make_bacula_tables make_catalog_backup make_mysql_tables diff --git a/docs/manual/kaboom.tex b/docs/manual/kaboom.tex index b4f16a5c..6005b3f9 100644 --- a/docs/manual/kaboom.tex +++ b/docs/manual/kaboom.tex @@ -25,7 +25,7 @@ For more details, please read on. \section{Traceback} -\index[general]{Traceback } +\index[general]{Traceback} Each of the three Bacula daemons has a built-in exception handler which, in case of an error, will attempt to produce a traceback. If successful the @@ -38,13 +38,22 @@ your system: \item You must have an installed copy of {\bf gdb} (the GNU debugger), and it must be on {\bf Bacula's} path. On some systems such as Solaris, {\bf gdb} may be replaced by {\bf dbx}. + \item The Bacula installed script file {\bf btraceback} must be in the same directory as the daemon which dies, and it must be marked as executable. + \item The script file {\bf btraceback.gdb} must have the correct path to it specified in the {\bf btraceback} file. + \item You must have a {\bf mail} program which is on {\bf Bacula's} path. By default, this {\bf mail} program is set to {\bf bsmtp}, so it must be correctly configured. + +\item If you run either the Director or Storage daemon under a non-root + userid, you will most likely need to modify the {\bf btraceback} file + to do something like {\bf sudo} (raise to root priority) for the + call to {\bf gdb} so that it has the proper permissions to debug + Bacula. \end{enumerate} If all the above conditions are met, the daemon that crashes will produce a @@ -117,8 +126,8 @@ and it is not on the default path, it will also fail. On some systems, it is preferable to use {\bf Mail} rather than {\bf mail}. \section{Getting A Traceback On Other Systems} -\index[general]{Getting A Traceback On Other Systems } -\index[general]{Systems!Getting A Traceback On Other } +\index[general]{Getting A Traceback On Other Systems} +\index[general]{Systems!Getting A Traceback On Other} It should be possible to produce a similar traceback on systems other than Linux, either using {\bf gdb} or some other debugger. Solaris with {\bf dbx} @@ -126,12 +135,14 @@ loaded works quite fine. On other systems, you will need to modify the {\bf btraceback} program to invoke the correct debugger, and possibly correct the {\bf btraceback.gdb} script to have appropriate commands for your debugger. If anyone succeeds in making this work with another debugger, please send us a -copy of what you modified. -\label{ManuallyDebugging} +copy of what you modified. Please keep in mind that for any debugger to +work, it will most likely need to run as root, so you may need to modify +the {\bf btraceback} script accordingly. +\label{ManuallyDebugging} \section{Manually Running Bacula Under The Debugger} -\index[general]{Manually Running Bacula Under The Debugger } -\index[general]{Debugger!Manually Running Bacula Under The } +\index[general]{Manually Running Bacula Under The Debugger} +\index[general]{Debugger!Manually Running Bacula Under The} If for some reason you cannot get the automatic traceback, or if you want to interactively examine the variable contents after a crash, you can run Bacula @@ -147,20 +158,21 @@ changes), you would do the following: \footnotesize \begin{verbatim} kill -15 PID - \end{verbatim} \normalsize where you replace {\bf PID} by the actual value. + \item At this point, the Director and the File daemon should be running but the Storage daemon should not. + \item cd to the directory containing the Storage daemon + \item Start the Storage daemon under the debugger: \footnotesize \begin{verbatim} gdb ./bacula-sd - \end{verbatim} \normalsize @@ -169,24 +181,26 @@ where you replace {\bf PID} by the actual value. \footnotesize \begin{verbatim} run -s -f -c ./bacula-sd.conf - \end{verbatim} \normalsize You may replace the {\bf ./bacula-sd.conf} with the full path to the Storage daemon's configuration file. + \item At this point, Bacula will be fully operational. + \item In another shell command window, start the Console program and do what is necessary to cause Bacula to die. + \item When Bacula crashes, the {\bf gdb} shell window will become active and {\bf gdb} will show you the error that occurred. + \item To get a general traceback of all threads, issue the following command: \footnotesize \begin{verbatim} thread apply all bt - \end{verbatim} \normalsize @@ -195,7 +209,6 @@ After that you can issue any debugging command. \section{Getting Debug Output from Bacula} \index[general]{Getting Debug Output from Bacula } - Each of the daemons normally has debug compiled into the program, but disabled. There are two ways to enable the debug output. One is to add the {\bf -d nnn} option on the command line when starting the debugger. The {\bf diff --git a/docs/manual/postgresql.tex b/docs/manual/postgresql.tex index 217adcba..4fb328f7 100644 --- a/docs/manual/postgresql.tex +++ b/docs/manual/postgresql.tex @@ -7,7 +7,7 @@ \index[general]{Installing and Configuring PostgreSQL } \index[general]{Upgrading} -Warning!!! If you are considering using PostreSQL, you should be aware +If you are considering using PostreSQL, you should be aware of their philosophy of upgrades, which could be destabilizing for a production shop. Basically at every major version upgrade, you are required to dump your database in an ASCII format, @@ -18,6 +18,10 @@ If you forget to do the ASCII dump, your database may become totally useless because none of the new tools can access it due to the format change, and the PostgreSQL server will not be able to start. +If you are building PostgreSQL from source, please be sure to add +the {\bf \verb:--:enable-thread-safety} option when doing the ./configure +for PostgreSQL. + \section{Installing PostgreSQL} \index[general]{PostgreSQL!Installing } @@ -44,6 +48,31 @@ If you are using FreeBSD, will be useful. Even if you are not using FreeBSD, the article will contain useful configuration and setup information. +If you configure the Batch Insert code in Bacula (attribute inserts are +10 times faster), you {\bf must} be using a PostgreSQL that was built with +the {\bf \verb:--:enable-thread-safety} option, otherwise you will get +data corruption. Most major Linux distros have thread safety turned on, but +it is better to check. One way is to see if the PostgreSQL library that +Bacula will be linked against references pthreads. This can be done +with a command such as: + +\footnotesize +\begin{verbatim} + nm /usr/lib/libpq.a | grep pthread_mutex_lock +\end{verbatim} +\normalsize + +The above command should print a line that looks like: + +\footnotesize +\begin{verbatim} + U pthread_mutex_lock +\end{verbatim} +\normalsize + +if does, then everything is OK. If it prints nothing, do not enable batch +inserts when building Bacula. + After installing PostgreSQL, you should return to completing the installation of {\bf Bacula}. Later, after Bacula is installed, come back to this chapter to complete the installation. Please note, the installation files used in the @@ -175,8 +204,8 @@ just prior the the existing ``local'' and ``host'' lines, add the line: \normalsize and restart the Postgres database server (frequently, this can be done -using "/etc/init.d/postgresql restart") to put this new authentication -rule into effect. +using "/etc/init.d/postgresql restart" or "service postgresql restart") to +put this new authentication rule into effect. Next, become the Postgres administrator, postgres, either by logging on as the postgres user, or by using su to become root and then using @@ -192,7 +221,7 @@ database for the bacula user using: \end{verbatim} \normalsize -Next, you'll have to add this password to two locations in the +You'll have to add this password to two locations in the bacula-dir.conf file: once to the Catalog resource and once to the RunBeforeJob entry in the BackupCatalog Job resource. With the password in place, these two lines should look something like: @@ -276,10 +305,12 @@ install: \begin{verbatim} postgresql postgresql-devel + postgresql-server + postgresql-libs \end{verbatim} \normalsize -This will be the same with most other package managers too. After +These will be similar with most other package managers too. After installing from rpms, you will still need to run the scripts that set up the database and create the tables as described above. diff --git a/docs/manual/progs.tex b/docs/manual/progs.tex index c9305caf..57eb39b5 100644 --- a/docs/manual/progs.tex +++ b/docs/manual/progs.tex @@ -445,8 +445,8 @@ chapter of this document. If you find yourself using this program, you have probably done something wrong. For example, the best way to recover a lost or damaged Bacula -database is to reload the database from using the bootstrap file that -was written when you saved it. +database is to reload the database by using the bootstrap file that +was written when you saved it (default bacula-dir.conf file). The {\bf bscan} program can be used to re-create a database (catalog) records from the backup information written to one or more Volumes. @@ -459,8 +459,8 @@ With some care, it can also be used to synchronize your existing catalog with a Volume. Although we have never seen a case of bscan damaging a catalog, since bscan modifies your catalog, we recommend that you do a simple ASCII backup of your database before running {\bf bscan} just -to be sure. See -\ilink{Compacting Your Database}{CompactingMySQL}. +to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for +the details of making a copy of your database. {\bf bscan} can also be useful in a disaster recovery situation, after the loss of a hard disk, if you do not have a valid {\bf bootstrap} file for @@ -498,10 +498,24 @@ you have provided security on your database, you may need to supply either the database name ({\bf -b} option), the user name ({\bf -u} option), and/or the password ({\bf -p}) options. -As an example, let's suppose that you did a backup to Volumes "Vol001" +NOTE: before {\bf bscan} can work, it needs at least a bare bones valid +database. If your database exists but some records are missing because +they were pruned, then you are all set. If your database was lost or +destroyed, then you must first ensure that you have the SQL program running +(MySQL or PostgreSQL), then you must create the Bacula database (normally +named bacula), and you must create the Bacula tables using the scripts in +the {\bf cats} directory. This is explained in the +\ilink{Installation}{CreateDatabase} chapter of the manual. Finally, before +scanning into an empty database, you must start and stop the Director with +the appropriate bacula-dir.conf file so that it can create the Client and +Storage records which are not stored on the Volumes. Without these +records, scanning is unable to connect the Job records to the proper +client. + +Forgetting for the moment the extra complications of a full rebuild of +your catalog, let's suppose that you did a backup to Volumes "Vol001" and "Vol002", then sometime later all records of one or both those -Volumes -were pruned or purged from the +Volumes were pruned or purged from the database. By using {\bf bscan} you can recreate the catalog entries for those Volumes and then use the {\bf restore} command in the Console to restore whatever you want. A command something like: @@ -544,6 +558,12 @@ If you have multiple tapes, you should scan them with: \end{verbatim} \normalsize +Since there is a limit on the command line length (511 bytes) accepted +by {\bf bscan}, if you have too many Volumes, you will need to manually +create a bootstrap file. See the \ilink{Bootstrap}{BootstrapChapter} +chapter of this manual for more details, in particular the section +entitled \ilink{Bootstrap for bscan}{bscanBootstrap}. + You should, always try to specify the tapes in the order they are written. However, bscan can handle scanning tapes that are not sequential. Any incomplete records at the end of the tape will simply be ignored in that diff --git a/docs/manual/quickstart.tex b/docs/manual/quickstart.tex index 65030e48..ec27025c 100644 --- a/docs/manual/quickstart.tex +++ b/docs/manual/quickstart.tex @@ -131,8 +131,8 @@ The Console configuration file is found in the directory specified on the ./configure} command and by default is named {\bf bconsole.conf}. If you choose to build the GNOME console with the {\bf -\verb:--:enable-GNOME} option, you also find a default configuration file -for it, named {\bf GNOME-console.conf}. +\verb:--:enable-gnome} option, you also find a default configuration file +for it, named {\bf bgnome-console.conf}. The same applies to the wxWidgets console, which is build with the {\bf \verb:--:enable-bwx-console} option, and the name of the default @@ -289,8 +289,9 @@ cd ./bacula-fd -t -c bacula-fd.conf ./bacula-sd -t -c bacula-sd.conf ./bconsole -t -c bconsole.conf -./GNOME-console -t -c GNOME-console.conf +./bgnome-console -t -c bgnome-console.conf ./bwx-console -t -c bwx-console.conf +./bat -t -c bat.conf su -c "./bacula-tray-monitor -t -c tray-monitor.conf" \end{verbatim} \normalsize diff --git a/docs/manual/restore.tex b/docs/manual/restore.tex index b847b6f4..c952f2ba 100644 --- a/docs/manual/restore.tex +++ b/docs/manual/restore.tex @@ -14,12 +14,18 @@ to restore files by automatically starting a job as you do with Backup, Verify, ... jobs. However, in addition to the console restore command, there is a standalone program named {\bf bextract}, which also permits restoring files. For more information on this program, please see the -\ilink{Bacula Utility Programs}{bextract} chapter of this manual. You will -also want to look at the {\bf bls} program in the same chapter, which -allows you to list the contents of your Volumes. Finally, if you have an -old Volume that is no longer in the catalog, you can restore the catalog -entries using the program named {\bf bscan}, documented in the same -\ilink{Bacula Utility Programs}{bextract} chapter. +\ilink{Bacula Utility Programs}{bextract} chapter of this manual. We +don't particularly recommend the {\bf bextract} program because it +lacks many of the features of the normal Bacula restore, such as the +ability to restore Win32 files to Unix systems, and the ability to +restore access control lists (ACL). As a consequence, we recommend, +wherever possible to use Bacula itself for restores as described below. + +You may also want to look at the {\bf bls} program in the same chapter, +which allows you to list the contents of your Volumes. Finally, if you +have an old Volume that is no longer in the catalog, you can restore the +catalog entries using the program named {\bf bscan}, documented in the same +\ilink{Bacula Utility Programs}{bscan} chapter. In general, to restore a file or a set of files, you must run a {\bf restore} job. That is a job with {\bf Type = Restore}. As a consequence, you will need @@ -746,6 +752,10 @@ encounter, and for same machine restores, how to avoid them. files, but in that case, you should individually use the "markdir" command to select all higher level directory entries (one at a time) to be restored if you want the directory entries properly restored. + +\item The {\bf bextract} program does not restore access control lists + (ACLs), nor will it restore non-portable Win32 data (default) to Unix + machines. \end{itemize} \label{Windows} @@ -843,18 +853,21 @@ what it is now after each individual test: \begin{enumerate} \item Set "Block Positioning = no" in your Device resource and try the restore. This is a new directive and untested. + \item Set "Minimum Block Size = 512" and "Maximum Block Size = 512" and try the restore. If you are able to determine the block size your drive was previously using, you should try that size if 512 does not work. This is a really horrible solution, and it is not at all recommended to continue backing up your data without correcting this condition. Please see the Tape Testing chapter for more on this. + \item Try editing the restore.bsr file at the Run xxx yes/mod/no prompt before starting the restore job and remove all the VolBlock statements. These are what causes Bacula to reposition the tape, and where problems occur if you have a fixed block size set for your drive. The VolFile commands also cause repositioning, but this will work regardless of the block size. + \item Use bextract to extract the files you want -- it reads the Volume sequentially if you use the include list feature, or if you use a .bsr file, but remove all the VolBlock statements after the .bsr file is @@ -880,6 +893,7 @@ warning messages. Some of the more common ones are: soft/hard link, and such. Simply check that all the files you wanted were actually restored. \end{itemize} + \item [file size error] When Bacula restores files, it checks that the size of the restored file is the same as the file status data it saved @@ -1070,7 +1084,7 @@ job. \index[general]{Database!Restoring} This and the following sections will try to present a few of the kinds of -problems that can come up making restoring more difficult. I'll try to +problems that can come up making restoring more difficult. We will try to provide a few ideas how to get out of these problem situations. In addition to what is presented here, there is more specific information on restoring a \ilink{Client}{restore_client} and your @@ -1114,6 +1128,7 @@ Bacula}{RescueChapter} chapter of this manual. restore job. If you are using the default bacula-dir.conf, this Job will be named {\bf RestoreFiles}. Most likely it will prompt you with something such as: + \footnotesize \begin{verbatim} Run Restore job @@ -1130,6 +1145,7 @@ Priority: 10 OK to run? (yes/mod/no): \end{verbatim} \normalsize + A number of the items will be different in your case. What you want to do is: to use the mod option to change the Bootstrap to point to your saved bootstrap file; and to make sure all the other items such as @@ -1160,9 +1176,9 @@ OK to run? (yes/mod/no): the critical items are the Volume name(s), the Volume Session Id and the Volume Session Time. If you know those, you can easily restore your Catalog. + \footnotesize \begin{verbatim} - 22-Apr 10:22 HeadMan: Start Backup JobId 7510, Job=CatalogBackup.2005-04-22_01.10.0 22-Apr 10:23 HeadMan: Bacula 1.37.14 (21Apr05): 22-Apr-2005 10:23:06 @@ -1190,7 +1206,6 @@ Job=CatalogBackup.2005-04-22_01.10.0 FD termination status: OK SD termination status: OK Termination: Backup OK - \end{verbatim} \normalsize @@ -1264,11 +1279,13 @@ FileIndex=1-1 \end{verbatim} \normalsize and restores nothing. + \item[Solution] Most likely the File records were pruned from the database either due to the File Retention period expiring or by explicitly purging the Job. By using the "llist jobid=nn" command, you can obtain all the important information about the job: + \footnotesize \begin{verbatim} llist jobid=120 @@ -1298,12 +1315,14 @@ llist jobid=120 \normalsize Then you can find the Volume(s) used by doing: + \footnotesize \begin{verbatim} sql select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.MediaId; \end{verbatim} \normalsize + Finally, you can create a bootstrap file as described in the previous problem above using this information. @@ -1319,8 +1338,10 @@ select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.M know the Volume to which it was backed up. \item [Solution] - Either bscan the tape, or use {\bf bls} to indicate where it is on the - tape. For example: + Either bscan the tape (see below for bscanning), or better use {\bf bls} + to find where it is on the tape, then use {\bf bextract} to + restore the database. For example, + \footnotesize \begin{verbatim} @@ -1390,5 +1411,30 @@ Choose a query (1-16): \end{verbatim} \normalsize +\item[Problem] + I didn't backup my database. What do I do now? +\item[Solution] + This is probably the worst of all cases, and you will probably have + to re-create your database from scratch and then bscan in all your + Volumes, which is a very long, painful, and inexact process. + +There are basically three steps to take: + +\begin{enumerate} +\item Ensure that your SQL server is running (MySQL or PostgreSQL) + and that the Bacula database (normally bacula) exists. See the + \ilink{Installation}{CreateDatabase} chapter of the manual. +\item Ensure that the Bacula databases are created. This is also + described at the above link. +\item Start and stop the Bacula Director using the propriate + bacula-dir.conf file so that it can create the Client and + Storage records which are not stored on the Volumes. Without these + records, scanning is unable to connect the Job records to the proper + client. +\end{enumerate} + +When the above is complete, you can begin bscanning your Volumes. Please +see the \ilink{bscan}{bscan} section of the Volume Utility Tools of this +chapter for more details. \end{description} diff --git a/docs/manual/sqlite.tex b/docs/manual/sqlite.tex index db380acd..ebd6653a 100644 --- a/docs/manual/sqlite.tex +++ b/docs/manual/sqlite.tex @@ -22,7 +22,7 @@ when the database is created that you have used \begin{verbatim} PRAGMA synchronous = NORMAL; \end{verbatim} -otherwise SQLite version 3.x is four to ten times slower than version 2.8.16. +otherwise SQLite version 3.x is four to ten times slower than version 2.8.17. Installing and Configuring is quite easy. @@ -45,11 +45,27 @@ Installing and Configuring is quite easy. \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 +one which version of SQLite you are using. You should not use the {\bf +\verb:--: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} +configuration option with Bacula, but when building SQLite3 you MUST +configure it with {\bf \verb:--:enable-threadsafe} and +{\bf \verb:--: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 +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}. -Please note that the {\bf ./configure} used to build {\bf Bacula} will need to -include {\bf \verb:--:with-sqlite}. \section{Installing and Configuring SQLite -- Phase II} \label{phase2} diff --git a/docs/manual/version.tex b/docs/manual/version.tex index 2b98235d..b89eb851 100644 --- a/docs/manual/version.tex +++ b/docs/manual/version.tex @@ -1 +1 @@ -2.1.10 (18 May 2007) +2.1.12 (04 June 2007) -- 2.39.5