Try Studio 3T for Free
  1. Knowledge Base
  2. Query & CRUD Operations
  3. How to Copy a MongoDB Collection to Another Database

How to Copy a MongoDB Collection to Another Database

Studio 3T’s convenient built-in copy and paste features allow you to copy or duplicate a MongoDB collection to another database in just a few clicks.

Ready? Download the latest Studio 3T version and let’s roll.

If you’re looking to copy entire MongoDB databases across servers, here’s that article

Copy MongoDB collection

Select the source collection you want to copy and right-click it in the Connection Tree.

In our case, this is collection test.people on localhost.

Choose Copy Collection.

copy collection with highlights

Paste MongoDB collection

Select your target MongoDB database (or collection) that you want to copy your source collection to.

In our example, that is database “test” on server “ADX”.

Right-click your target and choose Paste Collection.

Paste collection with highlights

Configure copy & paste

In the Paste Collection dialog, you can choose how the copy operation should treat (existing) document _ids.

Note that this usually only relevant when you decide to copy a collection into another, existing target collection.

If you paste a collection into a target database that already contains a collection with the same name, the source collection will be inserted with the prefix “Copy_of_”.

To finish, click Paste Collection. This will copy your source collection to your target.

New set of file created

And just like that, your MongoDB collection is copied to another database and/or server.

You can always monitor your copy job on the bottom-left corner and cancel any long-running operations.

Take advantage of other handy copy/paste features in Studio 3T:

Updated on October 23, 2020

Was this article helpful?

Related Articles


  1. Hey,

    Can I add my DB that locate on AWS server?
    When I’m trying to add DB, it asks me for name and I have no idea what my data base’s name


    1. Hi David,

      Thanks for reaching out to us! If you’re able to connect to AWS with Studio 3T, the connection tree should should display your database name. If this doesn’t solve your question, please reach out to us at [email protected].


  2. Hi, this is a lovely feature thanks

    What is the equivalent from a scripted point of view? I have a migration and I would rather have all the moving of collections done with a script. One can extract and import but then the indexes get lost. Please advise.

Leave a Comment