Bacula 1: the open source backup software
4.4 (25 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
198 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Bacula 1: the open source backup software to your Wishlist.

Add to Wishlist

Bacula 1: the open source backup software

Learn how to build a 100% free open source reliable backup system with Bacula Community Software
4.4 (25 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
198 students enrolled
Last updated 3/2017
Current price: $15 Original price: $45 Discount: 67% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 7.5 hours on-demand video
  • 45 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Make the student ready to fully plan, install, configure and operate a Bacula backup system
  • Understand the most used backup strategies
  • Be able to configure the backup for several specific applications (databases, virtual machines etc.)
View Curriculum
  • 2 virtual or physical Linux machines for Bacula Director and Client (at least one Debian 7.6 recommended) with 10 Gb free space on disk
  • 1 virtual or physical Windows Machine (server recommended) with 10 Gb free space on disk

The course presents the theory and practice of backups, covering installation, recovery, backup specific tools, disaster recovery and many other important aspects of safe and reliable backups. Real situations recording and retrieval data will be simulated.

The course is very practical: 10% theory / 90% hands-on, and all the commands are availale on the training documentation.

Some topics:

* Backup Theory

* Backup Policies

* Types, myths, topologies and backup strategies (GFS).

* Bacula Key Features and Architeture

* Bacula Server Installation and Configuration on Linux

* Installing and Configuring the Bacula Client (Linux and Windows)

* Data Compression

* Configuration and Operation of: disk storages, magnetic tape drives and autochangers

* Bacula Commands

* Full and partial data restore

* Graphical Interfaces

* Bacula Server disasters recovery

* Run and After Backup scripts

* Specific applications backup: virtual machines, databases, mail servers etc.

* Volumes Copy and Migration

* Files Deduplication

* Exercises

Everyone who works with backup or need corporate data protection should do this training in order to know more about the inner workings of this wonderful open source backup tool. It's also great for IT university students and teachers, since it allows it's code studying and modification.

Who is the target audience?
  • System Administrators
  • IT Technicians
  • IT Managers
Students Who Viewed This Course Also Viewed
Curriculum For This Course
63 Lectures
Theoretical Introduction
7 Lectures 58:05

And at the first day God made.... Backup! =)

Fetch the written course complimentary material - my Bacula ebook from 

My website:

Bacula full Manual:

Be my friend at Facebook:

Remark: If you need in-company Bacula training or implementation worldwide send a email to

Preview 10:46

Why having a backup software is important and will still be for a long time.

Preview 05:56

Backup concepts for everyone. Notice that my english is getting better along the next lessons!

Preview 13:54

Can you distinguish differential and incremental backups? I bet you wont forget. =)

Preview 05:12

General recommendations to not have your blood sucked. Muahhhhh

Backup Best Practices

A worldwide champion strategy to waste less backup storage for maximum backup data retention!

Preview 09:42

It was good for you? For me it was great! Buy my course and be passionated to Bacula as I am!

The Bacula

Theoretical Section
5 questions
Installing Bacula
2 Lectures 33:06

*These days it is more advisible to start installing from source code (Section 7), and take advantage of latest Bacula features. Complementar guide:

Just for the records I'm using a 7.6 Debian. You can make the same installation on Red Rat based systems using yum. The package names are basically the same.

If you still don't have a virtual machine you can download a VBox one from the complementar material.

Bacula Installation (packages)

The first time we never forget. =)

Doing the first backup and restore

3 questions
Bacula Configuration Overview
6 Lectures 01:14:29

This is the main Bacula configuration file. It manages most of your backup system behavior. Just pay attention to its structure and the most important features.

baucula-dir.conf: Director, Job and Job Defs

baucula-dir.conf: FileSet, Schedule, Client, Storage

baucula-dir.conf: Catalog, Messages, Pool, APPLY CHANGES

Examples of how to work with disk backups.

WARNING! For different Virtual Disk Autochangers devices you must use different Media Types for every different Archive Devices (mount points).

bacula-sd.conf: DiskChanger Configuration (Multiple Disks)


The Bacula bconsole and BAT (GUI) desktop consoles can be installed on Bacula Director, but it's much more elegant and secure to have them at your administrator workstation (Linux or Windows), so you don't have to SSH or remote terminal to your server.

Consoles: bconsole.conf & bat.conf
Installing Linux Clients
3 Lectures 20:16

