Knowledge base · Studio 3T Desktop IDE

How to Copy MongoDB Databases Across Servers

By Paul Rebar · Updated

Need a fast way to copy MongoDB databases across connections? Studio 3T has you covered.

Studio 3T’s built-in copy-paste feature allows you to transfer a MongoDB database from one server to another with ease.

Haven’t downloaded Studio 3T yet? Get the latest version here, and let’s get started.

Just need to copy a collection to another database? Here’s how.

Just need to copy a collection to another database? Here’s how.

Open Target Connection

In this example we’ve already opened the source connection we would like to copy from: Connection 1. We now need to open the target connection. To start, open the Connection Manager in the upper right corner of the app and select or import the target connection. In this case it’s Connection 2.

open intended connection

Copy MongoDB Database

Next, right-click the source database you would like to copy from its source connection in the Connection Tree and select Copy All Collections/Views/Buckets.

In this case, it’s the database Pubs within Connection 1.

copy database from original connection

You can also simply press Ctrl-C.

Transfer MongoDB Database

Right-click your target connection in the Connection Tree and select Add Database…

In the pop-up window type the name of the source database you copied from the source connection and press OK.

create empty database in intended connection

It’s important to note that both connections have to be open while copy-pasting databases. This is because databases can’t be copied directly – their content has to be transferred from one to another.

Right-click the empty duplicate database in the target connection and select Paste Collections/Views/Buckets.

You can also press Ctrl-V.

The Operations Window at the bottom left corner of the app will display the progress of the copy job and indicate when it’s finished.

refer to the Operations Window

(Optional) Drop Source MongoDB Database

Finally, if you’d like to remove the source database from the source connection simply right click the database and select Drop Database. You can also press the Delete key.

drop original database

And that’s all there is to it!


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

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes, including personalized advertising (“performance”), to provide you with additional functions (“functional”), and to show content from social media platforms, such as embedded videos (“social media”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in section 9 of our Privacy Policy.

Manage consent preferences