• v1.2.0 8ad4c37232

    v1.2.0
    All checks were successful
    Build and Publish Package / build-and-publish (push) Successful in 5s
    Stable

    faaleoleo-dev-team released this 2026-03-24 22:29:19 +00:00 | 17 commits to master since this release

    Signed by faaleoleo-dev-team
    GPG key ID: 088E9A2BE6C99853

    Overview

    v1.2.0 delivers full BWeb Management Suite compatibility, including the Next Jobs page that previously required a live Director. A new bconsole-mock wrapper intercepts BWeb's bconsole calls and answers them via the mock REST API, with no Bacula infrastructure required. Alongside this, job history generation has been redesigned around a schedule-based model that produces strictly ascending JobId/StartTime pairs — matching real Director behaviour and fixing a class of BWeb display issues. Wire compatibility is hardened throughout. No breaking API changes.

    Highlights

    bconsole-mock wrapper — A new stdlib-only script (scripts/bconsole-mock) reads bconsole commands from stdin and returns wire-compatible text output by calling the mock REST API internally. This is the bridge that makes BWeb's Next Jobs page (action=next_job) work without a real Director. Handled commands include show schedule, show job, .api 2, .status dir scheduled, and the * prompt that BWeb's Bconsole.pm parser expects.

    Automated BWeb installerinstall-bweb-scheduled.sh deploys bconsole-mock to /opt/bacula/bin/bconsole-mock, writes credentials to /opt/bacula/etc/bconsole-mock.env, and patches bweb.conf in a single step. The existing install-bweb-mock.sh workflow is unchanged for sites that do not need the Next Jobs page.

    Schedule-based job history — Job timestamps are no longer scattered randomly across the catalog. Jobs are now created oldest-first at regular intervals going back history_days, so JobId and StartTime are always strictly correlated. This matches real Bacula Director behaviour and is a prerequisite for BWeb's scheduled jobs table. Three new config.yaml parameters control the model: history_days (default: 7), job_interval_hours (default: 24), and jitter (default: 0.1).

    Wire compatibility hardeningPOST /status/director is now routed. ?jobs=scheduled is added as a dedicated endpoint. Scheduled jobs responses use the correct schedtime and date key names. .api 2 JSON mode and .status dir scheduled key=value output match BWeb parser expectations exactly. JobIds are assigned chronologically across all clients. The simulated fleet now carries realistic mixed client OS versions and a wire-compatible uname format.

    Bug fixessync_mock_to_sqlite.py now selects recent jobs by StartTime instead of JobId, since a higher JobId no longer implies a newer job under schedule-based generation. A byte-range fix corrects HTTP response handling for range requests.

    Supported API Surface

    Category Endpoints
    Catalog /cat/Client, /cat/Job, /cat/JobTotals, /cat/JobLog, /cat/Pool, /cat/Storage
    Commands /cmd/run, /cmd/restore, /cmd/cancel, /cmd/estimate, /cmd/label, /cmd/purge, /cmd/prune
    Status /status/director (GET + POST), /status/client/, ?jobs=scheduled
    Resources /res/director, /res/filedaemon, /res/storagedaemon
    Auth /oauth/token
    Mock control /mock/health, /mock/initialize, /mock/reset
    bconsole bconsole-mock wrapper (.api 2, .status dir scheduled, show schedule, show job)

    System Requirements

    Component Minimum
    OS Debian 13, Other Platforms untested
    Python 3.8+
    Disk ~100 MB
    Memory 512 MB (1 GB recommended for 500+ clients)
    Port 9101 (configurable)

    All Python dependencies are installed automatically in a virtual environment during setup.

    Installation

    sudo ./install.sh
    sudo systemctl start bacula-mock
    bacula-mock init 100 0.25
    bacula-mock smoke-test
    

    BWeb Next Jobs (optional):

    sudo ./install-bweb-scheduled.sh
    

    Verifying the Package

    Release packages are GPG-signed. Import the public key, then verify with:

    gpg --verify BaculaMockServer-v1.2.0.tar.gz.asc BaculaMockServer-v1.2.0.tar.gz
    sha256sum -c BaculaMockServer-v1.2.0.tar.gz.sha256
    

    See the README for full verification instructions and download URLs.

    Documentation

    Known Limitations

    • This is a mock server — it does not perform actual backups or restores.
    • Self-signed TLS certificates require clients to disable certificate verification or trust the generated CA.
    • Very large client counts (1,000+) may require tuning memory allocation beyond the default 512 MB.
    • bconsole-mock implements the subset of bconsole commands used by BWeb; full bconsole emulation is out of scope.

    "Bacula" is a registered trademark of Bacula Systems SA. This software is not affiliated with or endorsed by Bacula Systems SA.

    Downloads