Bacula Installation in Debian

If you want to install bacula just follow this                        
 Part1           Continue for Part3

#apt-get install bacula-common bacula-console bacula-director-common bacula-fd bacula-sd libpq3 mysql-server mtx mt-st

Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libmysqlclient12 libmysqlclient14 libnet-daemon-perl libplrpc-perl libreadline4 mysql-client mysql-common perl
Suggested packages:
dds2tar scsitools sg3-utils dbishell libcompress-zlib-perl postgresql-doc postgresql-client mysql-doc libterm-readline-gnu-perl
Recommended packages:
mt-st libmysqlclient14-dev perl-doc
The following NEW packages will be installed:
bacula-common bacula-console bacula-director-common bacula-fd bacula-sd libdbd-mysql-perl libdbi-perl libmysqlclient12 libmysqlclient14 libnet-daemon-perl
libplrpc-perl libpq3 libreadline4 mysql-client mysql-common mysql-server perl perl-modules
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.3MB of archives.
After unpacking 69.1MB of additional disk space will be used.
Do you want to continue? [Y/n] y

This will install the most of the bacula components finally after finishing this installation you need to install the following one

#apt-get install bacula-director-mysql

this is will prompt for database related question just follow on screen instructions.

Before configuring bacula you need to know the following things about bacula

How Bacula works

Bacula relies on three important daemons that run in the background on the Servers and Clients. The Daemons namely are,


The Bacula-Director is considered the heart of the Bacula Backup Solution. The following sections explain in details all these daemons.

Bacula Daemons


The Bacula-Director is considered as the heart of the Bacula Backup system. This Daemon controls the whole backup system and the various other daemons (mainly Bacula-FD & Bacula-SD) to facilitate successful backups. All the default configurations for the backups are configured for this including the Schedules and the media library (pools).

The Server running the Bacula-Director daemon is considered to be the Bacula Backup Server

This daemon should be running in the background for the Bacula backup solution to work .

The Start-up script for the Bacula-Director is,



Bacula-SD is the Bacula Storage Daemon. As the name implies, it takes care of all the various Storage devices or otherwise called as Archive devices. This supports Archive devices including but not limited to Disks, Tapes and CD/DVDs.

There can be more than one Storage Daemon supporting more than one device on any number of servers in the network including the Bacula backup servers. The Bacula-Director can handle control all these Storage daemons without any problem. It also supports multiple concurrent writes to each device, although this may not be a preferred solution in most cases.

This daemon is required to be running at least at the time of backup. Hence, this service is also configured to start and run in the background at the system start-up.

The start-up script is



Bacula-FD is the File Daemon or in other words the client daemon, which should be run on every server that needs to be backed up. This includes the Bacula Backup Server as well in case the server has files to be backed up. Mostly, this is run on the Backup server because it is important to take a backup of the Bacula Backup Catalog required to restore data in case of a disaster.

There is a separate Windows client available as well to backup Windows Servers. The config for windows clients is not discussed as it is beyond the scope of this document.

The start-up script is



The bconsole is the Bacula Console that can be used to make changes and update once the Backup solution is implemented. This is not exactly a daemon but is a console utility that starts and runs whenever a user logs onto the console. This is not required to start and run in the background hence no start-up scripts.


Bsmtp is the smtp utility used by Bacula to end email messages to contacts on various messages including all job status. Bacula runs this utility when a message or alert is sent by Bacula-Director daemon.


The BootStrapRecord is the most critical record that has to be backed up on a different server or a CD or a external media other than the tape media itself. This is required to rebuilt in the event of a disaster to the backup server itself

Bacula Config files

Daemon                Config file(Full path)              Daemon Path(Executable)    Start-up Script

Bacula-director   /etc/Bacula/Bacula-dir.conf        /usr/sbin/Bacula-dir           /etc/init.d/Bacula-director

Bacula-sd          /etc/Bacula/Bacula-sd.conf        /usr/sbin/Bacula-sd            /etc/init.d/Bacula-sd

Bacula-fd          /etc/Bacula/Bacula-fd.conf         /usr/sbin/Bacula-fd            /etc/init.d/Bacula-fd

Bconsole           /etc/Bacula/bconsole.conf            /usr/bin/Bconsole                      N/A

bsmtp                               N/A                          /usr/lib/Bacula/bsmtp                 N/A

Directories and Files of importance

Directory / File                      Path                                              Description

Config Directory                 /etc/Bacula                          All config files reside here

Scripts                            /etc/Bacula/scripts                 All the additional scripts run by Bacula reside here.

Query File                        /etc/Bacula/query.sql              The Bacula DB Query File
Log File                           /var/Bacula/log                        The general log file that stores all the Bacula                                                                         logs. These include the console messages.

Working Directory              /var/lib/Bacula

PiD Directory                     /var/run

SubSys Directory               /var/lock/subsys

BootStrap Record                /var/Bacula/*.bsr                    BSR files (one for each Backup Job).

Default Restore Directory      /tmp/Bacula_restore                The default file restore directory for Bacula.

Bacula.sql                           /var/Bacula                            Bacula DB Dump                    

Bacula DB                         /var/lib/mysql/Bacula/ Bacula MySQL DB Path

                                                                                          Part1           Continue for Part3