4 \chapter{Installing Bacula}
6 \index[general]{Bacula!Installing}
7 \index[general]{Installing Bacula}
9 In general, you will need the Bacula source release, and if you want to run
10 a Windows client, you will need the Bacula Windows binary release.
11 However, Bacula needs certain third party packages (such as {\bf MySQL},
12 {\bf PostgreSQL}, or {\bf SQLite} to build and run
13 properly depending on the
14 options you specify. Normally, {\bf MySQL} and {\bf PostgreSQL} are
15 packages that can be installed on your distribution. However, if you do
16 not have them, to simplify your task, we have combined a number of these
17 packages into three {\bf depkgs} releases (Dependency Packages). This can
18 vastly simplify your life by providing you with all the necessary packages
19 rather than requiring you to find them on the Web, load them, and install
22 \section{Source Release Files}
23 \index[general]{Source Files}
24 \index[general]{Release Files}
25 Beginning with Bacula 1.38.0, the source code has been broken into
26 four separate tar files each corresponding to a different module in
27 the Bacula SVN. The released files are:
30 \item [bacula-5.0.0.tar.gz]
31 This is the primary source code release for Bacula. On each
32 release the version number (5.0.0) will be updated.
34 \item [bacula-docs-5.0.0.tar.bz2]
35 This file contains a copy of the docs directory with the
36 documents prebuild. English HTML directory, single HTML
37 file, and pdf file. The French, German, Spanish translations
38 are in progress, but are not built.
40 \item [bacula-gui-5.0.0.tar.gz]
41 This file contains the non-core GUI programs. Currently,
42 it contains bacula-web, a PHP program for producing management
43 viewing of your Bacula job status in a browser; and bimagemgr
44 a browser program for burning CDROM images with Bacula Volumes.
46 \item [bacula-rescue-5.0.0.tar.gz]
47 This is the Bacula Rescue USB key code. Note, the version number
48 of this package is not always tied to the Bacula release version, so
49 it may be different. Using this code, you can create a USB key
50 with your system configuration and containing a statically
51 linked version of the File daemon. This can permit you to easily
52 repartition and reformat your hard disks and reload your
53 system with Bacula in the case of a hard disk failure.
55 \item [win32bacula-5.0.0.exe]
56 This file is the 32 bit Windows installer for installing
57 the Windows client (File daemon) on a Windows machine.
58 This client will also run on 64 bit Windows machines, but
59 VSS support is not available if you are running a 64 bit
60 version of Windows. This installer installs only the FD,
61 the Director and Storage daemon are not included.
64 \item [win64bacula-5.0.0.exe]
65 This file is the 64 bit Windows installer for installing
66 the Windows client (File daemon) on a Windows machine.
67 This client will only run on 64 bit Windows OS machines.
68 It will not run on 32 bit machines or 32 bit Windows OSes.
69 The win64bacula release is necessary for Volume Shadow
70 Copy (VSS) to work on Win64 OSes. This installer
71 installs only the FD, the Director and Storage daemon
77 \section{Upgrading Bacula}
78 \index[general]{Bacula!Upgrading}
79 \index[general]{Upgrading Bacula}
80 \index[general]{Upgrading}
82 If you are upgrading from one Bacula version to another, you should first
83 carefully read the ReleaseNotes of all major versions between your current
84 version and the version to which you are upgrading. In many upgrades,
85 especially for minor patch upgrades (e.g. between 3.0.0 and 3.0.1) there
86 will be no database upgrade, and hence the process is rather simple.
88 With version 3.0.0 and later, you {\bf must} ensure that on any one
89 machine that all components of Bacula are running on exactly the
90 same version. Prior to version 3.0.0, it was possible to run a
91 lower level FD with a newer Director and SD. This is no longer the
94 As always, we attempt to support older File daemons. This avoids the
95 need to do a simultaneous upgrade of many machines. For exactly what
96 older versions of the FD are supported, please see the ReleaseNotes
97 for the new version. In any case, you must always upgrade both the
98 Director and the Storage daemon at the same time, and you must also
99 upgrade any File daemon that is running on the same machine as a Director
100 or a Storage daemon (see the prior paragraph).
102 If the Bacula catalog
103 database has been upgraded (as it is almost every major release), you will
104 either need to reinitialize your database starting from scratch (not
105 normally a good idea), or save an ASCII copy of your database, then proceed
106 to upgrade it. If you are upgrading two major versions (e.g. 1.36 to 2.0)
107 then life will be more complicated because you must do two database
108 upgrades. See below for more on this.
110 Upgrading the catalog is normally done after Bacula is build and installed
114 cd <installed-scripts-dir> (default /etc/bacula)
115 ./update_bacula_tables
118 This update script can also be find in the Bacula source src/cats
121 If there are several database upgrades between your version and the
122 version to which you are upgrading, you will need to apply each database
123 upgrade script. For your convenience, you can find all the old upgrade scripts
124 in the {\bf upgradedb} directory of the source code. You will need to edit the
125 scripts to correspond to your system configuration. The final upgrade script,
126 if any, can be applied as noted above.
128 If you are upgrading from one major version to another, you will need to
129 replace all your components at the same time as generally the inter-daemon
130 protocol will change. However, within any particular release (e.g. version
131 1.32.x) unless there is an oversight or bug, the daemon protocol will not
132 change. If this is confusing, simply read the ReleaseNotes very carefully as
133 they will note if all daemons must be upgraded at the same time.
135 Finally, please note that in general it is not necessary or desirable
136 to do a {\bf make uninstall} before doing an upgrade providing you are careful
137 not to change the installation directories. In fact, if you do so, you will
138 most likely delete all your conf files, which could be disastrous.
139 The normal procedure during an upgrade is simply:
142 ./configure (your options)
147 In general none of your existing .conf or .sql files will be overwritten,
148 and you must do both the {\bf make} and {\bf make install} commands, a
149 {\bf make install} without the preceding {\bf make} will not work.
151 For additional information on upgrading, please see the \borgxrlink{Upgrading Bacula Versions}{upgrading}{problems}{section} of the \problemsman{}.
153 \section{Releases Numbering}
154 \index[general]{Release Numbering}
155 \index[general]{Version Numbering}
156 Every Bacula release whether beta or production has a different number
157 as well as the date of the release build. The numbering system follows
158 traditional Open Source conventions in that it is of the form.
169 where each component (major, minor, patch) is a number.
170 The major number is currently 1 and normally does not change
171 very frequently. The minor number starts at 0 and increases
172 each for each production release by 2 (i.e. it is always an
173 even number for a production release), and the patch number is
174 starts at zero each time the minor number changes. The patch
175 number is increased each time a bug fix (or fixes) is released
178 So, as of this date (10 September 2006), the current production Bacula
179 release is version 1.38.11. If there are bug fixes, the next release
180 will be 1.38.12 (i.e. the patch number has increased by one).
182 For all patch releases where the minor version number does not change,
183 the database and all the daemons will be compatible. That means that
184 you can safely run a 1.38.0 Director with a 1.38.11 Client. Of course,
185 in this case, the Director may have bugs that are not fixed. Generally,
186 within a minor release (some minor releases are not so minor), all
187 patch numbers are officially released to production. This means that while
188 the current Bacula version is 1.38.11, versions 1.38.0, 1.38.1, ... 1.38.10
189 have all been previously released.
191 When the minor number is odd, it indicates that the package is under
192 development and thus may not be stable. For example, while the current
193 production release of Bacula is currently 1.38.11, the current development
194 version is 1.39.22. All patch versions of the development code are
195 available in the SVN (source repository). However, not all patch versions
196 of the development code (odd minor version) are officially released. When
197 they are released, they are released as beta versions (see below for a
198 definition of what beta means for Bacula releases).
200 In general when the minor number increases from one production release
201 to the next (i.e. 1.38.x to 1.40.0), the catalog database must be upgraded,
202 the Director and Storage daemon must always be on the same minor release
203 number, and often (not always), the Clients must also be on the same minor
204 release. As often as possible, we attempt to make new releases that are
205 downwards compatible with prior clients, but this is not always possible.
206 You must check the release notes. In general, you will have fewer problems
207 if you always run all the components on the same minor version number (i.e.
208 all either 1.38.x or 1.40.x but not mixed).
212 \section*{Beta Releases}
213 \index[general]{Beta Releases}
214 Towards the end of the development cycle, which typically runs
215 one year from a major release to another, there will be several beta
216 releases of the development code prior to a production release.
217 As noted above, beta versions always have odd minor version numbers
218 (e.g 1.37.x or 1.39.x).
219 The purpose of the beta releases is to allow early adopter users to test
220 the new code. Beta releases are made with the following considerations:
223 \item The code passes the regression testing on FreeBSD, Linux, and Solaris
226 \item There are no known major bugs, or on the rare occasion that
227 there are, they will be documented or already in the bugs database.
229 \item Some of the new code/features may not yet be tested.
231 \item Bugs are expected to be found, especially in the new
232 code before the final production release.
234 \item The code will have been run in production in at least one small
237 \item The Win32 client will have been run in production at least
238 one night at that small site.
240 \item The documentation in the manual is unlikely to be complete especially
241 for the new features, and the Release Notes may not be fully
244 \item Beta code is not generally recommended for everyone, but
245 rather for early adopters.
250 \section{Dependency Packages}
251 \index[general]{Dependency Packages}
252 \index[general]{Packages!Dependency}
254 As discussed above, we have combined a number of third party packages that
255 Bacula might need into the {\bf depkgs} release. You can,
256 of course, get the latest packages from the original authors or
257 from your operating system supplier. The locations of
258 where we obtained the packages are in the README file in each package.
259 However, be aware that the packages in the depkgs files have been tested by us
260 for compatibility with Bacula.
262 Typically, a dependency package will be named {\bf depkgs-ddMMMyy.tar.gz}
263 where {\bf dd} is the day we release it, {\bf MMM}
264 is the abbreviated month (e.g. Jan), and {\bf yy} is the year. An actual
265 example is: {\bf depkgs-18Dec.tar.gz}. To install and build this package (if
266 needed), you do the following:
269 \item Create a {\bf bacula} directory, into which you will place both the
270 Bacula source as well as the dependency package.
271 \item Detar the {\bf depkgs} into the {\bf bacula} directory.
272 \item cd bacula/depkgs
276 Although the exact composition of the dependency packages may change from time
277 to time, the current makeup is the following:
279 \addcontentsline{lot}{table}{Dependency Packages}
280 \begin{longtable}{|l|l|l|}
282 \multicolumn{1}{|c| }{\bf 3rd Party Package} & \multicolumn{1}{c| }{\bf depkgs}
283 & \multicolumn{1}{c| }{\bf depkgs-qt} \\
284 \hline {SQLite3 } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{ }\\
285 \hline {mtx } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{ } \\
286 \hline {qt4 } & \multicolumn{1}{c| }{ } & \multicolumn{1}{c| }{X } \\
290 Note, some of these packages are quite large, so that building them can be a
291 bit time consuming. The above instructions will build all the packages
292 contained in the directory. However, when building Bacula, it will take only
293 those pieces that it actually needs.
295 Alternatively, you can make just the packages that are needed. For example,
304 will configure and build only the SQLite package.
306 You should build the packages that you will require in {\bf depkgs} a
307 prior to configuring and building Bacula, since Bacula will need
308 them during the build process.
310 Note, the {\bf depkgs-qt} package is required for building bat, because
311 bat is currently built with Qt version 4.3.4. It can be built with other
312 Qt versions, but that almost always creates problems or introduces
315 You can build the depkgs-qt with the following:
320 tar xfvz depkgs-qt-28Jul09.tar.gz
327 Doing the {\bf source qt4-path} defines the following environment
338 Each one should point to a specific location in the depkgs-qt package
339 that you loaded. It also puts the depkgs-qt/qt4/bin directory
340 on your path before all other directories. This ensures that
341 the bat build will use your Qt 4.3.4 library rather than any that
342 might be on your system.
344 Before running your Bacula build, please make sure that
345 {\bf qmake-qt4} is not on your path. If it is please rename it. If
346 you don't do this, Bacula will attempt to build with any Qt4 package
347 installed on your system rather than the one you just built.
348 If you logoff and log back in, you must re-source the depkgs-qt/qt4-patch
349 file before attempting to rebuild the bat part of Bacula.
351 For more information on the {\bf depkgs-qt} package, please read the
352 INSTALL file in the main directory of that package. If you are going to
353 build Qt4 using {\bf depkgs-qt}, you must source the {\bf qt4-paths} file
354 included in the package prior to building Bacula. Please read the INSTALL
355 file for more details.
357 Even if you do not use SQLite, you might find it worthwhile to build {\bf mtx}
358 because the {\bf tapeinfo} program that comes with it can often provide you
359 with valuable information about your SCSI tape drive (e.g. compression,
360 min/max block sizes, ...). Note, most distros provide {\bf mtx} as part of
363 The {\bf depkgs1} package is depreciated and previously contained
364 readline, which should be available on all operating systems.
366 The {\bf depkgs-win32} package is deprecated and no longer used in
367 Bacula version 1.39.x and later. It was previously used to build
368 the native Win32 client program, but this program is now built on Linux
369 systems using cross-compiling. All the tools and third party libraries
370 are automatically downloaded by executing the appropriate scripts. See
371 src/win32/README.mingw32 for more details.
373 \section{Supported Operating Systems}
375 \index[general]{Systems!Supported Operating}
376 \index[general]{Supported Operating Systems}
378 Please see the \ilink{Supported Operating Systems}{SupportedOSes} section
379 of the QuickStart chapter of this manual.
381 \section{Building Bacula from Source}
383 \index[general]{Source!Building Bacula from}
384 \index[general]{Building Bacula from Source}
386 The basic installation is rather simple.
389 \item Install and build any {\bf depkgs} as noted above. This
390 should be unnecessary on most modern Operating Systems.
392 \item Configure and install MySQL or PostgreSQL (if desired).
393 \ilink{Installing and Configuring MySQL Phase I}{MySqlChapter} or
394 \ilink{Installing and Configuring PostgreSQL Phase I}{PostgreSqlChapter}. If you are installing from rpms, and are
395 using MySQL, please be sure to install {\bf mysql-devel}, so that the MySQL
396 header files are available while compiling Bacula. In addition, the MySQL
397 client library {\bf mysqlclient} requires the gzip compression library {\bf
398 libz.a} or {\bf libz.so}. If you are using rpm packages, these libraries are
399 in the {\bf libz-devel} package. On Debian systems, you will need to load the
400 {\bf zlib1g-dev} package. If you are not using rpms or debs, you will need to
401 find the appropriate package for your system.
403 Note, if you already have a running MySQL or PostgreSQL on your system, you
404 can skip this phase provided that you have built the thread safe libraries.
405 And you have already installed the additional rpms noted above.
407 SQLite is not supported on Solaris. This is because it
408 frequently fails with bus errors. However SQLite3 may work.
410 \item Detar the Bacula source code preferably into the {\bf bacula} directory
413 \item {\bf cd} to the directory containing the source code.
415 \item ./configure (with appropriate options as described below). Any
416 path names you specify as options on the ./configure command line
417 must be absolute paths and not relative.
419 \item Check the output of ./configure very carefully, especially the Install
420 binaries and Install config directories. If they are not correct,
421 please rerun ./configure until they are. The output from ./configure is
422 stored in {\bf config.out} and can be re-displayed at any time without
423 rerunning the ./configure by doing {\bf cat config.out}.
425 \item If after running ./configure once, you decide to change options and
426 re-run it, that is perfectly fine, but before re-running it, you should run:
434 so that you are sure to start from scratch and not have a mixture of the two
435 options. This is because ./configure caches much of the information. The {\bf
436 make distclean} is also critical if you move the source directory from one
437 machine to another. If the {\bf make distclean} fails, just ignore it and
441 If you get errors while linking in the Storage daemon directory
442 (src/stored), it is probably because you have not loaded the static
443 libraries on your system. I noticed this problem on a Solaris system.
444 To correct it, make sure that you have not added {\bf
445 {-} {-}enable-static-tools} to the {\bf ./configure} command.
447 If you skip this step ({\bf make}) and proceed immediately to the {\bf
448 make install} you are making two serious errors: 1. your install will
449 fail because Bacula requires a {\bf make} before a {\bf make install}.
450 2. you are depriving yourself of the chance to make sure there are no
451 errors before beginning to write files to your system directories.
455 Please be sure you have done a {\bf make} before entering this command,
456 and that everything has properly compiled and linked without errors.
459 \item If you are new to Bacula, we {\bf strongly} recommend that you skip
460 the next step and use the default configuration files, then run the
461 example program in the next chapter, then come back and modify your
462 configuration files to suit your particular needs.
464 \item Customize the configuration files for each of the three daemons
465 (Directory, File, Storage) and for the Console program. For the details
466 of how to do this, please see \ilink{Setting Up Bacula Configuration Files}{ConfigureChapter} in the Configuration chapter of this manual. We
467 recommend that you start by modifying the default configuration files
468 supplied, making the minimum changes necessary. Complete customization
469 can be done after you have Bacula up and running. Please take care when
470 modifying passwords, which were randomly generated, and the {\bf Name}s
471 as the passwords and names must agree between the configuration files
472 for security reasons.
474 \label{CreateDatabase}
475 \item Create the Bacula MySQL database and tables
477 \ilink{Installing and Configuring MySQL Phase II}{mysql_phase2} or
478 create the Bacula PostgreSQL database and tables
479 \ilink{Configuring PostgreSQL II}{PostgreSQL_configure} or alternatively if you are using
480 SQLite \ilink{Installing and Configuring SQLite Phase II}{phase2}.
482 \item Start Bacula ({\bf ./bacula start}) Note. the next chapter shows you
483 how to do this in detail.
485 \item Interface with Bacula using the Console program
487 \item For the previous two items, please follow the instructions in the
488 \ilink{Running Bacula}{TutorialChapter} chapter of this manual,
489 where you will run a simple backup and do a restore. Do this before you make
490 heavy modifications to the configuration files so that you are sure that
491 Bacula works and are familiar with it. After that changing the conf files
494 \item If after installing Bacula, you decide to "move it", that is to
495 install it in a different set of directories, proceed as follows:
501 ./configure (your-new-options)
510 If all goes well, the {\bf ./configure} will correctly determine which
511 operating system you are running and configure the source code appropriately.
512 Currently, FreeBSD, Linux (Red Hat), and Solaris are supported. The Bacula
513 client (File daemon) is reported to work with MacOS X 10.3 is if
514 readline support is not enabled (default) when building the client.
516 If you install Bacula on more than one system, and they are identical, you can
517 simply transfer the source tree to that other system and do a "make
518 install". However, if there are differences in the libraries or OS versions,
519 or you wish to install on a different OS, you should start from the original
520 compress tar file. If you do transfer the source tree, and you have previously
521 done a ./configure command, you MUST do:
529 prior to doing your new ./configure. This is because the GNU autoconf tools
530 cache the configuration, and if you re-use a configuration for a Linux machine
531 on a Solaris, you can be sure your build will fail. To avoid this, as
532 mentioned above, either start from the tar file, or do a "make distclean".
534 In general, you will probably want to supply a more complicated {\bf
535 configure} statement to ensure that the modules you want are built and that
536 everything is placed into the correct directories.
538 For example, on Fedora, Red Hat, or SuSE one could use the following:
544 --sbindir=/opt/bacula/bin \
545 --sysconfdir=/opt/bacula/etc \
546 --with-pid-dir=/var/run \
547 --with-subsys-dir=/var/run \
549 --with-working-dir=/opt/bacula/working \
550 --with-dump-email=$USER
554 The advantage of using the above configuration to start is that
555 everything will be put into a single directory, which you can later delete
556 once you have run the examples in the next chapter and learned how Bacula
557 works. In addition, the above can be installed and run as non-root.
559 For the developer's convenience, I have added a {\bf defaultconfig} script to
560 the {\bf examples} directory. This script contains the statements that you
561 would normally use, and each developer/user may modify them to suit his needs.
562 You should find additional useful examples in this directory as well.
564 The {\bf \verb:--:enable-conio} or {\bf \verb:--:enable-readline} options are
565 useful because they provide a command line history, editing capability for the
566 Console program and tab completion on various option. If you have included
567 either option in the build, either the {\bf termcap} or the {\bf ncurses}
568 package will be needed to link. On most systems, including Red Hat and SuSE,
569 you should include the ncurses package. If Bacula's configure process finds
570 the ncurses libraries, it will use those rather than the termcap library. On
571 some systems, such as SuSE, the termcap library is not in the standard library
572 directory. As a consequence, the option may be disabled or you may get an
573 error message such as:
577 /usr/lib/gcc-lib/i586-suse-linux/3.3.1/.../ld:
578 cannot find -ltermcap
579 collect2: ld returned 1 exit status
583 while building the Bacula Console. In that case, you will need to set the {\bf
584 LDFLAGS} environment variable prior to building.
588 export LDFLAGS="-L/usr/lib/termcap"
592 The same library requirements apply if you wish to use the readline subroutines
593 for command line editing, history and tab completion or if you are using a
594 MySQL library that requires encryption. If you need encryption, you can either
595 export the appropriate additional library options as shown above or,
596 alternatively, you can include them directly on the ./configure line as in:
600 LDFLAGS="-lssl -lcyrpto" \
601 ./configure <your-options>
605 On some systems such as Mandriva, readline tends to
606 gobble up prompts, which makes it totally useless. If this happens to you, use
607 the disable option, or if you are using version 1.33 and above try using {\bf
608 \verb:--:enable-conio} to use a built-in readline replacement. You will still need
609 either the termcap or the ncurses library, but it is unlikely that the {\bf conio}
610 package will gobble up prompts.
612 readline is no longer supported after version 1.34. The code within Bacula
613 remains, so it should be usable, and if users submit patches for it, we will
614 be happy to apply them. However, due to the fact that each version of
615 readline seems to be incompatible with previous versions, and that there
616 are significant differences between systems, we can no longer afford to
619 \section{What Database to Use?}
621 \index[general]{What Database to Use?}
622 \index[general]{Use!What Database to}
624 Before building Bacula you need to decide if you want to use SQLite, MySQL, or
625 PostgreSQL. If you are not already running MySQL or PostgreSQL, you might
626 want to start by testing with SQLite (not supported on Solaris).
627 This will greatly simplify the setup for you
628 because SQLite is compiled into Bacula an requires no administration. It
629 performs well and is suitable for small to medium sized installations (maximum
630 10-20 machines). However, we should note that a number of users have
631 had unexplained database corruption with SQLite. For that reason, we
632 recommend that you install either PostgreSQL or MySQL for production
635 If you wish to use MySQL as the Bacula catalog, please see the
636 \ilink{Installing and Configuring MySQL}{MySqlChapter} chapter of this
637 manual. You will need to install MySQL prior to continuing with the
638 configuration of Bacula. MySQL is a high quality database that is very
639 efficient and is suitable for small and medium sized installation (up to
640 2,000,000 files per job). It is slightly more complicated than SQLite to setup
641 and administer because it has a number of sophisticated features such as
642 userids and passwords. It runs as a separate process, is truly professional and
643 can manage a database of any size.
645 If you wish to use PostgreSQL as the Bacula catalog, please see the
646 \ilink{Installing and Configuring PostgreSQL}{PostgreSqlChapter} chapter of
647 this manual. You will need to install PostgreSQL prior to continuing with the
648 configuration of Bacula. PostgreSQL is very similar to MySQL, though it tends
649 to be slightly more SQL92 compliant and has many more advanced features such as
650 transactions, stored procedures, and the such. It requires a certain knowledge
651 to install and maintain. PostgreSQL is suitable for any sized installation
652 (some sites have much more than 1 billion objects in the Catalog). Bacula uses
653 many optimized PostgreSQL functions, and can run more than 10 time faster on
654 jobs having millions of files than MySQL (Specially in during restore, accurate
655 mode, bvfs queries and when the database server is not on the same host than
656 the Director). It's possible to switch from MySQL/SQLite to PostgreSQL, but it
657 requires some DBA knowledge.
659 If you wish to use SQLite as the Bacula catalog, please see
660 \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of
661 this manual. SQLite is not supported on Solaris.
663 \section{Quick Start}
664 \index[general]{Quick Start}
665 \index[general]{Start!Quick}
667 There are a number of options and important considerations given below
668 that you can skip for the moment if you have not had any problems building
669 Bacula with a simplified configuration as shown above.
671 If the ./configure process is unable to find specific libraries (e.g.
672 libintl, you should ensure that the appropriate package is installed on
673 your system. Alternatively, if the package is installed in a non-standard
674 location (as far as Bacula is concerned), then there is generally an
675 option listed below (or listed with "./configure {-} {-}help" that will
676 permit you to specify the directory that should be searched. In other
677 cases, there are options that will permit you to disable to feature
678 (e.g. {-} {-}disable-nls).
680 If you want to dive right into it, we recommend you skip to the next chapter,
681 and run the example program. It will teach you a lot about Bacula and as an
682 example can be installed into a single directory (for easy removal) and run as
683 non-root. If you have any problems or when you want to do a real installation,
684 come back to this chapter and read the details presented below.
686 \section{Configure Options}
688 \index[general]{Options!Configure}
689 \index[general]{Configure Options}
691 The following command line options are available for {\bf configure} to
692 customize your installation.
695 \item [ \--prefix=\lt{}patch\gt{}]
696 \index[general]{{-}prefix}
697 This option is meant to allow you to direct where the architecture
698 independent files should be placed. However, we find this a somewhat
699 vague concept, and so we have not implemented this option other than
700 to use any explicit prefix that you may define. If you do not
701 explicitly specify a prefix, Bacula's configure routine will not use
702 the default value that ./configure --help prints.
703 As a consequence, we suggest that
704 you avoid it. We have provided options that allow you to explicitly
705 specify the directories for each of the major categories of installation
707 \item [ {-}{\-}sbindir=\lt{}binary-path\gt{}]
708 \index[general]{{-}{\-}sbindir}
709 Defines where the Bacula binary (executable) files will be placed during a
710 {\bf make install} command.
712 \item [ {-}{\-}sysconfdir=\lt{}config-path\gt{}]
713 \index[general]{{-}{\-}sysconfdir}
714 Defines where the Bacula configuration files should be placed during a
715 {\bf make install} command. Note, for security reasons,
716 this directory should be unique to Bacula and not read/writable by
717 any other user/group than Bacula is running under.
719 \item [ {-}{\-}mandir=\lt{}path\gt{}]
720 \index[general]{{-}{\-}mandir}
721 Note, as of Bacula version 1.39.14, the meaning of any path
722 specified on this option is change from prior versions. It
723 now specifies the top level man directory.
724 Previously the mandir specified the full path to where you
725 wanted the man files installed.
726 The man files will be installed in gzip'ed format under
727 mandir/man1 and mandir/man8 as appropriate.
728 For the install to succeed you must have {\bf gzip} installed
731 By default, Bacula will install the Unix man pages in
732 /usr/share/man/man1 and /usr/share/man/man8.
733 If you wish the man page to be installed in
734 a different location, use this option to specify the path.
735 Note, the main HTML and PDF Bacula documents are in a separate
736 tar file that is not part of the source distribution.
738 \item [ {-}{\-}datadir=\lt{}path\gt{} ]
739 \index[general]{{-}{\-}datadir}
740 If you translate Bacula or parts of Bacula into a different language
741 you may specify the location of the po files using the {\bf
742 {-}{\-}datadir} option. You must manually install any po files as
743 Bacula does not (yet) automatically do so.
745 \item [ {-}{\-}disable-ipv6 ]
746 \index[general]{{-}{\-}disable-ipv6}
748 \item [ {-}{\-}enable-smartalloc ]
749 \index[general]{{-}{\-}enable-smartalloc}
750 This enables the inclusion of the Smartalloc orphaned buffer detection
751 code. This option is highly recommended. Because we never build
752 without this option, you may experience problems if it is not enabled.
753 In this case, simply re-enable the option. We strongly recommend
754 keeping this option enabled as it helps detect memory leaks. This
755 configuration parameter is used while building Bacula
757 \item [ {-}{\-}enable-bat ]
759 \index[general]{{-}{\-}enable-bat}
760 If you have Qt4 >= 4.3.4 installed on your computer including the
761 libqt4 and libqt4-devel (libqt4-dev on Debian) libraries, and you want
762 to use the Bacula Administration Tool (bat) GUI Console interface to
763 Bacula, you must specify this option. Doing so will build everything in
764 the {\bf src/qt-console} directory. The build with enable-bat will work
765 only with a full Bacula build (i.e. it will not work with a client-only
768 Qt4 is available on OpenSUSE 10.2, CentOS 5, Fedora, and Debian. If it
769 is not available on your system, you can download the {\bf depkgs-qt}
770 package from the Bacula Source Forge download area and build it.
772 INSTALL file in that package for more details. In particular to use
773 the Qt4 built by {\bf depkgs-qt} you {\bf must} source the file
776 \item [ {-}{\-}enable-batch-insert ]
777 \index[general]{{-}{\-}enable-batch-insert}
778 This option enables batch inserts of the attribute records (default) in
779 the catalog database, which is much faster (10 times or more) than
780 without this option for large numbers of files. However, this option
781 will automatically be disabled if your SQL libraries are not
782 thread safe. If you find that batch mode is not enabled on your Bacula
783 installation, then your database most likely does not support threads.
785 SQLite2 is not thread safe. Batch insert cannot be enabled when using
788 On most systems, MySQL, PostgreSQL and SQLite3 are thread safe.
790 To verify that your PostgreSQL is thread safe, you can try this
791 (change the path to point to your particular installed libpq.a;
792 these commands were issued on FreeBSD 6.2):
795 $ nm /usr/local/lib/libpq.a | grep PQputCopyData
796 00001b08 T PQputCopyData
797 $ nm /usr/local/lib/libpq.a | grep mutex
799 U pthread_mutex_unlock
802 U pthread_mutex_unlock
805 The above example shows a libpq that contains the required function
806 PQputCopyData and is thread enabled (i.e. the pthread\_mutex* entries).
807 If you do not see PQputCopyData, your version of PostgreSQL is too old
808 to allow batch insert. If you do not see the mutex entries, then thread
809 support has not been enabled. Our tests indicate you usually need to
810 change the configuration options and recompile/reinstall the PostgreSQL
811 client software to get thread support.
813 Bacula always links to the thread safe MySQL libraries.
815 Running with Batch Insert turned on is recommended because it can
816 significantly improve attribute insertion times. However, it does
817 put a significantly larger part of the work on your SQL engine, so
818 you may need to pay more attention to tuning it. In particular,
819 Batch Insert can require large temporary table space, and consequently,
820 the default location (often /tmp) may run out of space causing errors.
821 For MySQL, the location is set in my.conf with "tmpdir". You may also
822 want to increase the memory available to your SQL engine to further
823 improve performance during Batch Inserts.
825 \item [ {-}{\-}enable-bwx-console ]
826 \index[general]{{-}{\-}enable-bwx-console}
827 If you have wxWidgets installed on your computer and you want to use the
828 wxWidgets GUI Console interface to Bacula, you must specify this option.
829 Doing so will build everything in the {\bf src/wx-console} directory.
830 This could also be useful to users who want a GUI Console and don't want
831 to install QT, as wxWidgets can work with GTK+, Motif or even X11
834 \item [ {-}{\-}enable-tray-monitor ]
835 \index[general]{{-}{\-}enable-tray-monitor}
836 If you have GTK installed on your computer, you run a graphical
837 environment or a window manager compatible with the FreeDesktop system
838 tray standard (like KDE and GNOME) and you want to use a GUI to monitor
839 Bacula daemons, you must specify this option. Doing so will build
840 everything in the {\bf src/tray-monitor} directory. Note, due to
841 restrictions on what can be linked with GPLed code, we were forced to
842 remove the egg code that dealt with the tray icons and replace it by
843 calls to the GTK+ API, and unfortunately, the tray icon API necessary
844 was not implemented until GTK version 2.10 or later.
846 \item [ {-}{\-}enable-static-tools]
847 \index[general]{{-}{\-}enable-static-tools}
848 This option causes the linker to link the Storage daemon utility tools
849 ({\bf bls}, {\bf bextract}, and {\bf bscan}) statically. This permits
850 using them without having the shared libraries loaded. If you have
851 problems linking in the {\bf src/stored} directory, make sure you have
852 not enabled this option, or explicitly disable static linking by adding
853 {\bf \verb:--:disable-static-tools}.
855 \item [ {-}{\-}enable-static-fd]
856 \index[general]{{-}{\-}enable-static-fd}
857 This option causes the make process to build a {\bf static-bacula-fd} in
858 addition to the standard File daemon. This static version will include
859 statically linked libraries and is required for the Bare Metal recovery.
860 This option is largely superseded by using {\bf make static-bacula-fd}
861 from with in the {\bf src/filed} directory. Also, the {\bf
862 \verb:--:enable-client-only} option described below is useful for just
863 building a client so that all the other parts of the program are not
866 When linking a static binary, the linker needs the static versions
867 of all the libraries that are used, so frequently users will
868 experience linking errors when this option is used. The first
869 thing to do is to make sure you have the static glibc library
870 installed on your system. The second thing to do is the make sure
871 you do not specify {\bf {-}{\-}openssl} or {\bf {-}{\-}with-python}
872 on your ./configure statement as these options require additional
873 libraries. You may be able to enable those options, but you will
874 need to load additional static libraries.
877 \item [ {-}{\-}enable-static-sd]
878 \index[general]{{-}{\-}enable-static-sd}
879 This option causes the make process to build a {\bf static-bacula-sd} in
880 addition to the standard Storage daemon. This static version will
881 include statically linked libraries and could be useful during a Bare
884 When linking a static binary, the linker needs the static versions
885 of all the libraries that are used, so frequently users will
886 experience linking errors when this option is used. The first
887 thing to do is to make sure you have the static glibc library
888 installed on your system. The second thing to do is the make sure
889 you do not specify {\bf {-}{\-}openssl} or {\bf {-}{\-}with-python}
890 on your ./configure statement as these options require additional
891 libraries. You may be able to enable those options, but you will
892 need to load additional static libraries.
895 \item [ {-}{\-}enable-static-dir]
896 \index[general]{{-}{\-}enable-static-dir}
897 This option causes the make process to build a {\bf static-bacula-dir}
898 in addition to the standard Director. This static version will include
899 statically linked libraries and could be useful during a Bare Metal
902 When linking a static binary, the linker needs the static versions
903 of all the libraries that are used, so frequently users will
904 experience linking errors when this option is used. The first
905 thing to do is to make sure you have the static glibc library
906 installed on your system. The second thing to do is the make sure
907 you do not specify {\bf {-}{\-}openssl} or {\bf {-}{\-}with-python}
908 on your ./configure statement as these options require additional
909 libraries. You may be able to enable those options, but you will
910 need to load additional static libraries.
913 \item [ {-}{\-}enable-static-cons]
914 \index[general]{{-}{\-}enable-static-cons}
915 This option causes the make process to build a {\bf static-console} in
916 addition to the standard console. This static version will include
917 statically linked libraries and could be useful during a Bare Metal
920 When linking a static binary, the linker needs the static versions
921 of all the libraries that are used, so frequently users will
922 experience linking errors when this option is used. The first
923 thing to do is to make sure you have the static glibc library
924 installed on your system. The second thing to do is the make sure
925 you do not specify {\bf {-}{\-}openssl} or {\bf {-}{\-}with-python}
926 on your ./configure statement as these options require additional
927 libraries. You may be able to enable those options, but you will
928 need to load additional static libraries.
931 \item [ {-}{\-}enable-client-only]
932 \index[general]{{-}{\-}enable-client-only}
933 This option causes the make process to build only the File daemon and
934 the libraries that it needs. None of the other daemons, storage tools,
935 nor the console will be built. Likewise a {\bf make install} will then
936 only install the File daemon. To cause all daemons to be built, you
937 will need to do a configuration without this option. This option
938 greatly facilitates building a Client on a client only machine.
940 When linking a static binary, the linker needs the static versions
941 of all the libraries that are used, so frequently users will
942 experience linking errors when this option is used. The first
943 thing to do is to make sure you have the static glibc library
944 installed on your system. The second thing to do is the make sure
945 you do not specify {\bf {-}{\-}openssl} or {\bf {-}{\-}with-python}
946 on your ./configure statement as these options require additional
947 libraries. You may be able to enable those options, but you will
948 need to load additional static libraries.
950 \item [ {-}{\-}enable-build-dird]
951 \index[general]{{-}{\-}enable-build-dird}
952 This option causes the make process to build the Director and the
953 Director's tools. By default, this option is on, but you may turn
954 it off by using {\bf {-}{\-}disable-build-dird} to prevent the
955 Director from being built.
957 \item [ {-}{\-}enable-build-stored]
958 \index[general]{{-}{\-}enable-build-stored}
959 This option causes the make process to build the Storage daemon.
960 By default, this option is on, but you may turn
961 it off by using {\bf {-}{\-}disable-build-stored} to prevent the
962 Storage daemon from being built.
965 \item [ {-}{\-}enable-largefile]
966 \index[general]{{-}{\-}enable-largefile}
967 This option (default) causes Bacula to be built with 64 bit file address
968 support if it is available on your system. This permits Bacula to read and
969 write files greater than 2 GBytes in size. You may disable this feature and
970 revert to 32 bit file addresses by using {\bf \verb:--:disable-largefile}.
972 \item [ {-}{\-}disable-nls]
973 \index[general]{{-}{\-}disable-nls}
974 By default, Bacula uses the GNU Native Language Support (NLS) libraries. On
975 some machines, these libraries may not be present or may not function
976 correctly (especially on non-Linux implementations). In such cases, you
977 may specify {\bf {-}{\-}disable-nls} to disable use of those libraries.
978 In such a case, Bacula will revert to using English.
980 \item [ {-}{\-}disable-ipv6 ]
981 \index[general]{{-}{\-}disable-ipv6}
982 By default, Bacula enables IPv6 protocol. On some systems, the files
983 for IPv6 may exist, but the functionality could be turned off in the
984 kernel. In that case, in order to correctly build Bacula, you will
985 explicitly need to use this option so that Bacula does not attempt
986 to reference OS function calls that do not exist.
988 \item [ {-}{\-}with-sqlite3=\lt{}sqlite3-path\gt{}]
989 \index[general]{{-}{\-}with-sqlite3}
990 This enables use of the SQLite version 3.x database. The {\bf
991 sqlite3-path} is not normally specified as Bacula looks for the
992 necessary components in a standard location ({\bf depkgs/sqlite3}). See
993 \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of
994 this manual for more details. SQLite3 is not supported on Solaris.
996 \item [ {-}{\-}with-mysql=\lt{}mysql-path\gt{}]
997 \index[general]{{-}{\-}with-mysql}
998 This enables building of the Catalog services for Bacula. It assumes
999 that MySQL is running on your system, and expects it to be installed in
1000 the {\bf mysql-path} that you specify. Normally, if MySQL is installed
1001 in a standard system location, you can simply use {\bf {-}{\-}with-mysql}
1002 with no path specification. If you do use this option, please proceed
1003 to installing MySQL in the \ilink{Installing and Configuring MySQL}{MySqlChapter} chapter before proceeding with the configuration.
1005 See the note below under the {-}{\-}with-postgresql item.
1007 \item [ {-}{\-}with-postgresql=\lt{}path\gt{}]
1008 \index[general]{{-}{\-}with-postgresql}
1009 This provides an explicit path to the PostgreSQL libraries if Bacula
1010 cannot find it by default. Normally to build with PostgreSQL, you would
1011 simply use {\bf {-}{\-}with-postgresql}.
1013 Note, for Bacula to be configured properly, you must specify one
1014 of the four database options supported. That is:
1015 {-}{\-}with-sqlite, {-}{\-}with-sqlite3, {-}{\-}with-mysql, or
1016 {-}{\-}with-postgresql, otherwise the ./configure will fail.
1018 \item [ {-}{\-}with-openssl=\lt{}path\gt{}]
1019 This configuration option is necessary if you want to enable TLS (ssl),
1020 which encrypts the communications within
1021 Bacula or if you want to use File Daemon PKI data encryption.
1022 Normally, the {\bf path} specification is not necessary since
1023 the configuration searches for the OpenSSL libraries in standard system
1024 locations. However, you must ensure that all the libraries are
1025 loaded including {\bf libssl-dev} or the equivalent on your
1026 system. Enabling OpenSSL in Bacula permits secure communications
1027 between the daemons and/or data encryption in the File daemon.
1028 For more information on using TLS, please see the
1029 \ilink{Bacula TLS -- Communications Encryption}{CommEncryption} chapter
1031 For more information on using PKI data encryption, please see the
1032 \ilink{Bacula PKI -- Data Encryption}{DataEncryption}
1033 chapter of this manual.
1035 If you get errors linking, you need to load the development libraries,
1036 or you need to disable SSL by setting without-openssl.
1039 \item [ {-}{\-}with-python=\lt{}path\gt{}]
1040 \index[general]{{-}{\-}with-python}
1041 This option enables Bacula support for Python. If no path is supplied,
1042 configure will search the standard library locations for Python 2.2,
1043 2.3, 2.4, or 2.5. If it cannot find the library, you will need to
1044 supply a path to your Python library directory. Please see the
1045 \borgxrlink{Python Scripting}{PythonChapter}{misc}{chapter} of the \miscman{} for the details of using Python
1048 \item [ {-}{\-}with-libintl-prefix=\lt{}DIR\gt{}]
1049 \index[general]{{-}{\-}with-libintl-prefix}
1050 This option may be used to tell Bacula to search DIR/include and
1051 DIR/lib for the libintl headers and libraries needed for Native
1052 Language Support (NLS).
1054 \item [ {-}{\-}enable-conio]
1055 \index[general]{{-}{\-}enable-conio}
1056 Tells Bacula to enable building the small, light weight readline
1057 replacement routine. It is generally much easier to configure than
1058 readline, although, like readline, it needs either the termcap or
1061 \item [ {-}{\-}with-readline=\lt{}readline-path\gt{}]
1062 \index[general]{{-}{\-}with-readline}
1063 Tells Bacula where {\bf readline} is installed. Normally, Bacula will
1064 find readline if it is in a standard library. If it is not found and no
1065 {-}{\-}with-readline is specified, readline will be disabled. This
1066 option affects the Bacula build. Readline provides the Console program
1067 with a command line history and editing capability and is no longer
1068 supported, so you are on your own if you have problems.
1070 \item [ {-}{\-}enable-readline]
1071 \index[general]{{-}{\-}enable-readline}
1072 Tells Bacula to enable readline support. It is normally disabled due to the
1073 large number of configuration problems and the fact that the package seems to
1074 change in incompatible ways from version to version.
1076 \item [ {-}{\-}with-tcp-wrappers=\lt{}path\gt{}]
1077 \index[general]{{-}{\-}with-tcp-wrappers}
1078 \index[general]{TCP Wrappers}
1079 \index[general]{Wrappers!TCP}
1080 \index[general]{libwrappers}
1081 This specifies that you want TCP wrappers (man hosts\_access(5)) compiled in.
1082 The path is optional since Bacula will normally find the libraries in the
1083 standard locations. This option affects the Bacula build. In specifying your
1084 restrictions in the {\bf /etc/hosts.allow} or {\bf /etc/hosts.deny} files, do
1085 not use the {\bf twist} option (hosts\_options(5)) or the Bacula process will
1086 be terminated. Note, when setting up your {\bf /etc/hosts.allow}
1087 or {\bf /etc/hosts.deny}, you must identify the Bacula daemon in
1088 question with the name you give it in your conf file rather than the
1089 name of the executable.
1091 For more information on configuring and testing TCP wrappers, please see the
1092 \ilink{Configuring and Testing TCP Wrappers}{wrappers} section
1093 in the Security Chapter.
1095 On SuSE, the libwrappers libraries needed to link Bacula are
1096 contained in the tcpd-devel package. On Red Hat, the package is named
1099 \item [ {-}{\-}with-archivedir=\lt{}path\gt{} ]
1100 \index[general]{{-}{\-}with-archivedir}
1101 The directory used for disk-based backups. Default value is /tmp.
1102 This parameter sets the default values in the bacula-dir.conf and bacula-sd.conf
1103 configuration files. For example, it sets the Where directive for the
1104 default restore job and the Archive Device directive for the FileStorage
1107 This option is designed primarily for use in regression testing.
1108 Most users can safely ignore this option.
1110 \item [ {-}{\-}with-working-dir=\lt{}working-directory-path\gt{} ]
1111 \index[general]{{-}{\-}with-working-dir}
1112 This option is mandatory and specifies a directory into which Bacula may
1113 safely place files that will remain between Bacula executions. For example,
1114 if the internal database is used, Bacula will keep those files in this
1115 directory. This option is only used to modify the daemon configuration
1116 files. You may also accomplish the same thing by directly editing them later.
1117 The working directory is not automatically created by the install process, so
1118 you must ensure that it exists before using Bacula for the first time.
1120 \item [ {-}{\-}with-baseport=\lt{}port=number\gt{}]
1121 \index[general]{{-}{\-}with-baseport}
1122 In order to run, Bacula needs three TCP/IP ports (one for the Bacula
1123 Console, one for the Storage daemon, and one for the File daemon). The {\bf
1124 \verb:--:with-baseport} option will automatically assign three ports beginning at
1125 the base port address specified. You may also change the port number in the
1126 resulting configuration files. However, you need to take care that the
1127 numbers correspond correctly in each of the three daemon configuration
1128 files. The default base port is 9101, which assigns ports 9101 through 9103.
1129 These ports (9101, 9102, and 9103) have been officially assigned to Bacula by
1130 IANA. This option is only used to modify the daemon configuration files. You
1131 may also accomplish the same thing by directly editing them later.
1133 \item [ {-}{\-}with-dump-email=\lt{}email-address\gt{}]
1134 \index[general]{{-}{\-}with-dump-email}
1135 This option specifies the email address where any core dumps should be set.
1136 This option is normally only used by developers.
1138 \item [ {-}{\-}with-pid-dir=\lt{}PATH\gt{} ]
1139 \index[general]{{-}{\-}with-pid-dir}
1140 This specifies where Bacula should place the process id file during
1141 execution. The default is: {\bf /var/run}. This directory is not created by
1142 the install process, so you must ensure that it exists before using Bacula
1145 \item [ {-}{\-}with-subsys-dir=\lt{}PATH\gt{}]
1146 \index[general]{{-}{\-}with-subsys-dir}
1147 This specifies where Bacula should place the subsystem lock file during
1148 execution. The default is {\bf /var/run/subsys}. Please make sure that you do
1149 not specify the same directory for this directory and for the {\bf sbindir}
1150 directory. This directory is used only within the autostart scripts. The
1151 subsys directory is not created by the Bacula install, so you must be sure to
1152 create it before using Bacula.
1154 \item [ {-}{\-}with-dir-password=\lt{}Password\gt{}]
1155 \index[general]{{-}{\-}with-dir-password}
1156 This option allows you to specify the password used to access the Director
1157 (normally from the Console program). If it is not specified, configure will
1158 automatically create a random password.
1160 \item [ {-}{\-}with-fd-password=\lt{}Password\gt{} ]
1161 \index[general]{{-}{\-}with-fd-password}
1162 This option allows you to specify the password used to access the File daemon
1163 (normally called from the Director). If it is not specified, configure will
1164 automatically create a random password.
1166 \item [ {-}{\-}with-sd-password=\lt{}Password\gt{} ]
1167 \index[general]{{-}{\-}with-sd-password}
1168 This option allows you to specify the password used to access the Storage daemon
1169 (normally called from the Director). If it is not specified, configure will
1170 automatically create a random password.
1172 \item [ {-}{\-}with-dir-user=\lt{}User\gt{} ]
1173 \index[general]{{-}{\-}with-dir-user}
1174 This option allows you to specify the Userid used to run the Director. The
1175 Director must be started as root, but doesn't need to run as root, and
1176 after doing preliminary initializations, it can "drop" to the UserId
1177 specified on this option.
1178 If you specify this option, you must
1179 create the User prior to running {\bf make install}, because the
1180 working directory owner will be set to {\bf User}.
1182 \item [ {-}{\-}with-dir-group=\lt{}Group\gt{} ]
1183 \index[general]{{-}{\-}with-dir-group}
1184 This option allows you to specify the GroupId used to run the Director. The
1185 Director must be started as root, but doesn't need to run as root, and after
1186 doing preliminary initializations, it can "drop" to the GroupId specified
1188 If you specify this option, you must
1189 create the Group prior to running {\bf make install}, because the
1190 working directory group will be set to {\bf Group}.
1192 \item [ {-}{\-}with-sd-user=\lt{}User\gt{} ]
1193 \index[general]{{-}{\-}with-sd-user}
1194 This option allows you to specify the Userid used to run the Storage daemon.
1195 The Storage daemon must be started as root, but doesn't need to run as root,
1196 and after doing preliminary initializations, it can "drop" to the UserId
1197 specified on this option. If you use this option, you will need to take care
1198 that the Storage daemon has access to all the devices (tape drives, ...) that
1201 \item [ {-}{\-}with-sd-group=\lt{}Group\gt{} ]
1202 \index[general]{{-}{\-}with-sd-group}
1203 This option allows you to specify the GroupId used to run the Storage daemon.
1204 The Storage daemon must be started as root, but doesn't need to run as root,
1205 and after doing preliminary initializations, it can "drop" to the GroupId
1206 specified on this option.
1208 \item [ {-}{\-}with-fd-user=\lt{}User\gt{} ]
1209 \index[general]{{-}{\-}with-fd-user}
1210 This option allows you to specify the Userid used to run the File daemon. The
1211 File daemon must be started as root, and in most cases, it needs to run as
1212 root, so this option is used only in very special cases, after doing
1213 preliminary initializations, it can "drop" to the UserId specified on this
1216 \item [ {-}{\-}with-fd-group=\lt{}Group\gt{} ]
1217 \index[general]{{-}{\-}with-fd-group}
1218 This option allows you to specify the GroupId used to run the File daemon.
1219 The File daemon must be started as root, and in most cases, it must be run as
1220 root, however, after doing preliminary initializations, it can "drop" to
1221 the GroupId specified on this option.
1223 \item [ {-}{\-}with-mon-dir-password=\lt{}Password\gt{}]
1224 \index[general]{{-}{\-}with-mon-dir-password}
1225 This option allows you to specify the password used to access the Directory
1226 from the monitor. If it is not specified, configure will
1227 automatically create a random password.
1229 \item [ {-}{\-}with-mon-fd-password=\lt{}Password\gt{} ]
1230 \index[general]{{-}{\-}with-mon-fd-password}
1231 This option allows you to specify the password used to access the File daemon
1232 from the Monitor. If it is not specified, configure will
1233 automatically create a random password.
1235 \item [ {-}{\-}with-mon-sd-password=\lt{}Password\gt{} ]
1236 \index[general]{{-}{\-}with-mon-sd-password}
1237 This option allows you to specify the password used to access the
1238 Storage daemon from the Monitor. If it is not specified, configure will
1239 automatically create a random password.
1241 \item [ {-}{\-}with-db-name=\lt{}database-name\gt{} ]
1242 \index[general]{{-}{\-}with-db-name}
1243 This option allows you to specify the database name to be used in
1244 the conf files. The default is bacula.
1246 \item [ {-}{\-}with-db-user=\lt{}database-user\gt{} ]
1247 \index[general]{{-}{\-}with-db-user}
1248 This option allows you to specify the database user name to be used in
1249 the conf files. The default is bacula.
1253 Note, many other options are presented when you do a {\bf ./configure
1254 \verb:--:help}, but they are not implemented.
1256 \section{Recommended Options for Most Systems}
1257 \index[general]{Systems!Recommended Options for Most}
1258 \index[general]{Recommended Options for Most Systems}
1260 For most systems, we recommend starting with the following options:
1265 --enable-smartalloc \
1266 --sbindir=/opt/bacula/bin \
1267 --sysconfdir=/opt/bacula/etc \
1268 --with-pid-dir=/opt/bacula/working \
1269 --with-subsys-dir=/opt/bacula/working \
1270 --with-working-dir=/opt/bacula/working
1274 If you want to install Bacula in an installation directory rather than run it
1275 out of the build directory (as developers will do most of the time), you
1276 should also include the \verb:--:sbindir and \verb:--:sysconfdir options with appropriate
1277 paths. Neither are necessary if you do not use "make install" as is the case
1278 for most development work. The install process will create the sbindir and
1279 sysconfdir if they do not exist, but it will not automatically create the
1280 pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before
1281 running Bacula for the first time.
1284 \index[general]{Red Hat}
1291 CFLAGS="-g -Wall" ./configure \
1292 --sbindir=/opt/bacula/bin \
1293 --sysconfdir=/opt/bacula/etc \
1294 --enable-smartalloc \
1295 --with-sqlite=$HOME/bacula/depkgs/sqlite \
1296 --with-working-dir=/opt/bacula/working \
1297 --with-pid-dir=/opt/bacula/working \
1298 --with-subsys-dir=/opt/bacula/working \
1309 CFLAGS="-g -Wall" ./configure \
1310 --sbindir=/opt/bacula/bin \
1311 --sysconfdir=/opt/bacula/etc \
1312 --enable-smartalloc \
1314 --with-working-dir=/opt/bacula/working
1315 --with-pid-dir=/opt/bacula/working \
1316 --with-subsys-dir=/opt/bacula/working
1321 or finally, a completely traditional Red Hat Linux install,
1322 which we do not recommend, because it make it harder to
1323 backup Bacula for disaster recovery purposes:
1327 CFLAGS="-g -Wall" ./configure \
1328 --sbindir=/usr/sbin \
1329 --sysconfdir=/etc/bacula \
1330 --with-scriptdir=/etc/bacula \
1331 --enable-smartalloc \
1334 --with-working-dir=/var/bacula \
1335 --with-pid-dir=/var/run \
1340 Note, Bacula assumes that /var/bacula, /var/run, and /var/lock/subsys exist so
1341 it will not automatically create them during the install process.
1344 \index[general]{Solaris}
1346 To build Bacula from source, you will need the following installed on your
1347 system (they are not by default): libiconv, gcc 3.3.2, stdc++, libgcc (for
1348 stdc++ and gcc\_s libraries), make 3.8 or later.
1350 You will probably also need to: Add /usr/local/bin to PATH and Add
1351 /usr/ccs/bin to PATH for ar.
1353 It is possible to build Bacula on Solaris with the Solaris compiler, but
1354 we recommend using GNU C++ if possible.
1356 A typical configuration command might look like:
1361 CFLAGS="-g" ./configure \
1362 --sbindir=/opt/bacula/bin \
1363 --sysconfdir=/opt/bacula/etc \
1365 --enable-smartalloc \
1366 --with-pid-dir=/opt/bacula/working \
1367 --with-subsys-dir=/opt/bacula/working \
1368 --with-working-dir=/opt/bacula/working
1372 Note, you may need to install the following packages to build Bacula
1393 PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin
1397 If you have installed special software not normally in the Solaris
1398 libraries, such as OpenSSL, or the packages shown above, then you may need
1399 to add {\bf /usr/sfw/lib} to the library search path. Probably the
1400 simplest way to do so is to run:
1404 setenv LDFLAGS "-L/usr/sfw/lib -R/usr/sfw/lib"
1408 Prior to running the ./configure command.
1410 Alternatively, you can set the LD\_LIBARY\_PATH and/or the LD\_RUN\_PATH
1411 environment variables appropriately.
1413 It is also possible to use the {\bf crle} program to set the library
1414 search path. However, this should be used with caution.
1417 \index[general]{FreeBSD}
1420 \elink{The FreeBSD Diary}{http://www.freebsddiary.org/bacula.php} for a
1421 detailed description on how to make Bacula work on your system. In addition,
1422 users of FreeBSD prior to 4.9-STABLE dated Mon Dec 29 15:18:01 2003 UTC who
1423 plan to use tape devices, please see the
1424 \borgxrlink{Tape Testing}{FreeBSDTapes}{problems}{chapter} of the \problemsman{} for
1425 {\bf important} information on how to configure your tape drive for
1426 compatibility with Bacula.
1428 If you are using Bacula with MySQL, you should take care to compile MySQL with
1429 FreeBSD native threads rather than LinuxThreads, since Bacula is normally built
1430 with FreeBSD native threads rather than LinuxTreads. Mixing the two will
1434 \index[general]{Win32}
1436 To install the binary Win32 version of the File daemon please see the
1437 \ilink{Win32 Installation Chapter}{Win32Chapter} in this document.
1439 \section{One File Configure Script}
1440 \index[general]{Script!One File Configure}
1441 \index[general]{One Files Configure Script}
1443 The following script could be used if you want to put everything
1444 in a single directory (except for the working directory):
1451 --sbindir=$HOME/bacula/bin \
1452 --sysconfdir=$HOME/bacula/bin \
1453 --mandir=$HOME/bacula/bin \
1454 --enable-smartalloc \
1456 --with-pid-dir=$HOME/bacula/bin/working \
1457 --with-subsys-dir=$HOME/bacula/bin/working \
1459 --with-working-dir=$HOME/bacula/bin/working \
1460 --with-dump-email=$USER@your-site.com \
1461 --with-job-email=$USER@your-site.com \
1462 --with-smtp-host=mail.your-site.com
1467 You may also want to put the following entries in your {\bf /etc/services}
1468 file as it will make viewing the connections made by Bacula easier to
1469 recognize (i.e. netstat -a):
1479 \section{Installing Bacula}
1480 \index[general]{Bacula!Installing}
1481 \index[general]{Installing Bacula}
1483 Before setting up your configuration files, you will want to install Bacula in
1484 its final location. Simply enter:
1492 If you have previously installed Bacula, the old binaries will be overwritten,
1493 but the old configuration files will remain unchanged, and the "new"
1494 configuration files will be appended with a {\bf .new}. Generally if you have
1495 previously installed and run Bacula you will want to discard or ignore the
1496 configuration files with the appended {\bf .new}.
1498 \section{Building a File Daemon or Client}
1499 \index[general]{Client!Building a File Daemon or}
1500 \index[general]{Building a File Daemon or Client}
1502 If you run the Director and the Storage daemon on one machine and you wish to
1503 back up another machine, you must have a copy of the File daemon for that
1504 machine. If the machine and the Operating System are identical, you can simply
1505 copy the Bacula File daemon binary file {\bf bacula-fd} as well as its
1506 configuration file {\bf bacula-fd.conf} then modify the name and password in
1507 the conf file to be unique. Be sure to make corresponding additions to the
1508 Director's configuration file ({\bf bacula-dir.conf}).
1510 If the architecture or the OS level are different, you will need to build a
1511 File daemon on the Client machine. To do so, you can use the same {\bf
1512 ./configure} command as you did for your main program, starting either from a
1513 fresh copy of the source tree, or using {\bf make\ distclean} before the {\bf
1516 Since the File daemon does not access the Catalog database, you can remove
1517 the {\bf \verb:--:with-mysql} or {\bf \verb:--:with-sqlite} options, then
1518 add {\bf \verb:--:enable-client-only}. This will compile only the
1519 necessary libraries and the client programs and thus avoids the necessity
1520 of installing one or another of those database programs to build the File
1521 daemon. With the above option, you simply enter {\bf make} and just the
1522 client will be built.
1525 \section{Auto Starting the Daemons}
1526 \index[general]{Daemons!Auto Starting the}
1527 \index[general]{Auto Starting the Daemons}
1529 If you wish the daemons to be automatically started and stopped when your
1530 system is booted (a good idea), one more step is necessary. First, the
1531 ./configure process must recognize your system -- that is it must be a
1532 supported platform and not {\bf unknown}, then you must install the platform
1533 dependent files by doing:
1538 make install-autostart
1542 Please note, that the auto-start feature is implemented only on systems
1543 that we officially support (currently, FreeBSD, Red Hat/Fedora Linux, and
1544 Solaris), and has only been fully tested on Fedora Linux.
1546 The {\bf make install-autostart} will cause the appropriate startup scripts
1547 to be installed with the necessary symbolic links. On Red Hat/Fedora Linux
1548 systems, these scripts reside in {\bf /etc/rc.d/init.d/bacula-dir} {\bf
1549 /etc/rc.d/init.d/bacula-fd}, and {\bf /etc/rc.d/init.d/bacula-sd}. However
1550 the exact location depends on what operating system you are using.
1552 If you only wish to install the File daemon, you may do so with:
1556 make install-autostart-fd
1560 \section{Other Make Notes}
1561 \index[general]{Notes!Other Make}
1562 \index[general]{Other Make Notes}
1564 To simply build a new executable in any directory, enter:
1572 To clean out all the objects and binaries (including the files named 1, 2, or
1573 3, which are development temporary files), enter:
1581 To really clean out everything for distribution, enter:
1589 note, this cleans out the Makefiles and is normally done from the top level
1590 directory to prepare for distribution of the source. To recover from this
1591 state, you must redo the {\bf ./configure} in the top level directory, since
1592 all the Makefiles will be deleted.
1594 To add a new file in a subdirectory, edit the Makefile.in in that directory,
1595 then simply do a {\bf make}. In most cases, the make will rebuild the Makefile
1596 from the new Makefile.in. In some case, you may need to issue the {\bf make} a
1597 second time. In extreme cases, cd to the top level directory and enter: {\bf
1600 To add dependencies:
1608 The {\bf make depend} appends the header file dependencies for each of the
1609 object files to Makefile and Makefile.in. This command should be done in each
1610 directory where you change the dependencies. Normally, it only needs to be run
1611 when you add or delete source or header files. {\bf make depend} is normally
1612 automatically invoked during the configuration process.
1622 This not normally done if you are developing Bacula, but is used if you are
1623 going to run it to backup your system.
1625 After doing a {\bf make install} the following files will be installed on your
1626 system (more or less). The exact files and location (directory) for each file
1627 depends on your {\bf ./configure} command (e.g. if you are using SQLite instead
1628 of MySQL, some of the files will be different).
1630 NOTE: it is quite probable that this list is out of date. But it is a
1652 create_mysql_database
1654 delete_catalog_backup
1673 \section{Installing Tray Monitor}
1674 \index[general]{Monitor!Installing Tray}
1675 \index[general]{Installing Tray Monitor}
1677 The Tray Monitor is already installed if you used the {\bf
1678 \verb:--:enable-tray-monitor} configure option and ran {\bf make install}.
1680 As you don't run your graphical environment as root (if you do, you should
1681 change that bad habit), don't forget to allow your user to read {\bf
1682 tray-monitor.conf}, and to execute {\bf bacula-tray-monitor} (this is not a
1685 Then log into your graphical environment (KDE, GNOME or something else), run
1686 {\bf bacula-tray-monitor} as your user, and see if a cassette icon appears
1687 somewhere on the screen, usually on the task bar.
1688 If it doesn't, follow the instructions below related to your environment or
1692 \index[general]{GNOME}
1694 System tray, or notification area if you use the GNOME terminology, has been
1695 supported in GNOME since version 2.2. To activate it, right-click on one of
1696 your panels, open the menu {\bf Add to this Panel}, then {\bf Utility} and
1697 finally click on {\bf Notification Area}.
1700 \index[general]{KDE}
1702 System tray has been supported in KDE since version 3.1. To activate it,
1703 right-click on one of your panels, open the menu {\bf Add}, then {\bf Applet}
1704 and finally click on {\bf System Tray}.
1706 \subsection{Other Window Managers}
1707 \index[general]{Managers!Other window}
1708 \index[general]{Other window managers}
1710 Read the documentation to know if the Freedesktop system tray standard is
1711 supported by your window manager, and if applicable, how to activate it.
1713 \section{Modifying the Bacula Configuration Files}
1714 \index[general]{Modifying the Bacula Configuration Files}
1715 \index[general]{Files!Modifying the Bacula Configuration}
1718 \ilink{Configuring Bacula}{ConfigureChapter} in this manual for
1719 instructions on how to set Bacula configuration files.