MongoDB Plugin: Features
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
The Bacula Enterprise MongoDB Plugin protects MongoDB using logical backup and restore operations. It relies on the official MongoDB Database Tools for the actual dump and restore payloads, and it adds Bacula-specific orchestration, metadata, validation, streaming, and recovery-chain handling.
Feature Summary
Full logical backup and restore of selected MongoDB application databases
Database and collection include/exclude filters
Application-scoped user and custom role backup and restore
Optional
admindatabase capture for isolated disaster recoveryReplica-set Full, Incremental, and Differential recovery chains using oplog segments
Point-in-time restore for replica-set chains using
replay_toSharded-cluster logical backup and restore through
mongosSharded routing metadata capture and restore planning
Dry-run backup and restore reports
Checksum validation of artifact files before restore
Manifest and chain metadata for auditability and recovery-chain validation
TLS, SCRAM, and
MONGODB-X509connection supportBacula LIST and QUERY operations for inventory discovery.
Standalone MongoDB
For standalone MongoDB servers, the plugin creates a logical backup using
mongodump. This is suitable for many application databases where full logical
restore is sufficient.
Consistency guarantee:
Full: logical full snapshot as produced by MongoDB Database Tools
Incremental and Differential: accepted by Bacula, but stored as full-style logical artifacts because standalone servers do not provide an oplog recovery chain.
Replica Sets
A replica set in MongoDB is a group of mongod processes that maintain the exact
same dataset. It provides data redundancy, fault tolerance, and high availability,
serving as the foundational building block for production MongoDB deployments.
A standard replica set consists of multiple MongoDB nodes, typically at least three, that work together in a primary/secondary relationship.
For replica sets, connect the plugin to a writable primary. Prefer a replica set
URI or seed list (replicaSet=..., multiple hosts, directConnection=false)
so the MongoDB driver can discover the topology and route operations to the
current primary.
If you use directConnection=true or a single fixed endpoint, make sure that
endpoint is the writable primary. Connecting directly to a secondary makes the
plugin reject backup or restore operations that require primary-side guarantees
or target writes.
A Full backup captures a logical snapshot and records enough oplog metadata to seed a recovery chain. Incremental and Differential jobs capture oplog segments.
Consistency guarantee:
Full: logical snapshot plus base oplog window metadata
Incremental: oplog segment since the previous chain boundary
Differential: oplog segment since the latest Full boundary
Restore: validated chain replay, optionally stopped at a point in time with
replay_to.
The plugin validates chain continuity before replay. It checks artifact identity, parent linkage, source fingerprint, oplog boundaries, and boundary digests. This prevents common unsafe restore scenarios such as missing incrementals or replay after an oplog rollback/divergence.
Security-Aware Backup
By default, the plugin attempts to capture users and custom roles that belong to the selected application databases. This enables application restore that also recreates the database-level security model.
Use skip_security=yes when:
The backup user has only data read permissions.
User and role restore is managed manually outside Bacula.
A migration should restore data only.
The admin database is not included by default. It is protected by explicit
isolated disaster-recovery guardrails because restoring admin can affect
cluster users, roles, and administrative state.
TLS and MONGODB-X509
The plugin supports TLS for both the Java driver connection and MongoDB Database
Tools. When using MONGODB-X509, the MongoDB username must match the client
certificate subject exactly as MongoDB reports it, for example:
O=Bacula,OU=Backup,CN=bacula-mongodb-client
For X.509 authentication, set authentication_mechanism=MONGODB-X509,
authentication_database=$external, tls=yes, and
tls_certificate_key_file. Do not provide a password.
See also
Previous articles:
Next articles:
Go back to: MongoDB Plugin.