How to Carefully Migrate a Collection From One Mongo Server Onto Another

Using mongodump with mongorestore

Patrick Divine
Better Programming
Published in
4 min readMar 21, 2020

--

Photo by Dino Reichmuth on Unsplash

The exercise here is to move the records of a Mongo collection from one Mongo server to another. One use case for this is to copy a collection, or part of a collection, from a production environment into a development environment.

Our Setup

--

--