1. Home
  2. Docs
  3. Backup Ninja
  4. How-To
  5. Scheduling
  6. MongoDB

MongoDB

To back up a MongoDB database, we support the following backup tool:

Backup Tool Type Definition
mongodump Logical It is a utility for creating a MongoDB backups that allow you to dump the contents of your MongoDB node into a BSON formatted dump file. BSON is a binary variant of JSON and this will not only keep the dump compact but also improves recovery time.

Full logical backup using mongodump

From Backup Ninja dashboard, go to Schedules → Add Schedule and follow the configuration wizard:

1) Details

  • Enter the name of the schedule: <strong>bkp_mongodump</strong>
  • Select a database server and the backup method to use: <strong>mongodump</strong>
Note

Only installed backup tools on the selected server will be listed.

2) Storages

Where the backup will be stored. Select Add New Storage → Add Local Storage:

  • Add a storage name: <strong>local_storage</strong>
  • Specify a local storage directory: <strong>/backups/</strong>
  • And a retention policy: <strong>Days - 7</strong>
Note

You can also store the backup on a cloud provider using the cloud storage option.

3) Settings

Specify the name pattern to use for the backup files.

%B - YYYY-MM-DD_HHmmss
%D - database name (schema)
%H - server hostname
%I - backup job number
%M - backup method used

You can use compression (Gzip by default) and encryption (AES 256-bit OFB by default). If you enable encryption, a new window with the encryption key will be shown:

Note

You will need the encryption key to restore the backup, so make sure you save the key in a secure place.

4) Schedule

Schedule when the backup will be executed:

Note

Backups will be scheduled to run based on the database servers timezone setting.

Was this article helpful to you? Yes 1 No