Restore Parameters
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
Note
Restore parameters are not Fileset backup parameters. They are entered during a
Bacula restore session from the Plugin Options prompt, or through a Bacula
GUI that exposes plugin restore options.
Restore parameters are entered from the Bacula restore Plugin Options prompt
or through a Bacula GUI that exposes plugin restore options.
Option |
Required |
Default |
Values |
Example |
Description |
|---|---|---|---|---|---|
|
No |
|
|
|
Behavior when target collections already exist. |
|
No |
All collections |
Collection name |
|
Restore only matching collection names across selected databases. |
|
No |
|
|
Restore a dumped database under a different target database name. |
|
|
No |
Chain end |
|
|
Stop oplog replay at a selected point in a replica-set recovery chain. |
|
No |
|
|
|
Enable isolated disaster-recovery guardrails. |
|
No |
|
|
|
Explicitly replay dumped |
|
No |
|
|
|
Skip restoring application users and custom roles. |
|
No |
|
|
|
Validate restore plan without changing the target. |
|
No |
|
|
|
Dry-run report format. |
Restore Conflict Strategy
conflict_strategy controls how the plugin handles MongoDB objects that
already exist in the restore target. It is the MongoDB Plugin overwrite policy.
It is not the same as the generic Bacula Replace option shown by Bconsole.
For normal standalone and replica-set application restores, conflict handling is collection-based:
fail: before runningmongorestore, the plugin checks whether any collection selected for restore already exists in the target database. If a matching target collection exists, restore is rejected before data is written. This is the safest default.drop: the plugin runsmongorestorewith--drop. For each restored collection, MongoDB drops the matching target collection first and then recreates it from the backup. All documents, indexes, and collection options inside that restored target collection are replaced by the backup content. Collections that are not part of the restore scope are not dropped. The plugin does not use--dropfor automatedadmindatabase replay.skip: the plugin removes already-existing target collections from the restore plan and restores only selected collections that do not exist in the target. Existing collections are kept exactly as they are. This is a collection-level decision, not a document-level merge.
The plugin does not compare or merge individual documents inside a collection. If a collection is restored, its content comes from the backup. If a collection is skipped, all existing documents in that target collection remain untouched.
For sharded restore artifacts, conflict_strategy=drop is broader. Before
recreating sharded routing metadata, the plugin drops the target database named
in the sharded restore plan, then prepares the sharded collections and runs
mongorestore through mongos. Use this only when the target database can
be replaced.
Examples:
Scenario |
Target state before restore |
Result |
|---|---|---|
|
|
Restore fails before writing data. No MongoDB collection is changed. |
|
|
|
|
|
|
|
Target sharded database |
The target |
Bacula Replace Option
Bconsole also shows the generic Bacula restore Replace option, with values
such as Never, Always, Ifnewer, and Ifolder. That option is a
filesystem restore policy used by Bacula for ordinary file restores.
For MongoDB live plugin restore with Where=/, the MongoDB Plugin does not
currently use the Bacula Replace value to decide what happens inside
MongoDB. The MongoDB target overwrite behavior is controlled by plugin restore
options, mainly conflict_strategy.
For example, if Bconsole displays Replace: Always but the plugin restore
options keep conflict_strategy=fail, an existing target collection still
causes the MongoDB restore to fail. Conversely, conflict_strategy=drop can
replace selected MongoDB collections even though the Bacula Replace option
is only a generic restore setting.
When using Where=/local/fd/path for file-based artifact restore, the restore
is not applied to MongoDB. The selected Bacula files are reconstructed under the
chosen File Daemon path for inspection or manual use.
Isolated DR Parameters
Use isolated_dr=yes only for a dedicated recovery target. This allows
artifacts containing admin to be considered for restore. For standalone and
replica-set targets, recover_admin=yes explicitly replays the dumped
admin database. For sharded targets, automated admin replay is blocked;
manual cluster security recovery remains required.
Supported Restore Use Cases
Use restore parameters according to the recovery goal:
Standard full restore to an empty target: keep defaults (
conflict_strategy=fail) and restore all dumped databases/collections.Overwrite existing target data: set
conflict_strategy=dropso existing collections are dropped before replay.Merge into a partially populated target: set
conflict_strategy=skipto preserve existing collections and restore only missing ones.Restore only selected application objects: use
collectionto limit restore scope to matching collection names.Restore into alternate database names: use one or more
map_dbmappings (source=target) to avoid overwriting original names.Point-in-time restore on replica-set incremental chains: set
replay_to=seconds[:ordinal]to stop oplog replay at a controlled boundary.Isolated disaster recovery including admin payload: set
isolated_dr=yesand addrecover_admin=yesonly when the target architecture supports automated admin replay.Schema and plan validation only: set
dry_run=yes(optionallyreport_format=jsonfor automation pipelines).
Operational rules:
report_formatis evaluated only withdry_run=yes.recover_admin=yesrequiresisolated_dr=yesand an artifact set that includesadmin.On sharded targets, keep
isolated_dr=yesfor admin-containing artifacts, but expect manual admin/security recovery.collectionfilters are applied per selected database in the restore plan.
Replay_To Format Details
replay_to uses the same format as MongoDB oplog limits:
Format:
seconds[:ordinal]seconds: Unix epoch time in UTC seconds (for example1778245150).ordinal: MongoDB oplog increment within that same second (theicomponent ofTimestamp(t, i)).
Accepted values:
secondsmust be a non-negative integer.ordinalis optional; when omitted, it defaults to0.ordinalmust also be a non-negative integer.Invalid formats (extra separators, non-numeric values, negatives) are rejected before restore starts.
Meaning:
1778245150means1778245150:0.1778245150:3means replay until the oplog positiont=1778245150, i=3.Use
:ordinalwhen multiple oplog entries share the same second and you need a deterministic cut point.
Planner behavior:
If
replay_tois not set, restore automatically replays to the end of the selected chain.If
replay_tois outside the selected Full+Incremental chain boundaries, restore is rejected.replay_tois relevant only when oplog replay is used (replica-set incremental recovery path).
Examples:
replay_to=1778245150
replay_to=1778245150:3
General Examples
conflict_strategy=drop
conflict_strategy=skip
collection="widgets,events"
map_db="appdb=appdb_restored,logs=logs_recovered"
replay_to=1778245150:3
isolated_dr=yes
recover_admin=yes
dry_run=yes
report_format=json
conflict_strategy=drop
map_db="appdb=appdb_stage"
collection="widgets"
skip_security=yes
See also
Previous articles:
Next articles:
Go back to: Plugin Configuration.