MongoDB Plugin: Installation

Enterprise

Bacula Enterprise Only

This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.

This article describes how to install the Bacula Enterprise MongoDB Plugin.

The Bacula File Daemon and the MongoDB Plugin must be installed on a Linux host that can reach the MongoDB deployment.

Prerequisites

Java Requirement

Java 11 or newer must be installed and available in the system PATH.

File Daemon Plugin Directory

The Bacula Enterprise MongoDB Plugin is distributed as a standard package for every supported operating system.

After installing the package, a few aspects must be considered: The Plugin Directory directive of the File Daemon resource in /opt/bacula/etc/bacula-fd.conf has to point to where the mongodb-fd.so plugin is installed. The usual Bacula plugin directory is /opt/bacula/plugins. Thus, the configuration file bacula-fd.conf should look like in the following example:

FileDaemon {
  Name = bacula-fd
  Plugin Directory = /opt/bacula/plugins
  ...
}

File Daemon Working Directory

The plugin working directory must have enough free space for metadata, restore planning files, oplog replay payloads, and any restore mode that cannot use direct archive streaming.

MongoDB-Specific Prerequisites

  • The MongoDB Database Tools must be installed on the File Daemon host. The plugin uses mongodump and mongorestore.

    Note

    For most deployments, install MongoDB Database Tools from the same MongoDB family as the protected server version. This avoids tool/server compatibility problems during backup or restore. A straightforward approach is to deploy the Bacula File Daemon and MongoDB Plugin on one of the database hosts providing the service.

    Note

    The MongoDB Plugin requires MongoDB Database Tools on the Bacula File Daemon host, because backup and restore operations use mongodump and mongorestore. The plugin validates these commands before starting backup or restore work and fails the Bacula job with a clear error if either command is missing. The interactive shell mongosh is not part of this runtime requirement.

  • The File Daemon host must have network access to the MongoDB port or to the mongos router for sharded clusters.

  • The backup user must have sufficient MongoDB privileges for the selected mode.

  • For TLS, the File Daemon user must be able to read the CA file and optional client certificate/key file.

Instructions

Result

The installation package includes the following components:

  • JAR libraries in /opt/bacula/lib, such as bacula-mongodb-plugin-x.x.x.jar and the corresponding library JAR.

  • A plugin connection file, mongodb-fd.so, in the Bacula plugins directory, usually /opt/bacula/plugins.

  • A backend launcher, mongodb_backend, in /opt/bacula/bin.

After installation, verify that the File Daemon loaded the plugin with a status client command in Bconsole. The Plugin: line must contain mongodb.

Status client
*status client=mongodb-fd
Connecting to Client mongodb-fd at mongodb.example.com:9102

mongodb-fd Version: 18.3.0 x86_64-pc-linux-gnu
Daemon started 08-May-26 10:14. Jobs: run=2 running=0 max=100.
Plugin: bpipe(2) mongodb(1.0.0)

Go back to: MongoDB Plugin.