Backup Job Configuration and Running

Restore Job Running
Installing Windows Clients
4 Lectures 31:33

Backup Job Configuration and Running

Restore Job Running

It's important to recover Windows disasters purposes if you don't do another types of OS backup (e. g. virtual machine full image backup).

Systemstate Backup
Director Core Configurations
8 Lectures 01:05:23

"The tape said it can fit 400 Gb, but it hardly holds 300 Gb! HP is stealing for me." - Silly boy.

Preview 07:01

This is the real deal. Remember that Volume Retention only starts to run if volume is used or full.

Volume Lifecycle

Daily, Weekly and Monthly pools examples. But if you are smart you can make any strategy you want with my punk rock lessons.

1. Some companies also uses Yearly backups if they need to keep backup for years (one per year).

2. And don't forget! Don't mix volumes from different storages on the same pool!

Volume Lifecycle: Pools (GFS)

Volume Lifecycle: Schedule (GFS)

This option can be nasty: the vampire may be too hungry for blood!

Brute Volume Recycling (Purge Oldest Volume)

File Retention: retention of file indexes on Bacula database. Without that information you can't restore just a few files from a whole backup job.

Job Retention: retention of job index on Bacula database. Without that, the only way to restore a job is rebuilding its indexes on Bacula database using the bscan command, what can take some time and be painful.

File and Job Retention

Are you a forever alone guy? Bacula will send you emails every night! =)

Bacula Mail Sending

1. Edit postfix configuration file:

vi /etc/postfix/

2. Remove the following lines:

smtp_sasl_auth_enable = yes


relayhost =

3. Add the following lines:

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

smtp_sasl_security_options = noanonymous

relayhost = []:587


4. Save and exit.

5. Create and edit a new file:

vi /etc/postfix/sasl_passwd

6. Add this line, replacing the mail address and password with your mail credential:


7. Run the commands:

postmap /etc/postfix/sasl_passwd

postfix reload

8. Run a job and wait for the email. You can check mail sending error messages at: /var/log/mail.log

Authenticated Mail Sending
Bacula 7.x Compilation Install / Upgrade
5 Lectures 14:07

*In my website there are always updated steps for Bacula source code deploy than bellow:


Direct link to Bacula Source Forge project files:

And/or just use the commands:

cd /usr/src


tar -xzvf bacula-7.0.5.tar.gz

cd ./bacula-7.0.5

Source Code Download


apt-get install build-essential pkg-config libmysql++-dev libssl-dev libreadline6-dev


./configure --with-mysql --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-working-dir=/var/lib/bacula

Code Configuration

apt-get remove bacula-director-mysql bacula-sd-mysql bacula-fd bacula-console

Uninstall Bacula 5.2.6 Packages

1. Just do a minor ajust at the Makefile (only for 32 bits Debian):

vi /usr/src/bacula-7.0.5/src/cats/Makefile

2. Change the following line value from nothing (only for 32 bits Debian):



MYSQL_LIBS = /usr/lib/i386-linux-gnu/libmysqlclient.a

3. Save and exit.

4. Procede with compilation and installation (the make -j8 speeds up the compilation since it may use up to 8 processors in parallel processing). The make install-autostart install the scripts to automatic start Bacula daemons at boot time:

make -j8 && make install && make install-autostart

5. Restart all Bacula daemons:

/etc/init.d/bacula-fd restart

/etc/init.d/bacula-sd restart

/etc/init.d/bacula-dir restart

6. Finish with a little permission fix:

chown -R bacula /var/lib/bacula/

7. Done! Rock with your new 7.0.x Bacula.

make -j8 && make install-autostart
Bacula Service Disaster Recovery
3 Lectures 19:41

1. Disable the Bacula Backup Catalog Job RunAfter script, so you can always have a dump of your database handy.

2. Run a Bacula Backup Catalog Job.

3. You can simulate a disaster deleting your bacula database at the mysql (or pgsql) console:

mysql -u root -p(password)

drop database bacula;

4. To restore your dump, go to your database dump directory:

cd /var/lib/bacula

5. And then mysql console (e. g.):

mysql -u root -p(password)

create database bacula;

use bacula;

\. bacula.sql

6. Your database should be restored.

Restore Bacula Catalog from a dump

1. You can simulate a disaster using the delete command on bconsole to delete some volumes.

