1. Guides
  2. Run restore tests
  3. Restore types
  4. Databases
  5. MongoDB
Website
  • Overview
  • Quickstart
  • How RestoreTrust works
  • Requirements
  • Organizations and projects
  • Project workers
  • Test schedules
    • File checks
  • Validation gates
  • Time zones and dates
  • Manual runs
  • Notifications
  • Check results
  • Execution logs
  • Reports
  • Evidence and verification
  • Team and roles
  • API keys
  • Billing and plans

MongoDB

Create a MongoDB restore schedule for packaged mongodump directories and validate data with typed operations.

Loading documentation…

MariaDB< PreviousFile checksNext >

Powered by heyo

On this page

Available versionsPrepare the artifactConfigure the restore

A MongoDB schedule restores a packaged mongodump directory into the exact MongoDB version you select, then runs typed validation operations.

Available versions

SeriesExact versionTier
4.24.2.24Legacy
4.44.4.30Legacy
5.05.0.33Legacy
6.06.0.28Legacy
7.07.0.40Supported
8.08.0.29Supported
8.28.2.12Legacy
8.38.3.8Supported
Use the current catalog

These are the versions currently available in RestoreTrust. The console and the database-engine catalog are authoritative if the catalog changes. Prefer a Supported version for a new schedule unless your recovery target requires an exact Legacy version.

Prepare the artifact

A mongodump produces a directory, so package it in a tar or ZIP container before the worker downloads it. You can select:

  • Detect automatically, tar, or ZIP as the container
  • automatic detection, none, gzip, zstd, xz, bzip2, or lz4 as compression
  • optional ZIP password, age identity, or age passphrase decryption

MongoDB schedules do not accept None as a container and do not use a SQL file.

Package the ordinary mongodump directory, with its .bson and .metadata.json files and database folders. mongodump --archive and per-file mongodump --gzip output are not supported. To compress the backup, tar the uncompressed directory first and then compress the tar. ZIP can use its own internal compression, with the schedule's separate compression layer set to None or Detect automatically. See Supported artifact layouts.

Configure the restore

  1. 1

    Select MongoDB and a version

    Choose the exact version required for this backup.

  2. 2

    Describe the packaged dump

    Choose automatic detection or enforce the expected tar/ZIP and compression settings. Add the matching decryption secret metadata when the artifact is protected.

  3. 3

    Add validation operations

    MongoDB has no target-database field. Add one or more typed probes against a restored database and collection instead of arbitrary JavaScript.

  4. 4

    Set expected results

    Select boolean, integer, or string comparison as appropriate. Use equality/inequality or ordered comparisons supported for that type, and add duration gates where needed.

Available MongoDB operations include:

  • count documents, with an optional filter
  • estimate a document count without a filter
  • confirm at least one document exists
  • count distinct values for a field
  • read a field from one document
  • count collections or confirm a collection exists
  • read a database statistic

Filters use the structured JSON field shown in the console. System databases are not valid probe targets.

An exact count reads every matching document, so on a large collection it can take minutes. If the order of magnitude is enough, estimate the count instead; it takes no filter and reads only collection metadata. Otherwise raise the probe's time limit (300 seconds by default, at most 3,600), see Validation gates.

Choose probes that prove useful content

A restored process and an existing collection do not prove that the required records are present. Combine existence checks with stable counts, fields, or statistics that represent your recovery requirements, without exposing sensitive values.

Run a manual check after saving and review each probe result on the check page.