\chapter{What is Bacula?}
\label{ch:whatisbacula}

\bacula{} is a set of computer btools that permits the system
administrator to manage backup, recovery, and verification of computer data
across a network of computers of different kinds. Bacula can also run entirely
upon a single computer and can backup to various types of media, including tape
and disk.

Bacula provides the following key features:

\begin{description}
%\setlength\labelsep{1.3em}%
\item[Network Based]
   All backup and restores are done via the network.
    This permits Bacula to run on a single server and backup any
    computer in your data center.

\item[Centralized Administration]
    Bacula  administration is centralized in the Director.
    Centralizing the administration is essential when your network
    grows beyond a few computers.

\item[Runs Automatically]
    Once setup, Bacula runs automatically.
    Normally a properly configured Bacula installation requires little
    maintenance or intervention except when adding new machines or
    when hardware errors occur.

\item[Performs Bookkeeping]
    Bacula does the hard bookkeeping by maintaining
    a catalog of what is backed up and where.
    If you have hundreds or thousands of machines to be backed up,
    it is essential that the bookkeeping is automatically maintained
    by a btool rather than requiring human intervention.
 
\item[Multi-platform]
     Bacula is compatible with a wide range of platforms:
     *BSD, Unix, Linux, MS~Windows, Mac~OS~X, and others as well as 
     a large range of hardware.

\item[Modular Design]
  means it scales well from small shops (one machine) to very large ones (tens of thousands of machines).

\item[Multiple Backup Media]
  Bacula handles a variety of different media such as disk, tape, autochangers.
  There is no need for expensive Virtual Tape Libraries (VTL),
  Bacula knows how to write to disk out of the box.

\item[Reliable]
  Bacula includes advance tools for memory and lock management, it is very
  common to run it without problems months at a time.

\item[High Performance]
  Bacula's modern multi-threaded design allows running
  multiple simultaneous backups and can achieve speeds writing to
  tape at more than 200~Megabytes per second, or faster.

\item[Customizable]
  Bacula can easily be customized to almost any backup\,/\,restore
  need.

\item[Rapid Restores]
  Easy and rapid restores using Bacula's database and graphical user
  interface.

\item[Advanced Reporting, Notification, Monitoring]
  Bacula has excellent reporting addons such as \bweb{}; those tools
  permit to get graphical and raw statistics for custom reports,
  billings, trends, optimizations and capacity planning.

  Bacula provides very good notifications and monitoring capabilities, and can
  also be extremely well integrated into monitoring tools
  such as Nagios\textregistered{}.

%\item[Open Source]
  %Bacula is Open Source software, thus there are no license
  %fees. No lock-in. You can see and modify what the code does.

\end{description}


\section{Architecture}
\label{ch:baculaarchitecture}
\index{Bacula!Architecture}
Bacula is made up of the following five major components or services:
Director, Console, Client, Storage, and Catalog.

\bimageH[1\linewidth]{architecture-master}{Bacula Components}{fig:components}
%% \begin{figure}[htpb]
%%   \centering
%%   \includegraphics[width=\linewidth]{components}
%%   \caption{Bacula Components}
%%   \label{fig:components}
%% \end{figure}


\section{Bacula Director}
\index{Director}
\label{ch:defdir}
   The Bacula Director is the btool that supervises
   all the backup, restore and verify operations.  The system
   administrator uses the Bacula Director to schedule backups and to
   recover files.  The Director runs as a daemon (or service) in the background.
   If configured by the system administrator, users may access the Director
   to do backups or restores of their files through restricted consoles.


\section{Bacula Console}
\label{ch:defua}
\index{Console}
   The Bacula Console is the btool that allows the
   administrator or user to communicate with the Bacula Director. 
   Bacula Consoles are available with different user front ends:
   text-based console interface, graphical user interface, and web
   interface.
   The first and simplest is to run the \texttt{bconsole} btool in a shell
   window (i.\,e. TTY interface).  Most system administrators will find this
   completely adequate.  There are several graphical user interfaces, the
   most comprehensive being \textbf{bat} (Bacula Administration Tool) written using
   the Qt4 toolkit.  There are also several web interfaces, the most complete
   being \textbf{BWeb Management Suite} available in the Bacula Enterprise version.
  
\section{Bacula Client}
\index{Client}
\label{ch:deffd}
   The Bacula Client service (also known as the File Daemon) is the software
   btool that is installed on each machine to be backed up.
   It is specific to the operating system on which it runs and is responsible 
   for providing the file attributes and data when requested by the Director. The Client
   services are also responsible for the file system dependent part of
   restoring the file attributes and data during a recovery operation.  
   This btool runs as a daemon on the machine to be backed up.\par
   Bacula Enterprise clients, distributed as binary packages, are available for a wide variety of Operating Systems\footnote{Gnu/Linux flavors, Windows systems, Solaris, Mac OSX, AIX, HP-UX and more}

\section{Bacula Storage}
\index{Storage}
\label{ch:defsd}
   The Bacula Storage service is the software btool that
   performs the storage and recovery of the file attributes and data to the
   physical backup media or volumes. In other words, the Storage Daemon is
   responsible for reading and writing your tapes (or other storage media,
   e.\,g. files). The Storage services runs as
   a daemon on the machine that has the backup device (for example a tape
   drive or a large disk).

\section{Catalog}
\index{Catalog}
\label{ch:defcat}
   The Catalog services are comprised of the software btools
   responsible for maintaining the file indexes and volume databases for
   all files backed up. The Catalog services permit the system
   administrator or user to quickly locate and restore any desired file.
   The Catalog services sets Bacula apart from simple archiver btools like
   tar and dump, because the catalog maintains a record of all Volumes used,
   all Jobs run, and all Files saved, permitting efficient restoration and
   Volume management. \par\medskip

   Bacula can run with three SQL database backends: MySQL, PostgreSQL and SQLite. We strongly recommend using SQLite only for testing purposes.\footnote{Actually, \baculasystems{} does not even provide packages with SQLite as a Catalog database backend.}. The two others, MySQL and PostgreSQL, provide quite a number of features, including rapid indexing, arbitrary queries, and security.  

   \section{Bootstrap File Concept}
A \emph{bootstrap file} is an ASCII file containing just the information Bacula needs to find a specific set of data and it is really important in Bacula:
\begin{bitemize}
  \item With a bootstrap file, you can restore without a Catalog;
  \item Bacula uses bootstrap files in Restore, Migrate or Copy Jobs, and more;
  \item The bootstrap files are created and updated automatically for each Job defined when they run.
\end{bitemize}