2. bscan example (disk):

bscan -s -m -c /etc/bacula/bacula-sd.conf -v -V "daily-0|daily-1" /backup -u root -P (db_password)

3. bscan example (tape):

bscan -s -m -c /etc/bacula/bacula-sd.conf -v -V daily-0 /dev/nst0 -u root -P (db_password)

bscan: restore volume information to catalog

1. bls to list contents from a volume:

bls /backup/daily-1

2. bextract restoring everything from a volume to /tmp:

bextract -c /etc/bacula/bacula-sd.conf -V daily-0 /backup /tmp

3. Creating a specific list of files to restore (e. g.: Bacula Director essential files):

vi /tmp/list




4. bextract to restore only listed files on /tmp/list:

bextract -i /tmp/list -c /etc/bacula/bacula-sd.conf -V daily-1 /backup /tmp

bls and bextract: restore data directly from volumes
Bacula Core Commands
8 Lectures 52:35

Status is one of the most important Bacula commands. You can use to gather information about running or terminated backups where director, storage ou client are involved.

You MUST also use status everytime you configure a new Bacula client or storage, in order to test the connection between director and the new daemon (network, password etc.). If everything is OK you should receive the client or storage name, version and the information about the jobs run.

cancel, delete

disable, enable, estimate

list, llist

label, label barcodes


reload, status

show, update

shell redirection, @output, @input
Amazon S3 Off-site Mounted Backup (not recommended)
6 Lectures 17:50


This is not the fastest way to do remote backups because every mounting protocol have limitations. It's best to rent a EC2 Amazon machine (e.g.) and install a bacula-sd there to off-site backups.

Always try to use the newer versions of the softwares on this chapter.



1. Remove same software packages, since we are compiling them:

yum remove fuse fuse-s3fs

2. Instalall dependencies:

yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap


1. Remove same software packages, since we are compiling them:

sudo apt-get remove fuse

2. Install dependencies:

sudo apt-get install build-essential libcurl4-openssl-dev libxml2-dev mime-support




1. Download, extract, configure and make:

cd /usr/src/


tar xzf fuse-2.9.3.tar.gz

cd fuse-2.9.3

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

./configure --prefix=/usr/local

make && make install

vim /etc/

2. Add those lines:


3. Load module:


modprobe fuse

Build Fuse

1. Download, extract, configure and make (PLEASE USE THE MOST RECENT VERSION AVAILABLE FOR S3FS):

cd /usr/src/


tar xzf s3fs-1.77.tar.gz

cd s3fs-1.77

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

./configure --prefix=/usr/local

make && make install

Build s3fs


chmod 600 ~/.passwd-s3fs

Setting S3 Credentials

1. bacula-sd.conf sample:

Device {
Name = S3
Media Type = File
Archive Device = /mnt/bucket
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;

2. bacula-dir.conf sample:

Storage {
Name = StorageAmazon
# Do not use "localhost" here
Address = # N.B. Use a fully qualified name here
SDPort = 9103
Password = storage_password
Device = S3
Media Type = File


Bacula Storage Configuration

1. Create paths:

mkdir /tmp/cache

mkdir /mnt/bucket

chmod 777 /tmp/cache /mnt/bucket

2. Mounting command:

s3fs -o url= baculaheitor -o use_cache=/tmp/cache /mnt/s3fs

Where baculaheitor is the bucket name; URL is the address of your bucket => can be fetch from AWS Console properties.

3. It's very good idea to test and debug it adding the -d -f options to the mounting command, at the first time.

4. To unmount:

fusermount -u /mnt/s3fs

Mounting s3fs bucket
5 More Sections
About the Instructor
Heitor Medrado De Faria
4.3 Average rating
429 Reviews
1,484 Students
10 Courses
Bacula Backup Software Book Author and Teacher

"Bacula: Open Source Backup Tool" and "Open Licenses & Fundamental Rights" books author (both in portuguese). Bacula Training instructor at Udemy. Law Graduated. IT Service Manager and Project Management extension degrees. Works on a brazilian governmental company called SERPRO and for Neocode Software (Canada). Bacula brazilian community founder. Has plenty of experience as a server / backup systems administrator (Windows, Linux, Netware, directory services) and as IT / Project manager. ITIL-F, TOEIC (Golden Certificate) and LPIC-III certificated professional.