Introducing the Bacula Mock Server
Full API Simulation, Zero Infrastructure

We are publishing the Bacula Mock Server — a wire-compatible simulation of the Bacula Enterprise REST API that requires no Director, no storage daemon, and no production infrastructure. The same endpoints, the same authentication flow, the same response formats — backed by realistic generated data instead of a real deployment.


The problem it solves

Anyone building against the Bacula Enterprise REST API faces the same obstacle: testing and development require a running Bacula installation. A Director, a storage daemon, at least one client — configured, licensed, and generating real job data. For a production monitoring dashboard, that means the development environment must mirror production. For a CI/CD pipeline, it means provisioning and maintaining Bacula infrastructure just to run tests. For training new administrators, it means giving students access to real backup data.

The Bacula Mock Server removes that dependency entirely.


What it is

The mock server is a Python service that implements the Bacula Enterprise REST API surface in full — every catalog endpoint, every command endpoint, every authentication path — and returns wire-compatible responses backed by generated data. You point your client at it instead of a real Director and it behaves identically.


Configurable error rates

One feature that distinguishes the mock from a healthy production Director: failure simulation. A single command sets the error rate for the entire fleet:

bacula-mock init 100 0.25

This generates 100 client profiles with a 25% job failure rate. Set it to 0 for a healthy environment. Set it to 1.0 for complete failure. The failure distribution is realistic — some clients fail consistently, others intermittently — which is useful for testing how monitoring dashboards and alerting logic handle degraded environments.


Use cases

Dashboard development. Build and test a monitoring interface against a full, realistic dataset without touching production. Mock up failure scenarios, edge cases, and large client counts without any risk.

CI/CD pipelines. The mock ships with an external Go test client covering 86 tests across 13 endpoint groups. These run in seconds and produce machine-readable output suitable for pipeline integration. No Bacula installation required to run them.

Administrator training. Students can interact with the Bacula Enterprise REST API, practise restore workflows via BVFS browsing, and explore the catalog structure without access to production data or production infrastructure.

BWeb integration. The mock integrates with BWeb Management Suite via a lighttpd reverse proxy. A separate install-bweb-mock.sh installer handles the configuration, including a bconsole-mock wrapper that enables BWeb's scheduled jobs page without a real Director.

Performance testing. The server is designed for benchmark workloads — use ab, wrk, or hey to test how your client handles high request volume and concurrent connections.


Getting started

# Install (Debian 13; see README for other distributions)
sudo ./install.sh

# Start the service
sudo systemctl start bacula-mock

# Generate a test fleet: 100 clients, 10% failure rate
bacula-mock init 100 0.10

# Verify
bacula-mock health
bacula-mock clients
bacula-mock smoke-test

The installer creates a systemd service with auto-start and log rotation. All Python dependencies are installed in an isolated virtual environment. No system packages beyond Python 3.8+ are required.

Job history depth, interval, and jitter are configurable in config.yaml — useful when you need to simulate 30 days of history rather than the default 7, or tighter scheduling intervals for high-frequency backup environments.


Verification and release integrity

Every release package is GPG-signed by the faaleoleo dev team key and accompanied by a SHA256 checksum. Verification instructions are in the README. Do not skip this step on any system that will be used in a pipeline or shared environment.


Where to find it

The Bacula Mock Server is published under the BSD 2-Clause licence at github.com. Full documentation — implementation guide, end user guide, and usage examples — is included in the repository.

The current release is v1.2.1.

Resources page: the Bacula Mock Server product page on this site has a feature summary and download links. The repository issue tracker is the right place to report bugs or request features.

This is the same software we use internally for integration testing and dashboard development. It is production-tested, actively maintained, and under the same quality pipeline as everything else we publish.


Questions about integrating the mock server into your development or testing workflow? We are available via the contact form below.

Get in touch