| 1 |
\chapter{Installing Bacula} |
| 2 |
\label{blb:InstallChapter} |
| 3 |
\index[general]{Bacula!Installing} |
| 4 |
\index[general]{Installing Bacula} |
| 5 |
|
| 6 |
\section{Binary Release Packages} |
| 7 |
The project releases binary .rpm and .deb packages for popular Linux distributions. These are probably the easiest way to install a new version of \bacula{}. Please see the \bacula{} Binary Package Download page on \url{www.bacula.org} for downloading these pre-prepared packages. |
| 8 |
|
| 9 |
\section{Building Bacula from Source} |
| 10 |
In general, you will need the \bacula{} source release, and if you want to run |
| 11 |
a Windows client, you will need the \bacula{} Windows binary release. |
| 12 |
However, \bacula{} needs certain third party packages (such as {\bf MySQL} or |
| 13 |
{\bf PostgreSQL} to build and run |
| 14 |
properly depending on the |
| 15 |
options you specify. Normally, {\bf MySQL} and {\bf PostgreSQL} are |
| 16 |
packages that can be installed on your distribution. However, if you do |
| 17 |
not have them, to simplify your task, we have combined a number of these |
| 18 |
packages into three {\bf depkgs} releases (Dependency Packages). This can |
| 19 |
vastly simplify your life by providing you with all the necessary packages |
| 20 |
rather than requiring you to find them on the Web, load them, and install |
| 21 |
them. |
| 22 |
|
| 23 |
\section{Source Release Files} |
| 24 |
\index[general]{Source Files} |
| 25 |
\index[general]{Release Files} |
| 26 |
The source code has been broken into |
| 27 |
five separate tar files each corresponding to a different module in |
| 28 |
the \bacula{} git repository. The released files are: |
| 29 |
|
| 30 |
\begin{description} |
| 31 |
\item [bacula-11.0.0.tar.gz] |
| 32 |
This is the primary source code release for \bacula{}. On each |
| 33 |
release the version number (11.0.0) will be updated. |
| 34 |
|
| 35 |
\item [bacula-docs-11.0.0.tar.bz2] |
| 36 |
This file contains a copy of the docs directory with the |
| 37 |
documents prebuild. English HTML directory, single HTML |
| 38 |
file, and pdf file. The French, German, Spanish translations |
| 39 |
are not built, but can be obtained from the git repository. |
| 40 |
Note that this file is big, it used .bz2 compression which |
| 41 |
reduces the size. |
| 42 |
|
| 43 |
\item [bacula-gui-11.0.0.tar.gz] |
| 44 |
This file contains the non-core GUI programs. Currently, |
| 45 |
it contains Baculum, a PHP program for producing management |
| 46 |
viewing of your \bacula{} job status in a browser. |
| 47 |
|
| 48 |
\item [bacula-regress-11.0.0.tar.gz] |
| 49 |
This file contains the regression tests that developers and |
| 50 |
testers use to test \bacula{}. Community users can help a lot |
| 51 |
by running these regression tests on various different |
| 52 |
Unix/Linux distributions. |
| 53 |
|
| 54 |
\item [bacula-sigs-11.0.0.tar.gz] |
| 55 |
This tar file contains the hash coded signature files that |
| 56 |
are signed by the \bacula{} project. These signature files |
| 57 |
are signed by the \bacula{} project private key, and can be used |
| 58 |
in conjunction with the \bacula{} project public key found |
| 59 |
on the www.bacula.org web site to allow you to verify that |
| 60 |
the source files that you downloaded are genuine and have |
| 61 |
no errors. |
| 62 |
|
| 63 |
\item [bacula-win32-11.0.0.exe] |
| 64 |
This file is the 32 bit Windows installer for installing |
| 65 |
the Windows client (File daemon) on a Windows machine. |
| 66 |
This client will also run on 64 bit Windows machines, but |
| 67 |
VSS support is not available if you are running a 64 bit |
| 68 |
version of Windows. This installer installs only the FD, |
| 69 |
the Director and Storage daemon are not included. |
| 70 |
|
| 71 |
\item [bacula-win64-11.0.0.exe] |
| 72 |
This file is the 64 bit Windows installer for installing the Windows |
| 73 |
client (File daemon) on a Windows machine. This client will only run on |
| 74 |
64 bit Windows OS machines. It will not run on 32 bit machines or 32 bit |
| 75 |
Windows OSes. The \bacula{} Win64 release is necessary for Volume Shadow |
| 76 |
Copy (VSS) to work on Win64 OSes. This installer installs only the FD |
| 77 |
and the SD (disk only. The Windows Director daemon is not included as it |
| 78 |
is not currently supported. |
| 79 |
|
| 80 |
\end{description} |
| 81 |
|
| 82 |
\label{upgrading1} |
| 83 |
\section{Upgrading Bacula} |
| 84 |
\index[general]{Bacula!Upgrading} |
| 85 |
\index[general]{Upgrading Bacula} |
| 86 |
\index[general]{Upgrading} |
| 87 |
|
| 88 |
If you are upgrading from one \bacula{} version to another, you should first |
| 89 |
carefully read the ReleaseNotes of all major versions between your current |
| 90 |
version and the version to which you are upgrading. In many upgrades, |
| 91 |
especially for minor patch upgrades (e.g. between 3.0.0 and 3.0.1) there |
| 92 |
will be no database upgrade, and hence the process is rather simple. |
| 93 |
|
| 94 |
With version 3.0.0 and later, you {\bf must} ensure that on any one |
| 95 |
machine that all components of \bacula{} are running on exactly the |
| 96 |
same version. Prior to version 3.0.0, it was possible to run a |
| 97 |
lower level FD with a newer Director and SD. This is no longer the |
| 98 |
case. |
| 99 |
|
| 100 |
As always, we attempt to support older File daemons. This avoids the |
| 101 |
need to do a simultaneous upgrade of many machines. For exactly what |
| 102 |
older versions of the FD are supported, please see the ReleaseNotes |
| 103 |
for the new version. In any case, you must always upgrade both the |
| 104 |
Director and the Storage daemon at the same time, and you must also |
| 105 |
upgrade any File daemon that is running on the same machine as a Director |
| 106 |
or a Storage daemon (see the prior paragraph). |
| 107 |
|
| 108 |
If the \bacula{} catalog database has been upgraded (as it is almost every |
| 109 |
major release), you will either need to reinitialize your database starting |
| 110 |
from scratch (not normally a good idea), or save an ASCII copy of your |
| 111 |
database, then proceed to upgrade it. If you are upgrading two major |
| 112 |
versions (e.g. 1.36 to 2.0) then life will be more complicated because you |
| 113 |
must do two database upgrades. See below for more on this. |
| 114 |
|
| 115 |
Upgrading the catalog is normally done after \bacula{} is build and installed |
| 116 |
by: |
| 117 |
|
| 118 |
\begin{verbatim} |
| 119 |
cd <installed-scripts-dir> (default /etc/bacula) |
| 120 |
./update_bacula_tables |
| 121 |
\end{verbatim} |
| 122 |
|
| 123 |
This update script can also be find in the \bacula{} source src/cats |
| 124 |
directory. |
| 125 |
|
| 126 |
If you are upgrading from a very old version of \bacula{}, there may |
| 127 |
be several catalog database updates needed to go from your existing |
| 128 |
catalog format to the new one. The {\bf ./update\_bacula\_tables} |
| 129 |
script will automatically do the updates for you one at a time. |
| 130 |
|
| 131 |
If you are upgrading from one major version to another, you will need to |
| 132 |
replace all your components at the same time as generally the inter-daemon |
| 133 |
protocol will change. However, within any particular release (e.g. version |
| 134 |
1.32.x) unless there is an oversight or bug, the daemon protocol will not |
| 135 |
change. If this is confusing, simply read the ReleaseNotes very carefully as |
| 136 |
they will note if all daemons must be upgraded at the same time. |
| 137 |
|
| 138 |
Finally, please note that in general it is not necessary or desirable |
| 139 |
to do a {\bf make uninstall} before doing an upgrade providing you are careful |
| 140 |
not to change the installation directories. In fact, if you do so, you will |
| 141 |
most likely delete all your conf files, which could be disastrous. |
| 142 |
|
| 143 |
The normal procedure depends on whether you previously installed |
| 144 |
binary packages, in which case, you will use the update option to |
| 145 |
install the newer packages. If you installed from souce please |
| 146 |
follow the following steps: |
| 147 |
|
| 148 |
\begin{verbatim} |
| 149 |
./configure (your options) |
| 150 |
make |
| 151 |
make install |
| 152 |
\end{verbatim} |
| 153 |
|
| 154 |
In general none of your existing .conf or .sql files will be overwritten, |
| 155 |
and you must do both the {\bf make} and {\bf make install} commands, a |
| 156 |
{\bf make install} without the preceding {\bf make} will not work. |
| 157 |
|
| 158 |
\smallskip |
| 159 |
We recommend the following base options for the ./configure that you |
| 160 |
run to configure how the make process will install \bacula{}. |
| 161 |
|
| 162 |
\begin{verbatim} |
| 163 |
#!/bin/sh |
| 164 |
# This is the recommended configure script for Bacula |
| 165 |
PREFIX=/opt/bacula |
| 166 |
CFLAGS="-g -O2 -Wall" \ |
| 167 |
./configure \ |
| 168 |
--sbindir=${PREFIX}/bin \ |
| 169 |
--sysconfdir=${PREFIX}/etc \ |
| 170 |
--docdir=${PREFIX}/html \ |
| 171 |
--htmldir=${PREFIX}/html \ |
| 172 |
--with-working-dir=${PREFIX}/working \ |
| 173 |
--with-pid-dir=${PREFIX}/working \ |
| 174 |
--with-scriptdir=${PREFIX}/scripts \ |
| 175 |
--with-plugindir=${PREFIX}/plugins \ |
| 176 |
--libdir=${PREFIX}/lib \ |
| 177 |
--enable-smartalloc \ |
| 178 |
--enable-conio \ |
| 179 |
--enable-bat \ |
| 180 |
--with-postgresql \ |
| 181 |
[email protected] \ |
| 182 |
[email protected] \ |
| 183 |
--with-smtp-host=mail.example.com \ |
| 184 |
--with-baseport=9101 |
| 185 |
|
| 186 |
exit 0 |
| 187 |
\end{verbatim} |
| 188 |
|
| 189 |
Note: you should adjust the email addresses to correspond to the address to |
| 190 |
which you would like \bacula{} to send you mail. Also, you must have the |
| 191 |
correct Qt5 libraries pre-loaded. If not, remove the line |
| 192 |
"--enable-bat". |
| 193 |
|
| 194 |
|
| 195 |
% FIXME: borgxrlink{} doesn't work anymore |
| 196 |
%For additional information on upgrading, please see the \borgxrlink{Upgrading Bacula Versions}{upgrading}{problems}{section} of the \problemsman{}. |
| 197 |
|
| 198 |
\section{Releases Numbering} |
| 199 |
\index[general]{Release Numbering} |
| 200 |
\index[general]{Version Numbering} |
| 201 |
Every \bacula{} release whether beta or production has a different number |
| 202 |
as well as the date of the release build. The numbering system follows |
| 203 |
traditional Open Source conventions in that it is of the form. |
| 204 |
|
| 205 |
\begin{verbatim} |
| 206 |
major.minor.release |
| 207 |
\end{verbatim} |
| 208 |
|
| 209 |
For example: |
| 210 |
\begin{verbatim} |
| 211 |
1.38.11 |
| 212 |
\end{verbatim} |
| 213 |
|
| 214 |
where each component (major, minor, patch) is a number. |
| 215 |
The major number is currently 1 and normally does not change |
| 216 |
very frequently. The minor number starts at 0 and increases |
| 217 |
each for each production release by 2 (i.e. it is always an |
| 218 |
even number for a production release), and the patch number is |
| 219 |
starts at zero each time the minor number changes. The patch |
| 220 |
number is increased each time a bug fix (or fixes) is released |
| 221 |
to production. |
| 222 |
|
| 223 |
So, as of this date (05 May 2019), the current production \bacula{} |
| 224 |
release is version 11.0.3. If there are bug fixes, the next release |
| 225 |
will be 11.0.2 (i.e. the patch number has increased by one). |
| 226 |
|
| 227 |
For all patch releases where the minor version number does not change, |
| 228 |
the database and all the daemons will be compatible. That means that |
| 229 |
you can safely run a 11.0.2 Director with a 11.0.0 Client. Of course, |
| 230 |
in this case, the Director may have bugs that are not fixed. Generally, |
| 231 |
within a minor release (some minor releases are not so minor), all |
| 232 |
patch numbers are officially released to production. This means that while |
| 233 |
the current \bacula{} version is 11.0.3, versions 11.0.0, 11.0.1, and 11.0.2 |
| 234 |
have been previously released. |
| 235 |
|
| 236 |
When the minor number is odd, it indicates that the package is under |
| 237 |
development and thus may not be stable. For example, while the current |
| 238 |
production release of \bacula{} is currently 11.0.2, the current development |
| 239 |
version is 9.5.x. All patch versions of the development code are |
| 240 |
available in the SVN (source repository). However, not all patch versions |
| 241 |
of the development code (odd minor version) are officially released. When |
| 242 |
they are released, they are released as beta versions (see below for a |
| 243 |
definition of what beta means for \bacula{} releases). |
| 244 |
|
| 245 |
In general when the minor number increases from one production release |
| 246 |
to the next (i.e. 9.2.5 to 11.0.0), the catalog database must be upgraded, |
| 247 |
the Director and Storage daemon must always be on the same minor release |
| 248 |
number, and often (not always), the Clients must also be on the same minor |
| 249 |
release. As often as possible, we attempt to make new releases that are |
| 250 |
downwards compatible with prior clients, but this is not always possible. |
| 251 |
You must check the release notes. In general, you will have fewer problems |
| 252 |
if you always run all the components on the same minor version number (i.e. |
| 253 |
all either 9.2.x or 11.0.x but not mixed). |
| 254 |
|
| 255 |
|
| 256 |
\label{BetaReleases} |
| 257 |
\section*{Beta Releases} |
| 258 |
\index[general]{Beta Releases} |
| 259 |
Towards the end of the development cycle, which typically runs |
| 260 |
one year from a major release to another, there will be several beta |
| 261 |
releases of the development code prior to a production release. |
| 262 |
As noted above, beta versions always have odd minor version numbers |
| 263 |
(e.g 9.1.x or 9.5.x). |
| 264 |
The purpose of the beta releases is to allow early adopter users to test |
| 265 |
the new code. Beta releases are made with the following considerations: |
| 266 |
|
| 267 |
\begin{itemize} |
| 268 |
\item The code passes the regression testing on FreeBSD, Linux, and Solaris |
| 269 |
machines. |
| 270 |
|
| 271 |
\item There are no known major bugs, or on the rare occasion that |
| 272 |
there are, they will be documented or already in the bugs database. |
| 273 |
|
| 274 |
\item Some of the new code/features may not yet be tested. |
| 275 |
|
| 276 |
\item Bugs are expected to be found, especially in the new |
| 277 |
code before the final production release. |
| 278 |
|
| 279 |
\item The code will have been run in production in at least one small |
| 280 |
site (mine). |
| 281 |
|
| 282 |
\item The Win32 client will have been run in production at least |
| 283 |
one night at that small site. |
| 284 |
|
| 285 |
\item The documentation in the manual is unlikely to be complete especially |
| 286 |
for the new features, and the Release Notes may not be fully |
| 287 |
organized. |
| 288 |
|
| 289 |
\item Beta code is not generally recommended for everyone, but |
| 290 |
rather for early adopters. |
| 291 |
\end{itemize} |
| 292 |
|
| 293 |
|
| 294 |
\label{Dependency} |
| 295 |
\section{Dependency Packages} |
| 296 |
\index[general]{Dependency Packages} |
| 297 |
\index[general]{Packages!Dependency} |
| 298 |
|
| 299 |
As discussed above, we have combined a number of third party packages that |
| 300 |
\bacula{} might need into the {\bf depkgs} release. You can, |
| 301 |
of course, get the latest packages from the original authors or |
| 302 |
from your operating system supplier. The locations of |
| 303 |
where we obtained the packages are in the README file in each package. |
| 304 |
However, be aware that the packages in the depkgs files have been tested by us |
| 305 |
for compatibility with \bacula{}. |
| 306 |
|
| 307 |
Typically, a dependency package will be named {\bf depkgs-ddMMMyy.tar.gz} |
| 308 |
where {\bf dd} is the day we release it, {\bf MMM} |
| 309 |
is the abbreviated month (e.g. Jan), and {\bf yy} is the year. An actual |
| 310 |
example is: {\bf depkgs-18Dec.tar.gz}. To install and build this package (if |
| 311 |
needed), you do the following: |
| 312 |
|
| 313 |
\begin{enumerate} |
| 314 |
\item Create a {\bf bacula} directory, into which you will place both the |
| 315 |
\bacula{} source as well as the dependency package. |
| 316 |
\item Detar the {\bf depkgs} into the {\bf bacula} directory. |
| 317 |
\item cd bacula/depkgs |
| 318 |
\item make |
| 319 |
\end{enumerate} |
| 320 |
|
| 321 |
Although the exact composition of the dependency packages may change from time |
| 322 |
to time, the current makeup is the following: |
| 323 |
|
| 324 |
\addcontentsline{lot}{table}{Dependency Packages} |
| 325 |
\begin{longtable}{|l|l|l|} |
| 326 |
\hline |
| 327 |
\multicolumn{1}{|c| }{\bf 3rd Party Package} & \multicolumn{1}{c| }{\bf depkgs} |
| 328 |
& \multicolumn{1}{c| }{\bf depkgs-qt} \\ |
| 329 |
\hline {mtx } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{ } \\ |
| 330 |
\hline {qt4 } & \multicolumn{1}{c| }{ } & \multicolumn{1}{c| }{X } \\ |
| 331 |
\hline |
| 332 |
\end{longtable} |
| 333 |
|
| 334 |
Note, some of these packages are quite large, so that building them can be a |
| 335 |
bit time consuming. The above instructions will build all the packages |
| 336 |
contained in the directory. However, when building \bacula{}, it will take only |
| 337 |
those pieces that it actually needs. |
| 338 |
|
| 339 |
Alternatively, you can make just the packages that are needed. For example, |
| 340 |
|
| 341 |
\footnotesize |
| 342 |
\begin{verbatim} |
| 343 |
cd bacula/depkgs |
| 344 |
make qt4 |
| 345 |
\end{verbatim} |
| 346 |
\normalsize |
| 347 |
|
| 348 |
will configure and build only the QT4 package. |
| 349 |
|
| 350 |
You should build the packages that you will require in {\bf depkgs} a |
| 351 |
prior to configuring and building \bacula{}, since \bacula{} will need |
| 352 |
them during the build process. |
| 353 |
|
| 354 |
Note, the {\bf depkgs-qt} package is required for building bat, because |
| 355 |
bat is currently built with Qt version 4.3.4. It can be built with other |
| 356 |
Qt versions, but that almost always creates problems or introduces |
| 357 |
instabilities. |
| 358 |
|
| 359 |
You can build the depkgs-qt with the following: |
| 360 |
|
| 361 |
\footnotesize |
| 362 |
\begin{verbatim} |
| 363 |
cd bacula |
| 364 |
tar xfvz depkgs-qt-28Jul09.tar.gz |
| 365 |
cd depkgs-qt |
| 366 |
make qt4 |
| 367 |
source qt4-path |
| 368 |
\end{verbatim} |
| 369 |
\normalsize |
| 370 |
|
| 371 |
Doing the {\bf source qt4-path} defines the following environment |
| 372 |
variables: |
| 373 |
|
| 374 |
\footnotesize |
| 375 |
\begin{verbatim} |
| 376 |
QTDIR |
| 377 |
QTLIB |
| 378 |
QTINC |
| 379 |
\end{verbatim} |
| 380 |
\normalsize |
| 381 |
|
| 382 |
Each one should point to a specific location in the depkgs-qt package |
| 383 |
that you loaded. It also puts the depkgs-qt/qt4/bin directory |
| 384 |
on your path before all other directories. This ensures that |
| 385 |
the bat build will use your Qt 4.3.4 library rather than any that |
| 386 |
might be on your system. |
| 387 |
|
| 388 |
Before running your \bacula{} build, please make sure that |
| 389 |
{\bf qmake-qt4} is not on your path. If it is please rename it. If |
| 390 |
you don't do this, \bacula{} will attempt to build with any Qt5 package |
| 391 |
installed on your system rather than the one you just built. |
| 392 |
If you logoff and log back in, you must re-source the depkgs-qt/qt4-patch |
| 393 |
file before attempting to rebuild the bat part of \bacula{}. |
| 394 |
|
| 395 |
For more information on the {\bf depkgs-qt} package, please read the |
| 396 |
INSTALL file in the main directory of that package. If you are going to |
| 397 |
build Qt5 using {\bf depkgs-qt}, you must source the {\bf qt5-paths} file |
| 398 |
included in the package prior to building \bacula{}. Please read the INSTALL |
| 399 |
file for more details. |
| 400 |
|
| 401 |
You might find it worthwhile to build {\bf mtx} |
| 402 |
because the {\bf tapeinfo} program that comes with it can often provide you |
| 403 |
with valuable information about your SCSI tape drive (e.g. compression, |
| 404 |
min/max block sizes, ...). Note, most distros provide {\bf mtx} as part of |
| 405 |
their release. |
| 406 |
|
| 407 |
The {\bf depkgs1} package is depreciated and previously contained |
| 408 |
readline, which should be available on all operating systems. |
| 409 |
|
| 410 |
The {\bf depkgs-win32} package is deprecated and no longer used in |
| 411 |
\bacula{} version 1.39.x and later. It was previously used to build |
| 412 |
the native Win32 client program, but this program is now built on Linux |
| 413 |
systems using cross-compiling. All the tools and third party libraries |
| 414 |
are automatically downloaded by executing the appropriate scripts. See |
| 415 |
src/win32/README.mingw32 for more details. |
| 416 |
|
| 417 |
\section{Supported Operating Systems} |
| 418 |
\label{Systems} |
| 419 |
\index[general]{Systems!Supported Operating} |
| 420 |
\index[general]{Supported Operating Systems} |
| 421 |
|
| 422 |
Please see the \bilink{Supported Operating Systems}{blb:SupportedOSes} section |
| 423 |
of the QuickStart chapter of this manual. |
| 424 |
|
| 425 |
\section{Building Bacula from Source} |
| 426 |
\label{Building} |
| 427 |
\index[general]{Source!Building Bacula from} |
| 428 |
\index[general]{Building Bacula from Source} |
| 429 |
|
| 430 |
The basic installation is rather simple. |
| 431 |
|
| 432 |
\begin{enumerate} |
| 433 |
\item Install and build any {\bf depkgs} as noted above. This |
| 434 |
should be unnecessary on most modern Operating Systems. |
| 435 |
|
| 436 |
\item Configure and install MySQL or PostgreSQL (if desired). |
| 437 |
\bilink{Installing and Configuring MySQL Phase I}{blb:MySqlChapter} or |
| 438 |
\bilink{Installing and Configuring PostgreSQL Phase I}{blb:PostgreSqlChapter}. If you are installing from rpms, and are |
| 439 |
using MySQL, please be sure to install {\bf mysql-devel}, so that the MySQL |
| 440 |
header files are available while compiling \bacula{}. In addition, the MySQL |
| 441 |
client library {\bf mysqlclient} requires the gzip compression library {\bf |
| 442 |
libz.a} or {\bf libz.so}. If you are using rpm packages, these libraries are |
| 443 |
in the {\bf libz-devel} package. On Debian systems, you will need to load the |
| 444 |
{\bf zlib1g-dev} package. If you are not using rpms or debs, you will need to |
| 445 |
find the appropriate package for your system. |
| 446 |
|
| 447 |
Note, if you already have a running MySQL or PostgreSQL on your system, you |
| 448 |
can skip this phase provided that you have built the thread safe libraries. |
| 449 |
And you have already installed the additional rpms noted above. |
| 450 |
|
| 451 |
\item Detar the \bacula{} source code preferably into the {\bf bacula} directory |
| 452 |
discussed above. |
| 453 |
|
| 454 |
\item {\bf cd} to the directory containing the source code. |
| 455 |
|
| 456 |
\item ./configure (with appropriate options as described below). Any |
| 457 |
path names you specify as options on the ./configure command line |
| 458 |
must be absolute paths and not relative. |
| 459 |
|
| 460 |
\item Check the output of ./configure very carefully, especially the Install |
| 461 |
binaries and Install config directories. If they are not correct, |
| 462 |
please rerun ./configure until they are. The output from ./configure is |
| 463 |
stored in {\bf config.out} and can be re-displayed at any time without |
| 464 |
rerunning the ./configure by doing {\bf cat config.out}. |
| 465 |
|
| 466 |
\item If after running ./configure once, you decide to change options and |
| 467 |
re-run it, that is perfectly fine, but before re-running it, you should run: |
| 468 |
|
| 469 |
\footnotesize |
| 470 |
\begin{verbatim} |
| 471 |
make distclean |
| 472 |
\end{verbatim} |
| 473 |
\normalsize |
| 474 |
|
| 475 |
so that you are sure to start from scratch and not have a mixture of the two |
| 476 |
options. This is because ./configure caches much of the information. The {\bf |
| 477 |
make distclean} is also critical if you move the source directory from one |
| 478 |
machine to another. If the {\bf make distclean} fails, just ignore it and |
| 479 |
continue on. |
| 480 |
|
| 481 |
\item make |
| 482 |
If you get errors while linking in the Storage daemon directory |
| 483 |
(src/stored), it is probably because you have not loaded the static |
| 484 |
libraries on your system. I noticed this problem on a Solaris system. |
| 485 |
To correct it, make sure that you have not added {\bf |
| 486 |
{-} {-}enable-static-tools} to the {\bf ./configure} command. |
| 487 |
|
| 488 |
If you skip this step ({\bf make}) and proceed immediately to the {\bf |
| 489 |
make install} you are making two serious errors: 1. your install will |
| 490 |
fail because \bacula{} requires a {\bf make} before a {\bf make install}. |
| 491 |
2. you are depriving yourself of the chance to make sure there are no |
| 492 |
errors before beginning to write files to your system directories. |
| 493 |
|
| 494 |
|
| 495 |
\item make install |
| 496 |
Please be sure you have done a {\bf make} before entering this command, |
| 497 |
and that everything has properly compiled and linked without errors. |
| 498 |
|
| 499 |
|
| 500 |
\item If you are new to \bacula{}, we {\bf strongly} recommend that you skip |
| 501 |
the next step and use the default configuration files, then run the |
| 502 |
example program in the next chapter, then come back and modify your |
| 503 |
configuration files to suit your particular needs. |
| 504 |
|
| 505 |
\item Customize the configuration files for each of the three daemons |
| 506 |
(Directory, File, Storage) and for the Console program. For the details |
| 507 |
of how to do this, please see \bilink{Setting Up \bacula{} Configuration Files}{blb:ConfigureChapter} in the Configuration chapter of this manual. We |
| 508 |
recommend that you start by modifying the default configuration files |
| 509 |
supplied, making the minimum changes necessary. Complete customization |
| 510 |
can be done after you have \bacula{} up and running. Please take care when |
| 511 |
modifying passwords, which were randomly generated, and the {\bf Name}s |
| 512 |
as the passwords and names must agree between the configuration files |
| 513 |
for security reasons. |
| 514 |
|
| 515 |
\label{CreateDatabase} |
| 516 |
\item Create the \bacula{} MySQL database and tables |
| 517 |
(if using MySQL) |
| 518 |
\bilink{Installing and Configuring MySQL Phase II}{blb:mysql_phase2} or |
| 519 |
create the \bacula{} PostgreSQL database and tables |
| 520 |
\bilink{Configuring PostgreSQL II}{blb:PostgreSQL_configure} or alternatively if you are using |
| 521 |
|
| 522 |
\item Start \bacula{} ({\bf ./bacula start}) Note. the next chapter shows you |
| 523 |
how to do this in detail. |
| 524 |
|
| 525 |
\item Interface with \bacula{} using the Console program |
| 526 |
|
| 527 |
\item For the previous two items, please follow the instructions in the |
| 528 |
\bilink{Running \bacula{}}{blb:TutorialChapter} chapter of this manual, |
| 529 |
where you will run a simple backup and do a restore. Do this before you make |
| 530 |
heavy modifications to the configuration files so that you are sure that |
| 531 |
\bacula{} works and are familiar with it. After that changing the conf files |
| 532 |
will be easier. |
| 533 |
|
| 534 |
\item If after installing \bacula{}, you decide to "move it", that is to |
| 535 |
install it in a different set of directories, proceed as follows: |
| 536 |
|
| 537 |
\footnotesize |
| 538 |
\begin{verbatim} |
| 539 |
make uninstall |
| 540 |
make distclean |
| 541 |
./configure (your-new-options) |
| 542 |
make |
| 543 |
make install |
| 544 |
|
| 545 |
\end{verbatim} |
| 546 |
\normalsize |
| 547 |
|
| 548 |
\end{enumerate} |
| 549 |
|
| 550 |
If all goes well, the {\bf ./configure} will correctly determine which |
| 551 |
operating system you are running and configure the source code appropriately. |
| 552 |
Currently, FreeBSD, Linux (Red Hat), and Solaris are supported. The \bacula{} |
| 553 |
client (File daemon) is reported to work with MacOS X 10.3 is if |
| 554 |
readline support is not enabled (default) when building the client. |
| 555 |
|
| 556 |
If you install \bacula{} on more than one system, and they are identical, you can |
| 557 |
simply transfer the source tree to that other system and do a "make |
| 558 |
install". However, if there are differences in the libraries or OS versions, |
| 559 |
or you wish to install on a different OS, you should start from the original |
| 560 |
compress tar file. If you do transfer the source tree, and you have previously |
| 561 |
done a ./configure command, you MUST do: |
| 562 |
|
| 563 |
\footnotesize |
| 564 |
\begin{verbatim} |
| 565 |
make distclean |
| 566 |
\end{verbatim} |
| 567 |
\normalsize |
| 568 |
|
| 569 |
prior to doing your new ./configure. This is because the GNU autoconf tools |
| 570 |
cache the configuration, and if you re-use a configuration for a Linux machine |
| 571 |
on a Solaris, you can be sure your build will fail. To avoid this, as |
| 572 |
mentioned above, either start from the tar file, or do a "make distclean". |
| 573 |
|
| 574 |
In general, you will probably want to supply a more complicated {\bf |
| 575 |
configure} statement to ensure that the modules you want are built and that |
| 576 |
everything is placed into the correct directories. |
| 577 |
|
| 578 |
For example, on Fedora, Red Hat, or SuSE one could use the following: |
| 579 |
|
| 580 |
\footnotesize |
| 581 |
\begin{verbatim} |
| 582 |
CFLAGS="-g -Wall" \ |
| 583 |
./configure \ |
| 584 |
--sbindir=/opt/bacula/bin \ |
| 585 |
--sysconfdir=/opt/bacula/etc \ |
| 586 |
--with-pid-dir=/var/run \ |
| 587 |
--with-subsys-dir=/var/run \ |
| 588 |
--with-mysql \ |
| 589 |
--with-working-dir=/opt/bacula/working \ |
| 590 |
--with-dump-email=$USER |
| 591 |
\end{verbatim} |
| 592 |
\normalsize |
| 593 |
|
| 594 |
The advantage of using the above configuration to start is that |
| 595 |
everything will be put into a single directory, which you can later delete |
| 596 |
once you have run the examples in the next chapter and learned how \bacula{} |
| 597 |
works. In addition, the above can be installed and run as non-root. |
| 598 |
|
| 599 |
For the developer's convenience, I have added a {\bf defaultconfig} script to |
| 600 |
the {\bf examples} directory. This script contains the statements that you |
| 601 |
would normally use, and each developer/user may modify them to suit his needs. |
| 602 |
You should find additional useful examples in this directory as well. |
| 603 |
|
| 604 |
The {\bf \verb:--:enable-conio} or {\bf \verb:--:enable-readline} options are |
| 605 |
useful because they provide a command line history, editing capability for the |
| 606 |
Console program and tab completion on various option. If you have included |
| 607 |
either option in the build, either the {\bf termcap} or the {\bf ncurses} |
| 608 |
package will be needed to link. On most systems, including Red Hat and SuSE, |
| 609 |
you should include the ncurses package. If \bacula{}'s configure process finds |
| 610 |
the ncurses libraries, it will use those rather than the termcap library. On |
| 611 |
some systems, such as SuSE, the termcap library is not in the standard library |
| 612 |
directory. As a consequence, the option may be disabled or you may get an |
| 613 |
error message such as: |
| 614 |
|
| 615 |
\footnotesize |
| 616 |
\begin{verbatim} |
| 617 |
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/.../ld: |
| 618 |
cannot find -ltermcap |
| 619 |
collect2: ld returned 1 exit status |
| 620 |
\end{verbatim} |
| 621 |
\normalsize |
| 622 |
|
| 623 |
while building the \bacula{} Console. In that case, you will need to set the {\bf |
| 624 |
LDFLAGS} environment variable prior to building. |
| 625 |
|
| 626 |
\footnotesize |
| 627 |
\begin{verbatim} |
| 628 |
export LDFLAGS="-L/usr/lib/termcap" |
| 629 |
\end{verbatim} |
| 630 |
\normalsize |
| 631 |
|
| 632 |
The same library requirements apply if you wish to use the readline subroutines |
| 633 |
for command line editing, history and tab completion or if you are using a |
| 634 |
MySQL library that requires encryption. If you need encryption, you can either |
| 635 |
export the appropriate additional library options as shown above or, |
| 636 |
alternatively, you can include them directly on the ./configure line as in: |
| 637 |
|
| 638 |
\footnotesize |
| 639 |
\begin{verbatim} |
| 640 |
LDFLAGS="-lssl -lcyrpto" \ |
| 641 |
./configure <your-options> |
| 642 |
\end{verbatim} |
| 643 |
\normalsize |
| 644 |
|
| 645 |
On some systems such as Mandriva, readline tends to |
| 646 |
gobble up prompts, which makes it totally useless. If this happens to you, use |
| 647 |
the disable option, or if you are using version 1.33 and above try using {\bf |
| 648 |
\verb:--:enable-conio} to use a built-in readline replacement. You will still need |
| 649 |
either the termcap or the ncurses library, but it is unlikely that the {\bf conio} |
| 650 |
package will gobble up prompts. |
| 651 |
|
| 652 |
readline is no longer supported after version 1.34. The code within \bacula{} |
| 653 |
remains, so it should be usable, and if users submit patches for it, we will |
| 654 |
be happy to apply them. However, due to the fact that each version of |
| 655 |
readline seems to be incompatible with previous versions, and that there |
| 656 |
are significant differences between systems, we can no longer afford to |
| 657 |
support it. |
| 658 |
|
| 659 |
\section{What Database to Use?} |
| 660 |
\label{DB} |
| 661 |
\index[general]{What Database to Use?} |
| 662 |
\index[general]{Use!What Database to} |
| 663 |
|
| 664 |
If you wish to use MySQL as the \bacula{} catalog, please see the |
| 665 |
\bilink{Installing and Configuring MySQL}{blb:MySqlChapter} chapter of this |
| 666 |
manual. You will need to install MySQL prior to continuing with the |
| 667 |
configuration of \bacula{}. MySQL is a high quality database that is very |
| 668 |
efficient and is suitable for small and medium sized installation (up to |
| 669 |
2,000,000 files per job). |
| 670 |
|
| 671 |
If you wish to use PostgreSQL as the \bacula{} catalog, please see the |
| 672 |
\bilink{Installing and Configuring PostgreSQL}{blb:PostgreSqlChapter} chapter |
| 673 |
of this manual. You will need to install PostgreSQL prior to continuing with |
| 674 |
the configuration of \bacula{}. PostgreSQL is very similar to MySQL, though it |
| 675 |
tends to be slightly more SQL92 compliant and has more advanced features such |
| 676 |
as DDL support in transactions. It requires a certain knowledge to install and |
| 677 |
maintain. PostgreSQL is suitable for any sized installation (some sites have |
| 678 |
much more than 1 billion objects in the Catalog). \bacula{} uses many optimized |
| 679 |
PostgreSQL functions, and can run more than 10 time faster on jobs having |
| 680 |
millions of files than MySQL (Specially in during restore, accurate mode, bvfs |
| 681 |
queries and when the database server is not on the same host than the |
| 682 |
Director). |
| 683 |
|
| 684 |
\section{Quick Start} |
| 685 |
\index[general]{Quick Start} |
| 686 |
\index[general]{Start!Quick} |
| 687 |
|
| 688 |
There are a number of options and important considerations given below |
| 689 |
that you can skip for the moment if you have not had any problems building |
| 690 |
\bacula{} with a simplified configuration as shown above. |
| 691 |
|
| 692 |
If the ./configure process is unable to find specific libraries (e.g. |
| 693 |
libintl, you should ensure that the appropriate package is installed on |
| 694 |
your system. Alternatively, if the package is installed in a non-standard |
| 695 |
location (as far as \bacula{} is concerned), then there is generally an |
| 696 |
option listed below (or listed with "./configure {-} {-}help" that will |
| 697 |
permit you to specify the directory that should be searched. In other |
| 698 |
cases, there are options that will permit you to disable to feature |
| 699 |
(e.g. {-} {-}disable-nls). |
| 700 |
|
| 701 |
If you want to dive right into it, we recommend you skip to the next chapter, |
| 702 |
and run the example program. It will teach you a lot about \bacula{} and as an |
| 703 |
example can be installed into a single directory (for easy removal) and run as |
| 704 |
non-root. If you have any problems or when you want to do a real installation, |
| 705 |
come back to this chapter and read the details presented below. |
| 706 |
|
| 707 |
\section{Configure Options} |
| 708 |
\label{Options} |
| 709 |
\index[general]{Options!Configure} |
| 710 |
\index[general]{Configure Options} |
| 711 |
|
| 712 |
The following command line options are available for {\bf configure} to |
| 713 |
customize your installation. |
| 714 |
|
| 715 |
\begin{description} |
| 716 |
\item [ \--prefix=\lt{}patch\gt{}] |
| 717 |
\index[general]{{-}prefix} |
| 718 |
This option is meant to allow you to direct where the architecture |
| 719 |
independent files should be placed. However, we find this a somewhat |
| 720 |
vague concept, and so we have not implemented this option other than |
| 721 |
to use any explicit prefix that you may define. If you do not |
| 722 |
explicitly specify a prefix, \bacula{}'s configure routine will not use |
| 723 |
the default value that ./configure --help prints. |
| 724 |
As a consequence, we suggest that |
| 725 |
you avoid it. We have provided options that allow you to explicitly |
| 726 |
specify the directories for each of the major categories of installation |
| 727 |
files. |
| 728 |
\item [ {-}{\-}sbindir=\lt{}binary-path\gt{}] |
| 729 |
\index[general]{{-}{\-}sbindir} |
| 730 |
Defines where the \bacula{} binary (executable) files will be placed during a |
| 731 |
{\bf make install} command. |
| 732 |
|
| 733 |
\item [ {-}{\-}sysconfdir=\lt{}config-path\gt{}] |
| 734 |
\index[general]{{-}{\-}sysconfdir} |
| 735 |
Defines where the \bacula{} configuration files should be placed during a |
| 736 |
{\bf make install} command. Note, for security reasons, |
| 737 |
this directory should be unique to \bacula{} and not read/writable by |
| 738 |
any other user/group than \bacula{} is running under. |
| 739 |
|
| 740 |
Please note that \bacula{} attempts to make the configuration directory |
| 741 |
secure by doing an: |
| 742 |
\smallskip |
| 743 |
chmod 770 \lt{}sysconfdir\gt{} |
| 744 |
\smallskip |
| 745 |
So, if you make sysconfdir point to a global directory such as |
| 746 |
/usr/local/etc, the modes for that directory will be restricted, and |
| 747 |
this may affect other programs that are installed there. We strongly |
| 748 |
recommend that you set {\bf sysconfdir} to {\bf /opt/bacula/etc} so |
| 749 |
that the directory for all \bacula{} configuration files is unique to |
| 750 |
\bacula{} and used only by \bacula{}. |
| 751 |
|
| 752 |
|
| 753 |
\item [ {-}{\-}mandir=\lt{}path\gt{}] |
| 754 |
\index[general]{{-}{\-}mandir} |
| 755 |
Note, as of \bacula{} version 1.39.14, the meaning of any path |
| 756 |
specified on this option is change from prior versions. It |
| 757 |
now specifies the top level man directory. |
| 758 |
Previously the mandir specified the full path to where you |
| 759 |
wanted the man files installed. |
| 760 |
The man files will be installed in gzip'ed format under |
| 761 |
mandir/man1 and mandir/man8 as appropriate. |
| 762 |
For the install to succeed you must have {\bf gzip} installed |
| 763 |
on your system. |
| 764 |
|
| 765 |
By default, \bacula{} will install the Unix man pages in |
| 766 |
/usr/share/man/man1 and /usr/share/man/man8. |
| 767 |
If you wish the man page to be installed in |
| 768 |
a different location, use this option to specify the path. |
| 769 |
Note, the main HTML and PDF \bacula{} documents are in a separate |
| 770 |
tar file that is not part of the source distribution. |
| 771 |
|
| 772 |
\item [ {-}{\-}datadir=\lt{}path\gt{} ] |
| 773 |
\index[general]{{-}{\-}datadir} |
| 774 |
If you translate \bacula{} or parts of \bacula{} into a different language |
| 775 |
you may specify the location of the po files using the {\bf |
| 776 |
{-}{\-}datadir} option. You must manually install any po files as |
| 777 |
\bacula{} does not (yet) automatically do so. |
| 778 |
|
| 779 |
\item [ {-}{\-}disable-ipv6 ] |
| 780 |
\index[general]{{-}{\-}disable-ipv6} |
| 781 |
|
| 782 |
\item [ {-}{\-}enable-smartalloc ] |
| 783 |
\index[general]{{-}{\-}enable-smartalloc} |
| 784 |
This enables the inclusion of the Smartalloc orphaned buffer detection |
| 785 |
code. This option is highly recommended. Because we never build |
| 786 |
without this option, you may experience problems if it is not enabled. |
| 787 |
In this case, simply re-enable the option. We strongly recommend |
| 788 |
keeping this option enabled as it helps detect memory leaks. This |
| 789 |
configuration parameter is used while building \bacula{} |
| 790 |
|
| 791 |
\item [ {-}{\-}enable-bat ] |
| 792 |
\label{enablebat} |
| 793 |
\index[general]{{-}{\-}enable-bat} |
| 794 |
If you have Qt5 installed on your computer including the |
| 795 |
libqt4 and libqt4-devel (libqt4-dev on Debian) libraries, and you want |
| 796 |
to use the \bacula{} Administration Tool (bat) GUI Console interface to |
| 797 |
\bacula{}, you must specify this option. Doing so will build everything in |
| 798 |
the {\bf src/qt-console} directory. The build with enable-bat will work |
| 799 |
only with a full \bacula{} build (i.e. it will not work with a client-only |
| 800 |
build). |
| 801 |
|
| 802 |
Qt5 is available on OpenSUSE, CentOS , Fedora, and Debian. If it |
| 803 |
is not available on your system, you can download the {\bf depkgs-qt} |
| 804 |
package from the \bacula{} Source Forge download area and build it. |
| 805 |
See the |
| 806 |
INSTALL file in that package for more details. In particular to use |
| 807 |
the Qt5 built by {\bf depkgs-qt} you {\bf must} source the file |
| 808 |
{\bf qt5-paths}. |
| 809 |
|
| 810 |
\item [ {-}{\-}enable-batch-insert ] |
| 811 |
\index[general]{{-}{\-}enable-batch-insert} |
| 812 |
This option enables batch inserts of the attribute records (default) in |
| 813 |
the catalog database, which is much faster (10 times or more) than |
| 814 |
without this option for large numbers of files. However, this option |
| 815 |
will automatically be disabled if your SQL libraries are not |
| 816 |
thread safe. If you find that batch mode is not enabled on your \bacula{} |
| 817 |
installation, then your database most likely does not support threads. |
| 818 |
|
| 819 |
On most systems, MySQL and PostgreSQLare thread safe. |
| 820 |
|
| 821 |
To verify that your PostgreSQL is thread safe, you can try this |
| 822 |
(change the path to point to your particular installed libpq.a; |
| 823 |
these commands were issued on FreeBSD 6.2): |
| 824 |
|
| 825 |
\begin{verbatim} |
| 826 |
$ nm /usr/local/lib/libpq.a | grep PQputCopyData |
| 827 |
00001b08 T PQputCopyData |
| 828 |
$ nm /usr/local/lib/libpq.a | grep mutex |
| 829 |
U pthread_mutex_lock |
| 830 |
U pthread_mutex_unlock |
| 831 |
U pthread_mutex_init |
| 832 |
U pthread_mutex_lock |
| 833 |
U pthread_mutex_unlock |
| 834 |
\end{verbatim} |
| 835 |
|
| 836 |
The above example shows a libpq that contains the required function |
| 837 |
PQputCopyData and is thread enabled (i.e. the pthread\_mutex* entries). |
| 838 |
If you do not see PQputCopyData, your version of PostgreSQL is too old |
| 839 |
to allow batch insert. If you do not see the mutex entries, then thread |
| 840 |
support has not been enabled. Our tests indicate you usually need to |
| 841 |
change the configuration options and recompile/reinstall the PostgreSQL |
| 842 |
client software to get thread support. |
| 843 |
|
| 844 |
\bacula{} always links to the thread safe MySQL libraries. |
| 845 |
|
| 846 |
Running with Batch Insert turned on is recommended because it can |
| 847 |
significantly improve attribute insertion times. However, it does |
| 848 |
put a significantly larger part of the work on your SQL engine, so |
| 849 |
you may need to pay more attention to tuning it. In particular, |
| 850 |
Batch Insert can require large temporary table space, and consequently, |
| 851 |
the default location (often /tmp) may run out of space causing errors. |
| 852 |
For MySQL, the location is set in my.conf with "tmpdir". You may also |
| 853 |
want to increase the memory available to your SQL engine to further |
| 854 |
improve performance during Batch Inserts. |
| 855 |
|
| 856 |
\item [ {-}{\-}enable-bwx-console ] |
| 857 |
\index[general]{{-}{\-}enable-bwx-console} |
| 858 |
If you have wxWidgets installed on your computer and you want to use the |
| 859 |
wxWidgets GUI Console interface to \bacula{}, you must specify this option. |
| 860 |
Doing so will build everything in the {\bf src/wx-console} directory. |
| 861 |
This could also be useful to users who want a GUI Console and don't want |
| 862 |
to install QT, as wxWidgets can work with GTK+, Motif or even X11 |
| 863 |
libraries. |
| 864 |
|
| 865 |
\item [ {-}{\-}enable-static-tools] |
| 866 |
\index[general]{{-}{\-}enable-static-tools} |
| 867 |
This option causes the linker to link the Storage daemon utility tools |
| 868 |
({\bf bls}, {\bf bextract}, and {\bf bscan}) statically. This permits |
| 869 |
using them without having the shared libraries loaded. If you have |
| 870 |
problems linking in the {\bf src/stored} directory, make sure you have |
| 871 |
not enabled this option, or explicitly disable static linking by adding |
| 872 |
{\bf \verb:--:disable-static-tools}. |
| 873 |
|
| 874 |
\item [ {-}{\-}enable-static-fd] |
| 875 |
\index[general]{{-}{\-}enable-static-fd} |
| 876 |
This option causes the make process to build a {\bf static-bacula-fd} in |
| 877 |
addition to the standard File daemon. This static version will include |
| 878 |
statically linked libraries and is required for the Bare Metal recovery. |
| 879 |
This option is largely superseded by using {\bf make static-bacula-fd} |
| 880 |
from with in the {\bf src/filed} directory. Also, the {\bf |
| 881 |
\verb:--:enable-client-only} option described below is useful for just |
| 882 |
building a client so that all the other parts of the program are not |
| 883 |
compiled. |
| 884 |
|
| 885 |
When linking a static binary, the linker needs the static versions |
| 886 |
of all the libraries that are used, so frequently users will |
| 887 |
experience linking errors when this option is used. The first |
| 888 |
thing to do is to make sure you have the static glibc library |
| 889 |
installed on your system. The second thing to do is the make sure |
| 890 |
you do not specify {\bf {-}{\-}openssl} or other options |
| 891 |
on your ./configure statement as these options require additional |
| 892 |
libraries. You may be able to enable those options, but you will |
| 893 |
need to load additional static libraries. |
| 894 |
|
| 895 |
|
| 896 |
\item [ {-}{\-}enable-static-sd] |
| 897 |
\index[general]{{-}{\-}enable-static-sd} |
| 898 |
This option causes the make process to build a {\bf static-bacula-sd} in |
| 899 |
addition to the standard Storage daemon. This static version will |
| 900 |
include statically linked libraries and could be useful during a Bare |
| 901 |
Metal recovery. |
| 902 |
|
| 903 |
When linking a static binary, the linker needs the static versions |
| 904 |
of all the libraries that are used, so frequently users will |
| 905 |
experience linking errors when this option is used. The first |
| 906 |
thing to do is to make sure you have the static glibc library |
| 907 |
installed on your system. The second thing to do is the make sure |
| 908 |
you do not specify {\bf {-}{\-}openssl} or othyer options |
| 909 |
on your ./configure statement as these options require additional |
| 910 |
libraries. You may be able to enable those options, but you will |
| 911 |
need to load additional static libraries. |
| 912 |
|
| 913 |
|
| 914 |
\item [ {-}{\-}enable-static-dir] |
| 915 |
\index[general]{{-}{\-}enable-static-dir} |
| 916 |
This option causes the make process to build a {\bf static-bacula-dir} |
| 917 |
in addition to the standard Director. This static version will include |
| 918 |
statically linked libraries and could be useful during a Bare Metal |
| 919 |
recovery. |
| 920 |
|
| 921 |
When linking a static binary, the linker needs the static versions |
| 922 |
of all the libraries that are used, so frequently users will |
| 923 |
experience linking errors when this option is used. The first |
| 924 |
thing to do is to make sure you have the static glibc library |
| 925 |
installed on your system. The second thing to do is the make sure |
| 926 |
you do not specify {\bf {-}{\-}openssl} or other options |
| 927 |
on your ./configure statement as these options require additional |
| 928 |
libraries. You may be able to enable those options, but you will |
| 929 |
need to load additional static libraries. |
| 930 |
|
| 931 |
|
| 932 |
\item [ {-}{\-}enable-static-cons] |
| 933 |
\index[general]{{-}{\-}enable-static-cons} |
| 934 |
This option causes the make process to build a {\bf static-console} in |
| 935 |
addition to the standard console. This static version will include |
| 936 |
statically linked libraries and could be useful during a Bare Metal |
| 937 |
recovery. |
| 938 |
|
| 939 |
When linking a static binary, the linker needs the static versions |
| 940 |
of all the libraries that are used, so frequently users will |
| 941 |
experience linking errors when this option is used. The first |
| 942 |
thing to do is to make sure you have the static glibc library |
| 943 |
installed on your system. The second thing to do is the make sure |
| 944 |
you do not specify {\bf {-}{\-}openssl} or other options |
| 945 |
on your ./configure statement as these options require additional |
| 946 |
libraries. You may be able to enable those options, but you will |
| 947 |
need to load additional static libraries. |
| 948 |
|
| 949 |
|
| 950 |
\item [ {-}{\-}enable-client-only] |
| 951 |
\index[general]{{-}{\-}enable-client-only} |
| 952 |
This option causes the make process to build only the File daemon and |
| 953 |
the libraries that it needs. None of the other daemons, storage tools, |
| 954 |
nor the console will be built. Likewise a {\bf make install} will then |
| 955 |
only install the File daemon. To cause all daemons to be built, you |
| 956 |
will need to do a configuration without this option. This option |
| 957 |
greatly facilitates building a Client on a client only machine. |
| 958 |
|
| 959 |
When linking a static binary, the linker needs the static versions |
| 960 |
of all the libraries that are used, so frequently users will |
| 961 |
experience linking errors when this option is used. The first |
| 962 |
thing to do is to make sure you have the static glibc library |
| 963 |
installed on your system. The second thing to do is the make sure |
| 964 |
you do not specify {\bf {-}{\-}openssl} or other options |
| 965 |
on your ./configure statement as these options require additional |
| 966 |
libraries. You may be able to enable those options, but you will |
| 967 |
need to load additional static libraries. |
| 968 |
|
| 969 |
\item [ {-}{\-}enable-build-dird] |
| 970 |
\index[general]{{-}{\-}enable-build-dird} |
| 971 |
This option causes the make process to build the Director and the |
| 972 |
Director's tools. By default, this option is on, but you may turn |
| 973 |
it off by using {\bf {-}{\-}disable-build-dird} to prevent the |
| 974 |
Director from being built. |
| 975 |
|
| 976 |
\item [ {-}{\-}enable-build-stored] |
| 977 |
\index[general]{{-}{\-}enable-build-stored} |
| 978 |
This option causes the make process to build the Storage daemon. |
| 979 |
By default, this option is on, but you may turn |
| 980 |
it off by using {\bf {-}{\-}disable-build-stored} to prevent the |
| 981 |
Storage daemon from being built. |
| 982 |
|
| 983 |
|
| 984 |
\item [ {-}{\-}enable-largefile] |
| 985 |
\index[general]{{-}{\-}enable-largefile} |
| 986 |
This option (default) causes \bacula{} to be built with 64 bit file address |
| 987 |
support if it is available on your system. This permits \bacula{} to read and |
| 988 |
write files greater than 2 GBytes in size. You may disable this feature and |
| 989 |
revert to 32 bit file addresses by using {\bf \verb:--:disable-largefile}. |
| 990 |
|
| 991 |
\item [ {-}{\-}disable-nls] |
| 992 |
\index[general]{{-}{\-}disable-nls} |
| 993 |
By default, \bacula{} uses the GNU Native Language Support (NLS) libraries. On |
| 994 |
some machines, these libraries may not be present or may not function |
| 995 |
correctly (especially on non-Linux implementations). In such cases, you |
| 996 |
may specify {\bf {-}{\-}disable-nls} to disable use of those libraries. |
| 997 |
In such a case, \bacula{} will revert to using English. |
| 998 |
|
| 999 |
\item [ {-}{\-}disable-ipv6 ] |
| 1000 |
\index[general]{{-}{\-}disable-ipv6} |
| 1001 |
By default, \bacula{} enables IPv6 protocol. On some systems, the files |
| 1002 |
for IPv6 may exist, but the functionality could be turned off in the |
| 1003 |
kernel. In that case, in order to correctly build \bacula{}, you will |
| 1004 |
explicitly need to use this option so that \bacula{} does not attempt |
| 1005 |
to reference OS function calls that do not exist. |
| 1006 |
|
| 1007 |
\item [ {-}{\-}with-mysql=\lt{}mysql-path\gt{}] |
| 1008 |
\index[general]{{-}{\-}with-mysql} |
| 1009 |
This enables building of the Catalog services for \bacula{}. It assumes |
| 1010 |
that MySQL is running on your system, and expects it to be installed in |
| 1011 |
the {\bf mysql-path} that you specify. Normally, if MySQL is installed |
| 1012 |
in a standard system location, you can simply use {\bf {-}{\-}with-mysql} |
| 1013 |
with no path specification. If you do use this option, please proceed |
| 1014 |
to installing MySQL in the \bilink{Installing and Configuring MySQL}{blb:MySqlChapter} chapter before proceeding with the configuration. |
| 1015 |
|
| 1016 |
See the note below under the {-}{\-}with-postgresql item. |
| 1017 |
|
| 1018 |
\item [ {-}{\-}with-postgresql=\lt{}path\gt{}] |
| 1019 |
\index[general]{{-}{\-}with-postgresql} |
| 1020 |
This provides an explicit path to the PostgreSQL libraries if \bacula{} |
| 1021 |
cannot find it by default. Normally to build with PostgreSQL, you would |
| 1022 |
simply use {\bf {-}{\-}with-postgresql}. |
| 1023 |
|
| 1024 |
Note, for \bacula{} to be configured properly, you must specify one |
| 1025 |
of the two database options supported. That is: |
| 1026 |
{-}{\-}with-postgresql, otherwise the ./configure will fail. |
| 1027 |
\smallskip |
| 1028 |
|
| 1029 |
|
| 1030 |
\item [ {-}{\-}with-openssl=\lt{}path\gt{}] |
| 1031 |
This configuration option is necessary if you want to enable TLS (ssl), |
| 1032 |
which encrypts the communications within |
| 1033 |
\bacula{} or if you want to use File Daemon PKI data encryption. |
| 1034 |
Normally, the {\bf path} specification is not necessary since |
| 1035 |
the configuration searches for the OpenSSL libraries in standard system |
| 1036 |
locations. However, you must ensure that all the libraries are |
| 1037 |
loaded including {\bf libssl-dev} or the equivalent on your |
| 1038 |
system. Enabling OpenSSL in \bacula{} permits secure communications |
| 1039 |
between the daemons and/or data encryption in the File daemon. |
| 1040 |
For more information on using TLS, please see the |
| 1041 |
\bilink{\bacula{} TLS -- Communications Encryption}{blb:CommEncryption} chapter |
| 1042 |
of this manual. |
| 1043 |
For more information on using PKI data encryption, please see the |
| 1044 |
\bilink{\bacula{} PKI -- Data Encryption}{blb:DataEncryption} |
| 1045 |
chapter of this manual. |
| 1046 |
|
| 1047 |
If you get errors linking, you need to load the development libraries, |
| 1048 |
or you need to disable SSL by setting without-openssl. |
| 1049 |
|
| 1050 |
|
| 1051 |
\item [ {-}{\-}with-libintl-prefix=\lt{}DIR\gt{}] |
| 1052 |
\index[general]{{-}{\-}with-libintl-prefix} |
| 1053 |
This option may be used to tell \bacula{} to search DIR/include and |
| 1054 |
DIR/lib for the libintl headers and libraries needed for Native |
| 1055 |
Language Support (NLS). |
| 1056 |
|
| 1057 |
\item [ {-}{\-}enable-conio] |
| 1058 |
\index[general]{{-}{\-}enable-conio} |
| 1059 |
Tells \bacula{} to enable building the small, light weight readline |
| 1060 |
replacement routine. It is generally much easier to configure than |
| 1061 |
readline, although, like readline, it needs either the termcap or |
| 1062 |
ncurses library. |
| 1063 |
|
| 1064 |
\item [ {-}{\-}with-readline=\lt{}readline-path\gt{}] |
| 1065 |
\index[general]{{-}{\-}with-readline} |
| 1066 |
Tells \bacula{} where {\bf readline} is installed. Normally, \bacula{} will |
| 1067 |
find readline if it is in a standard library. If it is not found and no |
| 1068 |
{-}{\-}with-readline is specified, readline will be disabled. This |
| 1069 |
option affects the \bacula{} build. Readline provides the Console program |
| 1070 |
with a command line history and editing capability and is no longer |
| 1071 |
supported, so you are on your own if you have problems. |
| 1072 |
|
| 1073 |
\item [ {-}{\-}enable-readline] |
| 1074 |
\index[general]{{-}{\-}enable-readline} |
| 1075 |
Tells \bacula{} to enable readline support. It is normally disabled due to the |
| 1076 |
large number of configuration problems and the fact that the package seems to |
| 1077 |
change in incompatible ways from version to version. |
| 1078 |
|
| 1079 |
\item [ {-}{\-}with-tcp-wrappers=\lt{}path\gt{}] |
| 1080 |
\index[general]{{-}{\-}with-tcp-wrappers} |
| 1081 |
\index[general]{TCP Wrappers} |
| 1082 |
\index[general]{Wrappers!TCP} |
| 1083 |
\index[general]{libwrappers} |
| 1084 |
This specifies that you want TCP wrappers (man hosts\_access(5)) compiled in. |
| 1085 |
The path is optional since \bacula{} will normally find the libraries in the |
| 1086 |
standard locations. This option affects the \bacula{} build. In specifying your |
| 1087 |
restrictions in the {\bf /etc/hosts.allow} or {\bf /etc/hosts.deny} files, do |
| 1088 |
not use the {\bf twist} option (hosts\_options(5)) or the \bacula{} process will |
| 1089 |
be terminated. Note, when setting up your {\bf /etc/hosts.allow} |
| 1090 |
or {\bf /etc/hosts.deny}, you must identify the \bacula{} daemon in |
| 1091 |
question with the name you give it in your conf file rather than the |
| 1092 |
name of the executable. |
| 1093 |
|
| 1094 |
For more information on configuring and testing TCP wrappers, please see the |
| 1095 |
\bilink{Configuring and Testing TCP Wrappers}{blb:wrappers} section |
| 1096 |
in the Security Chapter. |
| 1097 |
|
| 1098 |
On SuSE, the libwrappers libraries needed to link \bacula{} are |
| 1099 |
contained in the tcpd-devel package. On Red Hat, the package is named |
| 1100 |
tcp\_wrappers. |
| 1101 |
|
| 1102 |
\item [ {-}{\-}with-archivedir=\lt{}path\gt{} ] |
| 1103 |
\index[general]{{-}{\-}with-archivedir} |
| 1104 |
The directory used for disk-based backups. Default value is /tmp. |
| 1105 |
This parameter sets the default values in the bacula-dir.conf and bacula-sd.conf |
| 1106 |
configuration files. For example, it sets the Where directive for the |
| 1107 |
default restore job and the Archive Device directive for the FileStorage |
| 1108 |
device. |
| 1109 |
|
| 1110 |
This option is designed primarily for use in regression testing. |
| 1111 |
Most users can safely ignore this option. |
| 1112 |
|
| 1113 |
\item [ {-}{\-}with-working-dir=\lt{}working-directory-path\gt{} ] |
| 1114 |
\index[general]{{-}{\-}with-working-dir} |
| 1115 |
This option is mandatory and specifies a directory into which \bacula{} may |
| 1116 |
safely place files that will remain between \bacula{} executions. For example, |
| 1117 |
if the internal database is used, \bacula{} will keep those files in this |
| 1118 |
directory. This option is only used to modify the daemon configuration |
| 1119 |
files. You may also accomplish the same thing by directly editing them later. |
| 1120 |
The working directory is not automatically created by the install process, so |
| 1121 |
you must ensure that it exists before using \bacula{} for the first time. |
| 1122 |
|
| 1123 |
\item [ {-}{\-}with-baseport=\lt{}port=number\gt{}] |
| 1124 |
\index[general]{{-}{\-}with-baseport} |
| 1125 |
In order to run, \bacula{} needs three TCP/IP ports (one for the \bacula{} |
| 1126 |
Console, one for the Storage daemon, and one for the File daemon). The {\bf |
| 1127 |
\verb:--:with-baseport} option will automatically assign three ports beginning at |
| 1128 |
the base port address specified. You may also change the port number in the |
| 1129 |
resulting configuration files. However, you need to take care that the |
| 1130 |
numbers correspond correctly in each of the three daemon configuration |
| 1131 |
files. The default base port is 9101, which assigns ports 9101 through 9103. |
| 1132 |
These ports (9101, 9102, and 9103) have been officially assigned to \bacula{} by |
| 1133 |
IANA. This option is only used to modify the daemon configuration files. You |
| 1134 |
may also accomplish the same thing by directly editing them later. |
| 1135 |
|
| 1136 |
\item [ {-}{\-}with-dump-email=\lt{}email-address\gt{}] |
| 1137 |
\index[general]{{-}{\-}with-dump-email} |
| 1138 |
This option specifies the email address where any core dumps should be set. |
| 1139 |
This option is normally only used by developers. |
| 1140 |
|
| 1141 |
\item [ {-}{\-}with-pid-dir=\lt{}PATH\gt{} ] |
| 1142 |
\index[general]{{-}{\-}with-pid-dir} |
| 1143 |
This specifies where \bacula{} should place the process id file during |
| 1144 |
execution. The default is: {\bf /var/run}. This directory is not created by |
| 1145 |
the install process, so you must ensure that it exists before using \bacula{} |
| 1146 |
the first time. |
| 1147 |
|
| 1148 |
\item [ {-}{\-}with-subsys-dir=\lt{}PATH\gt{}] |
| 1149 |
\index[general]{{-}{\-}with-subsys-dir} |
| 1150 |
This specifies where \bacula{} should place the subsystem lock file during |
| 1151 |
execution. The default is {\bf /var/run/subsys}. Please make sure that you do |
| 1152 |
not specify the same directory for this directory and for the {\bf sbindir} |
| 1153 |
directory. This directory is used only within the autostart scripts. The |
| 1154 |
subsys directory is not created by the \bacula{} install, so you must be sure to |
| 1155 |
create it before using \bacula{}. |
| 1156 |
|
| 1157 |
\item [ {-}{\-}with-dir-password=\lt{}Password\gt{}] |
| 1158 |
\index[general]{{-}{\-}with-dir-password} |
| 1159 |
This option allows you to specify the password used to access the Director |
| 1160 |
(normally from the Console program). If it is not specified, configure will |
| 1161 |
automatically create a random password. |
| 1162 |
|
| 1163 |
\item [ {-}{\-}with-fd-password=\lt{}Password\gt{} ] |
| 1164 |
\index[general]{{-}{\-}with-fd-password} |
| 1165 |
This option allows you to specify the password used to access the File daemon |
| 1166 |
(normally called from the Director). If it is not specified, configure will |
| 1167 |
automatically create a random password. |
| 1168 |
|
| 1169 |
\item [ {-}{\-}with-sd-password=\lt{}Password\gt{} ] |
| 1170 |
\index[general]{{-}{\-}with-sd-password} |
| 1171 |
This option allows you to specify the password used to access the Storage daemon |
| 1172 |
(normally called from the Director). If it is not specified, configure will |
| 1173 |
automatically create a random password. |
| 1174 |
|
| 1175 |
\item [ {-}{\-}with-dir-user=\lt{}User\gt{} ] |
| 1176 |
\index[general]{{-}{\-}with-dir-user} |
| 1177 |
This option allows you to specify the Userid used to run the Director. The |
| 1178 |
Director must be started as root, but doesn't need to run as root, and |
| 1179 |
after doing preliminary initializations, it can "drop" to the UserId |
| 1180 |
specified on this option. |
| 1181 |
If you specify this option, you must |
| 1182 |
create the User prior to running {\bf make install}, because the |
| 1183 |
working directory owner will be set to {\bf User}. |
| 1184 |
|
| 1185 |
\item [ {-}{\-}with-dir-group=\lt{}Group\gt{} ] |
| 1186 |
\index[general]{{-}{\-}with-dir-group} |
| 1187 |
This option allows you to specify the GroupId used to run the Director. The |
| 1188 |
Director must be started as root, but doesn't need to run as root, and after |
| 1189 |
doing preliminary initializations, it can "drop" to the GroupId specified |
| 1190 |
on this option. |
| 1191 |
If you specify this option, you must |
| 1192 |
create the Group prior to running {\bf make install}, because the |
| 1193 |
working directory group will be set to {\bf Group}. |
| 1194 |
|
| 1195 |
\item [ {-}{\-}with-sd-user=\lt{}User\gt{} ] |
| 1196 |
\index[general]{{-}{\-}with-sd-user} |
| 1197 |
This option allows you to specify the Userid used to run the Storage daemon. |
| 1198 |
The Storage daemon must be started as root, but doesn't need to run as root, |
| 1199 |
and after doing preliminary initializations, it can "drop" to the UserId |
| 1200 |
specified on this option. If you use this option, you will need to take care |
| 1201 |
that the Storage daemon has access to all the devices (tape drives, ...) that |
| 1202 |
it needs. |
| 1203 |
|
| 1204 |
\item [ {-}{\-}with-sd-group=\lt{}Group\gt{} ] |
| 1205 |
\index[general]{{-}{\-}with-sd-group} |
| 1206 |
This option allows you to specify the GroupId used to run the Storage daemon. |
| 1207 |
The Storage daemon must be started as root, but doesn't need to run as root, |
| 1208 |
and after doing preliminary initializations, it can "drop" to the GroupId |
| 1209 |
specified on this option. |
| 1210 |
|
| 1211 |
\item [ {-}{\-}with-fd-user=\lt{}User\gt{} ] |
| 1212 |
\index[general]{{-}{\-}with-fd-user} |
| 1213 |
This option allows you to specify the Userid used to run the File daemon. The |
| 1214 |
File daemon must be started as root, and in most cases, it needs to run as |
| 1215 |
root, so this option is used only in very special cases, after doing |
| 1216 |
preliminary initializations, it can "drop" to the UserId specified on this |
| 1217 |
option. |
| 1218 |
|
| 1219 |
\item [ {-}{\-}with-fd-group=\lt{}Group\gt{} ] |
| 1220 |
\index[general]{{-}{\-}with-fd-group} |
| 1221 |
This option allows you to specify the GroupId used to run the File daemon. |
| 1222 |
The File daemon must be started as root, and in most cases, it must be run as |
| 1223 |
root, however, after doing preliminary initializations, it can "drop" to |
| 1224 |
the GroupId specified on this option. |
| 1225 |
|
| 1226 |
\item [ {-}{\-}with-mon-dir-password=\lt{}Password\gt{}] |
| 1227 |
\index[general]{{-}{\-}with-mon-dir-password} |
| 1228 |
This option allows you to specify the password used to access the Directory |
| 1229 |
from the monitor. If it is not specified, configure will |
| 1230 |
automatically create a random password. |
| 1231 |
|
| 1232 |
\item [ {-}{\-}with-mon-fd-password=\lt{}Password\gt{} ] |
| 1233 |
\index[general]{{-}{\-}with-mon-fd-password} |
| 1234 |
This option allows you to specify the password used to access the File daemon |
| 1235 |
from the Monitor. If it is not specified, configure will |
| 1236 |
automatically create a random password. |
| 1237 |
|
| 1238 |
\item [ {-}{\-}with-mon-sd-password=\lt{}Password\gt{} ] |
| 1239 |
\index[general]{{-}{\-}with-mon-sd-password} |
| 1240 |
This option allows you to specify the password used to access the |
| 1241 |
Storage daemon from the Monitor. If it is not specified, configure will |
| 1242 |
automatically create a random password. |
| 1243 |
|
| 1244 |
\item [ {-}{\-}with-db-name=\lt{}database-name\gt{} ] |
| 1245 |
\index[general]{{-}{\-}with-db-name} |
| 1246 |
This option allows you to specify the database name to be used in |
| 1247 |
the conf files. The default is bacula. |
| 1248 |
|
| 1249 |
\item [ {-}{\-}with-db-user=\lt{}database-user\gt{} ] |
| 1250 |
\index[general]{{-}{\-}with-db-user} |
| 1251 |
This option allows you to specify the database user name to be used in |
| 1252 |
the conf files. The default is bacula. |
| 1253 |
|
| 1254 |
\end{description} |
| 1255 |
|
| 1256 |
Note, many other options are presented when you do a {\bf ./configure |
| 1257 |
\verb:--:help}, but they are not implemented. |
| 1258 |
|
| 1259 |
\section{Recommended Options for Most Systems} |
| 1260 |
\index[general]{Systems!Recommended Options for Most} |
| 1261 |
\index[general]{Recommended Options for Most Systems} |
| 1262 |
|
| 1263 |
For most systems, we recommend starting with the following options: |
| 1264 |
|
| 1265 |
\footnotesize |
| 1266 |
\begin{verbatim} |
| 1267 |
./configure \ |
| 1268 |
--enable-smartalloc \ |
| 1269 |
--sbindir=/opt/bacula/bin \ |
| 1270 |
--sysconfdir=/opt/bacula/etc \ |
| 1271 |
--with-pid-dir=/opt/bacula/working \ |
| 1272 |
--with-subsys-dir=/opt/bacula/working \ |
| 1273 |
--with-working-dir=/opt/bacula/working |
| 1274 |
\end{verbatim} |
| 1275 |
\normalsize |
| 1276 |
|
| 1277 |
If you want to install \bacula{} in an installation directory rather than run it |
| 1278 |
out of the build directory (as developers will do most of the time), you |
| 1279 |
should also include the \verb:--:sbindir and \verb:--:sysconfdir options with appropriate |
| 1280 |
paths. Neither are necessary if you do not use "make install" as is the case |
| 1281 |
for most development work. The install process will create the sbindir and |
| 1282 |
sysconfdir if they do not exist, but it will not automatically create the |
| 1283 |
pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before |
| 1284 |
running \bacula{} for the first time. |
| 1285 |
|
| 1286 |
\section{Red Hat} |
| 1287 |
\index[general]{Red Hat} |
| 1288 |
|
| 1289 |
or |
| 1290 |
|
| 1291 |
\footnotesize |
| 1292 |
\begin{verbatim} |
| 1293 |
|
| 1294 |
CFLAGS="-g -Wall" ./configure \ |
| 1295 |
--sbindir=/opt/bacula/bin \ |
| 1296 |
--sysconfdir=/opt/bacula/etc \ |
| 1297 |
--enable-smartalloc \ |
| 1298 |
--with-mysql \ |
| 1299 |
--with-working-dir=/opt/bacula/working |
| 1300 |
--with-pid-dir=/opt/bacula/working \ |
| 1301 |
--with-subsys-dir=/opt/bacula/working |
| 1302 |
--enable-readline |
| 1303 |
\end{verbatim} |
| 1304 |
\normalsize |
| 1305 |
|
| 1306 |
or finally, a completely traditional Red Hat Linux install, |
| 1307 |
which we do not recommend, because it make it harder to |
| 1308 |
backup \bacula{} for disaster recovery purposes: |
| 1309 |
|
| 1310 |
\footnotesize |
| 1311 |
\begin{verbatim} |
| 1312 |
CFLAGS="-g -Wall" ./configure \ |
| 1313 |
--sbindir=/usr/sbin \ |
| 1314 |
--sysconfdir=/etc/bacula \ |
| 1315 |
--with-scriptdir=/etc/bacula \ |
| 1316 |
--enable-smartalloc \ |
| 1317 |
--enable-bat \ |
| 1318 |
--with-mysql \ |
| 1319 |
--with-working-dir=/var/bacula \ |
| 1320 |
--with-pid-dir=/var/run \ |
| 1321 |
--enable-readline |
| 1322 |
\end{verbatim} |
| 1323 |
\normalsize |
| 1324 |
|
| 1325 |
Note, \bacula{} assumes that /var/bacula, /var/run, and /var/lock/subsys exist so |
| 1326 |
it will not automatically create them during the install process. |
| 1327 |
|
| 1328 |
\section{Solaris} |
| 1329 |
\index[general]{Solaris} |
| 1330 |
|
| 1331 |
To build \bacula{} from source, you will need the following installed on your |
| 1332 |
system (they are not by default): libiconv, gcc 3.3.2, stdc++, libgcc (for |
| 1333 |
stdc++ and gcc\_s libraries), make 3.8 or later. |
| 1334 |
|
| 1335 |
You will probably also need to: Add /usr/local/bin to PATH and Add |
| 1336 |
/usr/ccs/bin to PATH for ar. |
| 1337 |
|
| 1338 |
It is possible to build \bacula{} on Solaris with the Solaris compiler, but |
| 1339 |
we recommend using GNU C++ if possible. |
| 1340 |
|
| 1341 |
A typical configuration command might look like: |
| 1342 |
|
| 1343 |
\footnotesize |
| 1344 |
\begin{verbatim} |
| 1345 |
#!/bin/sh |
| 1346 |
CFLAGS="-g" ./configure \ |
| 1347 |
--sbindir=/opt/bacula/bin \ |
| 1348 |
--sysconfdir=/opt/bacula/etc \ |
| 1349 |
--with-mysql \ |
| 1350 |
--enable-smartalloc \ |
| 1351 |
--with-pid-dir=/opt/bacula/working \ |
| 1352 |
--with-subsys-dir=/opt/bacula/working \ |
| 1353 |
--with-working-dir=/opt/bacula/working |
| 1354 |
\end{verbatim} |
| 1355 |
\normalsize |
| 1356 |
|
| 1357 |
Note, you may need to install the following packages to build \bacula{} |
| 1358 |
from source: |
| 1359 |
\footnotesize |
| 1360 |
\begin{verbatim} |
| 1361 |
SUNWbinutils, |
| 1362 |
SUNWarc, |
| 1363 |
SUNWhea, |
| 1364 |
SUNWGcc, |
| 1365 |
SUNWGnutls |
| 1366 |
SUNWGnutls-devel |
| 1367 |
SUNWGmake |
| 1368 |
SUNWgccruntime |
| 1369 |
SUNWlibgcrypt |
| 1370 |
SUNWzlib |
| 1371 |
SUNWzlibs |
| 1372 |
SUNWreadline |
| 1373 |
SUNWbinutilsS |
| 1374 |
SUNWGmakeS |
| 1375 |
SUNWlibm |
| 1376 |
|
| 1377 |
export |
| 1378 |
PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin |
| 1379 |
\end{verbatim} |
| 1380 |
\normalsize |
| 1381 |
|
| 1382 |
If you have installed special software not normally in the Solaris |
| 1383 |
libraries, such as OpenSSL, or the packages shown above, then you may need |
| 1384 |
to add {\bf /usr/sfw/lib} to the library search path. Probably the |
| 1385 |
simplest way to do so is to run: |
| 1386 |
|
| 1387 |
\footnotesize |
| 1388 |
\begin{verbatim} |
| 1389 |
setenv LDFLAGS "-L/usr/sfw/lib -R/usr/sfw/lib" |
| 1390 |
\end{verbatim} |
| 1391 |
\normalsize |
| 1392 |
|
| 1393 |
Prior to running the ./configure command. |
| 1394 |
|
| 1395 |
Alternatively, you can set the LD\_LIBARY\_PATH and/or the LD\_RUN\_PATH |
| 1396 |
environment variables appropriately. |
| 1397 |
|
| 1398 |
It is also possible to use the {\bf crle} program to set the library |
| 1399 |
search path. However, this should be used with caution. |
| 1400 |
|
| 1401 |
\section{FreeBSD} |
| 1402 |
\index[general]{FreeBSD} |
| 1403 |
|
| 1404 |
Please see: |
| 1405 |
\bulink{The FreeBSD Diary}{http://www.freebsddiary.org/bacula.php} for a |
| 1406 |
detailed description on how to make \bacula{} work on your system. In addition, |
| 1407 |
users of FreeBSD prior to 4.9-STABLE dated Mon Dec 29 15:18:01 2003 UTC who |
| 1408 |
plan to use tape devices, please see the |
| 1409 |
Tape Testing chapter of the Problems manual for |
| 1410 |
% FIXME: borgxrlink{} is broken and \problemsman{} seem also to not work here |
| 1411 |
%\borgxrlink{Tape Testing}{FreeBSDTapes}{problems}{chapter} of the \problemsman{} for |
| 1412 |
{\bf important} information on how to configure your tape drive for |
| 1413 |
compatibility with \bacula{}. |
| 1414 |
|
| 1415 |
If you are using \bacula{} with MySQL, you should take care to compile MySQL with |
| 1416 |
FreeBSD native threads rather than LinuxThreads, since \bacula{} is normally built |
| 1417 |
with FreeBSD native threads rather than LinuxTreads. Mixing the two will |
| 1418 |
probably not work. |
| 1419 |
|
| 1420 |
\section{Win32} |
| 1421 |
\index[general]{Win32} |
| 1422 |
|
| 1423 |
To install the binary Win32 version of the File daemon please see the |
| 1424 |
\bilink{Win32 Installation Chapter}{blb:Win32Chapter} in this document. |
| 1425 |
|
| 1426 |
\section{One File Configure Script} |
| 1427 |
\index[general]{Script!One File Configure} |
| 1428 |
\index[general]{One Files Configure Script} |
| 1429 |
|
| 1430 |
The following script could be used if you want to put everything |
| 1431 |
in a single directory (except for the working directory): |
| 1432 |
|
| 1433 |
\footnotesize |
| 1434 |
\begin{verbatim} |
| 1435 |
#!/bin/sh |
| 1436 |
CFLAGS="-g -Wall" \ |
| 1437 |
./configure \ |
| 1438 |
--sbindir=$HOME/bacula/bin \ |
| 1439 |
--sysconfdir=$HOME/bacula/bin \ |
| 1440 |
--mandir=$HOME/bacula/bin \ |
| 1441 |
--enable-smartalloc \ |
| 1442 |
--enable-bat \ |
| 1443 |
--with-pid-dir=$HOME/bacula/bin/working \ |
| 1444 |
--with-subsys-dir=$HOME/bacula/bin/working \ |
| 1445 |
--with-mysql \ |
| 1446 |
--with-working-dir=$HOME/bacula/bin/working \ |
| 1447 |
[email protected] \ |
| 1448 |
[email protected] \ |
| 1449 |
--with-smtp-host=mail.your-site.com |
| 1450 |
exit 0 |
| 1451 |
\end{verbatim} |
| 1452 |
\normalsize |
| 1453 |
|
| 1454 |
You may also want to put the following entries in your {\bf /etc/services} |
| 1455 |
file as it will make viewing the connections made by \bacula{} easier to |
| 1456 |
recognize (i.e. netstat -a): |
| 1457 |
|
| 1458 |
\footnotesize |
| 1459 |
\begin{verbatim} |
| 1460 |
bacula-dir 9101/tcp |
| 1461 |
bacula-fd 9102/tcp |
| 1462 |
bacula-sd 9103/tcp |
| 1463 |
\end{verbatim} |
| 1464 |
\normalsize |
| 1465 |
|
| 1466 |
\section{Installing Bacula} |
| 1467 |
\index[general]{Bacula!Installing} |
| 1468 |
\index[general]{Installing Bacula} |
| 1469 |
|
| 1470 |
Before setting up your configuration files, you will want to install \bacula{} in |
| 1471 |
its final location. Simply enter: |
| 1472 |
|
| 1473 |
\footnotesize |
| 1474 |
\begin{verbatim} |
| 1475 |
make install |
| 1476 |
\end{verbatim} |
| 1477 |
\normalsize |
| 1478 |
|
| 1479 |
If you have previously installed \bacula{}, the old binaries will be overwritten, |
| 1480 |
but the old configuration files will remain unchanged, and the "new" |
| 1481 |
configuration files will be appended with a {\bf .new}. Generally if you have |
| 1482 |
previously installed and run \bacula{} you will want to discard or ignore the |
| 1483 |
configuration files with the appended {\bf .new}. |
| 1484 |
|
| 1485 |
\section{Building a File Daemon or Client} |
| 1486 |
\index[general]{Client!Building a File Daemon or} |
| 1487 |
\index[general]{Building a File Daemon or Client} |
| 1488 |
|
| 1489 |
If you run the Director and the Storage daemon on one machine and you wish to |
| 1490 |
back up another machine, you must have a copy of the File daemon for that |
| 1491 |
machine. If the machine and the Operating System are identical, you can simply |
| 1492 |
copy the \bacula{} File daemon binary file {\bf bacula-fd} as well as its |
| 1493 |
configuration file {\bf bacula-fd.conf} then modify the name and password in |
| 1494 |
the conf file to be unique. Be sure to make corresponding additions to the |
| 1495 |
Director's configuration file ({\bf bacula-dir.conf}). |
| 1496 |
|
| 1497 |
If the architecture or the OS level are different, you will need to build a |
| 1498 |
File daemon on the Client machine. To do so, you can use the same {\bf |
| 1499 |
./configure} command as you did for your main program, starting either from a |
| 1500 |
fresh copy of the source tree, or using {\bf make\ distclean} before the {\bf |
| 1501 |
./configure}. |
| 1502 |
|
| 1503 |
Since the File daemon does not access the Catalog database, you can remove |
| 1504 |
the {\bf \verb:--:with-mysql} ption, then |
| 1505 |
add {\bf \verb:--:enable-client-only}. This will compile only the |
| 1506 |
necessary libraries and the client programs and thus avoids the necessity |
| 1507 |
of installing one or another of those database programs to build the File |
| 1508 |
daemon. With the above option, you simply enter {\bf make} and just the |
| 1509 |
client will be built. |
| 1510 |
|
| 1511 |
\label{autostart} |
| 1512 |
\section{Auto Starting the Daemons} |
| 1513 |
\index[general]{Daemons!Auto Starting the} |
| 1514 |
\index[general]{Auto Starting the Daemons} |
| 1515 |
|
| 1516 |
If you wish the daemons to be automatically started and stopped when your |
| 1517 |
system is booted (a good idea), one more step is necessary. First, the |
| 1518 |
./configure process must recognize your system -- that is it must be a |
| 1519 |
supported platform and not {\bf unknown}, then you must install the platform |
| 1520 |
dependent files by doing: |
| 1521 |
|
| 1522 |
\footnotesize |
| 1523 |
\begin{verbatim} |
| 1524 |
(become root) |
| 1525 |
make install-autostart |
| 1526 |
\end{verbatim} |
| 1527 |
\normalsize |
| 1528 |
|
| 1529 |
Please note, that the auto-start feature is implemented only on systems |
| 1530 |
that we officially support (currently, FreeBSD, Red Hat/Fedora Linux, and |
| 1531 |
Solaris), and has only been fully tested on Fedora Linux. |
| 1532 |
|
| 1533 |
The {\bf make install-autostart} will cause the appropriate startup scripts |
| 1534 |
to be installed with the necessary symbolic links. On Red Hat/Fedora Linux |
| 1535 |
systems, these scripts reside in {\bf /etc/rc.d/init.d/bacula-dir} {\bf |
| 1536 |
/etc/rc.d/init.d/bacula-fd}, and {\bf /etc/rc.d/init.d/bacula-sd}. However |
| 1537 |
the exact location depends on what operating system you are using. |
| 1538 |
|
| 1539 |
If you only wish to install the File daemon, you may do so with: |
| 1540 |
|
| 1541 |
\footnotesize |
| 1542 |
\begin{verbatim} |
| 1543 |
make install-autostart-fd |
| 1544 |
\end{verbatim} |
| 1545 |
\normalsize |
| 1546 |
|
| 1547 |
\section{Other Make Notes} |
| 1548 |
\index[general]{Notes!Other Make} |
| 1549 |
\index[general]{Other Make Notes} |
| 1550 |
|
| 1551 |
To simply build a new executable in any directory, enter: |
| 1552 |
|
| 1553 |
\footnotesize |
| 1554 |
\begin{verbatim} |
| 1555 |
make |
| 1556 |
\end{verbatim} |
| 1557 |
\normalsize |
| 1558 |
|
| 1559 |
To clean out all the objects and binaries (including the files named 1, 2, or |
| 1560 |
3, which are development temporary files), enter: |
| 1561 |
|
| 1562 |
\footnotesize |
| 1563 |
\begin{verbatim} |
| 1564 |
make clean |
| 1565 |
\end{verbatim} |
| 1566 |
\normalsize |
| 1567 |
|
| 1568 |
To really clean out everything for distribution, enter: |
| 1569 |
|
| 1570 |
\footnotesize |
| 1571 |
\begin{verbatim} |
| 1572 |
make distclean |
| 1573 |
\end{verbatim} |
| 1574 |
\normalsize |
| 1575 |
|
| 1576 |
note, this cleans out the Makefiles and is normally done from the top level |
| 1577 |
directory to prepare for distribution of the source. To recover from this |
| 1578 |
state, you must redo the {\bf ./configure} in the top level directory, since |
| 1579 |
all the Makefiles will be deleted. |
| 1580 |
|
| 1581 |
To add a new file in a subdirectory, edit the Makefile.in in that directory, |
| 1582 |
then simply do a {\bf make}. In most cases, the make will rebuild the Makefile |
| 1583 |
from the new Makefile.in. In some case, you may need to issue the {\bf make} a |
| 1584 |
second time. In extreme cases, cd to the top level directory and enter: {\bf |
| 1585 |
make Makefiles}. |
| 1586 |
|
| 1587 |
To add dependencies: |
| 1588 |
|
| 1589 |
\footnotesize |
| 1590 |
\begin{verbatim} |
| 1591 |
make depend |
| 1592 |
\end{verbatim} |
| 1593 |
\normalsize |
| 1594 |
|
| 1595 |
The {\bf make depend} appends the header file dependencies for each of the |
| 1596 |
object files to Makefile and Makefile.in. This command should be done in each |
| 1597 |
directory where you change the dependencies. Normally, it only needs to be run |
| 1598 |
when you add or delete source or header files. {\bf make depend} is normally |
| 1599 |
automatically invoked during the configuration process. |
| 1600 |
|
| 1601 |
To install: |
| 1602 |
|
| 1603 |
\footnotesize |
| 1604 |
\begin{verbatim} |
| 1605 |
make install |
| 1606 |
\end{verbatim} |
| 1607 |
\normalsize |
| 1608 |
|
| 1609 |
This not normally done if you are developing \bacula{}, but is used if you are |
| 1610 |
going to run it to backup your system. |
| 1611 |
|
| 1612 |
After doing a {\bf make install} the following files will be installed on your |
| 1613 |
system (more or less). The exact files and location (directory) for each file |
| 1614 |
depends on your {\bf ./configure} command. |
| 1615 |
|
| 1616 |
NOTE: it is quite probable that this list is out of date. But it is a |
| 1617 |
starting point. |
| 1618 |
|
| 1619 |
\footnotesize |
| 1620 |
\begin{verbatim} |
| 1621 |
bacula |
| 1622 |
bacula-dir |
| 1623 |
bacula-dir.conf |
| 1624 |
bacula-fd |
| 1625 |
bacula-fd.conf |
| 1626 |
bacula-sd |
| 1627 |
bacula-sd.conf |
| 1628 |
bextract |
| 1629 |
bls |
| 1630 |
bscan |
| 1631 |
btape |
| 1632 |
btraceback |
| 1633 |
btraceback.gdb |
| 1634 |
bconsole |
| 1635 |
bconsole.conf |
| 1636 |
create_mysql_database |
| 1637 |
dbcheck |
| 1638 |
delete_catalog_backup |
| 1639 |
drop_bacula_tables |
| 1640 |
drop_mysql_tables |
| 1641 |
make_bacula_tables |
| 1642 |
make_catalog_backup |
| 1643 |
make_mysql_tables |
| 1644 |
mtx-changer |
| 1645 |
query.sql |
| 1646 |
bsmtp |
| 1647 |
startmysql |
| 1648 |
stopmysql |
| 1649 |
bwx-console |
| 1650 |
bwx-console.conf |
| 1651 |
9 man pages |
| 1652 |
\end{verbatim} |
| 1653 |
\normalsize |
| 1654 |
|
| 1655 |
\label{monitor} |
| 1656 |
|
| 1657 |
\section{Modifying the Bacula Configuration Files} |
| 1658 |
\index[general]{Modifying the Bacula Configuration Files} |
| 1659 |
\index[general]{Files!Modifying the Bacula Configuration} |
| 1660 |
|
| 1661 |
See the chapter |
| 1662 |
\bilink{Configuring \bacula{}}{blb:ConfigureChapter} in this manual for |
| 1663 |
instructions on how to set \bacula{} configuration files. |