Export multiple MongoDB collections to 1 JSON file without programming

by

Want to export multiple MongoDB collections to 1 JSON file?

Using MongoToFile, a native GUI tool, you can export multiple MongoDB collections to a single JSON file easily and fast.

  • Step by step, just a few mouse clicks.
  • Support all MongoDB deployment types: standalone, replica set, sharded cluster, and MongoDB Atlas.
  • Support Windows, Linux, macOS.

Download MongoToFile Download MongoToFile

Here’s how to.

Export multiple MongoDB collections to a single JSON file

Start MongoToFile, connect to MongoDB.

export MongoDB collection to JSON file - connect to mongodb

Click “Export Similar Collections” at task dialog.

Export multiple MongoDB collections to 1 JSON file - task window

Select “JSON” file type.

Export MongoDB collections to 1 JSON file - select type

1. Select MongoDB collections to export.

Extract multiple MongoDB collections to 1 JSON file - select collections

2. Set JSON options.

Batch dump multiple MongoDB collections to 1 JSON file - config JSON file

3. Summary.

Batch convert multiple MongoDB collections to 1 JSON file - summary

4. Export multiple MongoDB collections to one JSON file.

Export multiple MongoDB collections to 1 JSON file - convert file

After exporting, you can view output JSON file.

Bulk Export MongoDB collections to single JSON file - view JSON file

Download MongoToFile Download MongoToFile

Save/load session of exporting multiple MongoDB collections to a single JSON file

You can save/load session to run “MongoDB collections to single JSON file” conversion repeatly.

1.Save Session.

Click “Save Session” button, then enter a session file name.

Bulk Export MongoDB collections to single JSON file - save session

click “OK” button.

2.Load Session.

Click the “Open a Saved Session” in task window, select a session file.

Bulk Export MongoDB collections to single JSON file - load session

then show the wizard form, click a few “Next” to export MongoDB collections to single JSON file.

Bulk Export MongoDB collections to single JSON file - start session

Download MongoToFile Download MongoToFile

Run in command line for exporting multiple MongoDB collections to a single JSON file

You can run “MongoDB collections to single JSON file” conversion in command line.

When you save session, you can click “Save & Make Batch File”.

Bulk Export MongoDB collections to single JSON file - save session

The “Save & Make Batch File” form shows.

Bulk Export MongoDB collections to single JSON file - create batch file

Click “OK” button, you’ll create a batch file, in Windows, like this:

C:
cd "C:\Users\pansh\AppData\Local\Programs\MongoToFile"
MongoToFile task="C:\Users\pansh\Documents\test.uls" logfile="C:\Users\pansh\Documents\test.log"

You can run this batch file in command line.

Download MongoToFile Download MongoToFile

Run as scheduled task for exporting multiple MongoDB collections to a single JSON file

You can run “MongoDB collections to single JSON file” conversion automatically at specific time.

On Linux/macOS, you can use Crontab.

For macOS, How to Fix Cron Permission Issues in macOS.

On Windows, in “Save & Make Batch File” form, you can click “Create & Schedule Task” to set a scheduled task.

Bulk Export MongoDB collections to single JSON file - create batch file

And then, with scheduled task wizard, step by step.

Bulk Export MongoDB collections to single JSON file - scheduled task application

You’ll see created task listed in scheduled task list.

Bulk Export MongoDB collections to single JSON file - scheduled task list

Download

Here you can download MongoToFile, and buy MongoToFile.

Download MongoToFile Download MongoToFile