Adiom | Documentation
HomeContactDownload
  • Adiom
  • Getting Started
    • Quickstart
      • From Cosmos DB to MongoDB
      • From Cosmos DB to /dev/null
      • From on-premise MongoDB to Cosmos DB
      • From DynamoDB to Cosmos DB NoSQL
    • What is supported
  • Data Migration
    • Step By Step
  • Basics
    • Features
    • How it works
      • Sync
      • Glossary
    • Limitations
    • FAQs
  • Implementation Details
    • Architecture
    • Verification
    • Resumability
Powered by GitBook
On this page
  • Step 1: Download dsync
  • Step 2: Prepare the destination MongoDB instance
  • Step 3: Start dsync
  • Step 4: Check the data
  1. Getting Started
  2. Quickstart

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.

PreviousQuickstartNextFrom Cosmos DB to /dev/null

Last updated 5 months ago

Dsync is currently in beta and is undergoing active development and testing.

Step 1: Download dsync

Download the latest release from the page. Note that on Mac devices you may need to configure a security exception to execute the binary by following .

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

If you already have the desired destination MongoDB instance up and running, you can skip this step.

  1. Install

  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

# You can use our publicly accessible (read-only) Cosmos DB instance
export COSMOS_DEMO=$(echo bW9uZ29kYjovL2Nvc21vc2RiLWRlbW8taW5zdGFuY2U6SkhiRWpRb2JkWm03YWJEcFp2UzZrWHpBMDRXNTBJd2V4QmlQYnVJWFQ2TElmNkhsV2V4YWphQzhkd042REJ2YVh6ajBnclFrdkwzY0FDRGJONjdxZWc9PUBjb3Ntb3NkYi1kZW1vLWluc3RhbmNlLm1vbmdvLmNvc21vcy5henVyZS5jb206MTAyNTUvP3NzbD10cnVlJnJlcGxpY2FTZXQ9Z2xvYmFsZGImcmV0cnl3cml0ZXM9ZmFsc2UmbWF4SWRsZVRpbWVNUz0xMjAwMDAmYXBwTmFtZT1AY29zbW9zZGItZGVtby1pbnN0YW5jZUA= | base64 --decode)

# Feel free to use your own MongoDB connection string
export MDB_DEST='mongodb://localhost:27017' 

./dsync --progress --logfile dsync.log $COSMOS_DEMO $MDB_DEST

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

mongosh $MDB_DEST

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

GitHub Releases
these steps
MongoDB