Bacula is a network backup suite built around three cooperating daemons — the Director, the Storage Daemon, and the File Daemon — plus a catalog database that records every job, every volume, every file. Operators new to Bacula often try to map it onto simpler tools like rsync or restic and end up confused; the architecture exists because Bacula is designed to back up dozens to thousands of hosts to centralized tape libraries or disk pools with cataloged restores. This article walks through how the three daemons talk, where the configuration lives, and the operational surface we watch on engagements that still run Bacula.
How to verify
On a typical install with all three daemons on one host (small site) you can confirm the topology with:
systemctl status bacula-dir bacula-sd bacula-fd
ss -tlnp | grep -E ':(9101|9102|9103)\b'
echo "list jobs" | bconsole | tail -n 20
echo "status storage" | bconsole
echo "status client" | bconsole
Ports 9101 (Director), 9102 (File Daemon), 9103 (Storage Daemon) should be listening. The bconsole command is the interactive admin shell; list jobs reads from the catalog, status storage and status client open live TCP sessions to the SD and FD respectively.
What’s happening
The Director (bacula-dir) is the brain. It runs schedules, decides which jobs fire, opens connections to the File Daemons (to read data from clients) and to the Storage Daemons (to write that data to volumes), and writes every event into the catalog database (PostgreSQL or MySQL/MariaDB). It does not touch backup data itself; it orchestrates.
The File Daemon (bacula-fd) lives on every client being backed up. When the Director tells it “back up /etc and /var/lib/mysql to Storage Daemon X using authentication token Y”, the FD reads files, optionally compresses and encrypts them client-side, and streams them directly to the SD. The Director is not in that data path; it only sees status updates.
The Storage Daemon (bacula-sd) writes the streams it receives onto physical media — disk pool, tape library, or virtual tape library. It manages volumes (label, append, reuse, recycle) and reports the resulting catalog records back to the Director. A single SD can write to multiple devices in parallel.
The catalog is the index that makes restores possible: every file’s path, mtime, size, MD5/SHA, and the volume + byte offset where its data lives. Lose the catalog and the volumes themselves are still readable (bls can dump them), but restores become an archaeology exercise.
The procedure
This is a minimal three-daemon install on one Ubuntu host writing to a local disk pool. Production rarely looks like this but it grounds the configuration.
-
Install all four packages: Director, SD, FD, catalog backend, and console.
apt update apt install -y bacula-director-pgsql bacula-sd bacula-fd bacula-console postgresqlThe PostgreSQL flavor is the one we recommend; MySQL works but the schema migrations have lagged behind PostgreSQL on every recent release.
-
Initialize the catalog database. The Debian/Ubuntu packages ship helper scripts:
/usr/share/bacula-director/make_bacula_tables postgres /usr/share/bacula-director/grant_bacula_privileges postgres -
The four config files —
/etc/bacula/bacula-dir.conf,bacula-sd.conf,bacula-fd.conf,bconsole.conf— share authentication via pairedPassworddirectives. The Director resource inbacula-dir.confdeclares a password; the matchingDirectorresource inbacula-sd.confandbacula-fd.confmust repeat that password so the SD/FD will accept the Director’s commands. -
Define a Pool (group of volumes), a Storage (points at the SD device), a FileSet (what to back up), a Schedule, a Client (the FD endpoint), and a Job that ties them together. The minimum Job looks like:
Job { Name = "BackupRoot" Type = Backup Client = client-fd FileSet = "RootFS" Schedule = "DailyNight" Storage = DiskPool Pool = Default Messages = Standard } -
Reload and run:
systemctl reload bacula-director echo "run job=BackupRoot yes" | bconsole echo "messages" | bconsoleThe job runs through the Director, which dials the FD, which streams to the SD, which writes a labeled volume into
/var/lib/bacula/storage/. -
Verify a restore. Without restore-testing, backups are theatre.
* restore client=client-fdPick option 5 (most recent backup), mark
/etc/hostname, restore to/tmp/restore-test/, then diff.
Operational notes
- The catalog is itself a database that needs backing up. Run
make_catalog_backup.pl(ships with Bacula) before any catalog dump job, and dump to a Pool that is itself backed up offsite — losing the catalog and the latest volumes simultaneously is the worst restore scenario we see. - Pool recycling is where retention lives. A volume in status
FullbecomesAppendagain only when its retention window expires and the catalog is pruned; surprising “out of volumes” errors usually trace back to a retention misconfiguration, not disk space. - TLS between daemons is not on by default. For anything crossing untrusted networks, enable TLS in all three configs with paired cert + CA paths; the password authentication alone is not encryption.
- Concurrent job count is set per-daemon (
Maximum Concurrent Jobsin each resource) and per-device. Hit the lowest of those limits and jobs queue silently. Watchstatus storagefor queued jobs that never start. bls,bextract, andbscanare the offline tools — read a volume without the catalog, extract files directly, or rebuild the catalog from volume headers. Know them before you need them.
Bacula’s three-daemon model rewards operators who treat the catalog as the production database it is. In the engagements we run, the Director config, the catalog backup, and a monthly scheduled restore-test live in the same configuration management repo as the rest of the platform — so when a client asks “can we restore last Tuesday’s /etc/postfix,” the answer is a runbook, not an investigation. More on how we wrap this kind of stack at /en/services/managed-operations/.