From Cosmos DB to MongoDB

Follow these simple instructions to get dsync up and running and perform a migration from our Cosmos DB demo instance to your MongoDB destination.

Step 1: Download dsync

Working on a large-scale production environment? Use our horizontally scalable Enterprise offering.

Use Docker (markadiom/dsync) or download the latest release from the GitHub Releases page. Note that on Mac devices you may need to configure a security exception to execute the binary by following these steps.

Alternatively, you can build dsync from the source code.

git clone https://github.com/adiom-data/dsync.git
cd dsync
go build

Step 2: Prepare the destination MongoDB instance

  1. Install MongoDB

  2. Start a local MongoDB instance:

mkdir ~/temp
cd ~/temp
mkdir data_d
mongod --dbpath data_d --logpath mongod_d.log --fork --port 27017

Step 3: Start dsync

Now Dsync should be running! Feel free to interrupt the sync process (via Ctrl+C) it once the initial sync is done. The demo database has a few million records and the resources are shared - allow 5-10 minutes for the process to complete.


Step 4: Check the data

Congratulations! You should be able to access the 'odc' database and see the collections in it that were migrated from the Cosmos DB.

Last updated