Clone your MongoDB database and collections

The database import utility which can be accessed from the Task manager by clicking on DB Actions → Database import allows you you to mirror your database or a specific collection to another Database server. This feature can be very useful when you need to quickly clone your production database to your development environment for further analysis.

Cloning databases and collections to another database server

From the database import tool, copy the connection string of the source database and paste it in "Remote database connection string" textbox

If you are importing the entire database, simply click on start migration to start cloning your database instance.

If you intend to move specific collections or skip some collecitons during the clone process, refer to the "Collection import action" section. If the Import action is selected, all collections listed in the textarea will be imported. If the Skip action is selected, all collections in the database except the ones listed in the textarea will be imported. The below example instructs the Database import utility to only copy the _SCHEMA and _User collections to the target database.

Clone MongoDB collection


Cloning a collection to another collection on the same database server

Fom the task manager, click on DB Actions → Ops manager → Clone a collection. Use the form provided to complete the operation. The various fields on the form are explained below

Form input fields

Clone MongoDB collection