From on-premise MongoDB to Cosmos DB
Follow these simple instructions to get dsync up and running and perform a migration from your on-premise MongoDB to an Azure Cosmos DB destination.
Last updated
Follow these simple instructions to get dsync up and running and perform a migration from your on-premise MongoDB to an Azure Cosmos DB destination.
Last updated
Dsync is currently in beta and is undergoing active development and testing.
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.
If you already have the desired source MongoDB instance up and running, you can skip this step.
Install MongoDB
Start a local MongoDB instance
Load sample data
If you already have the desired source Cosmos DB instance up and running, you can skip this step.
Follow official Azure documentation to set up a Cosmos DB instance. For example, these are the instructions for setting up a Cosmos DB vCore for MongoDB instance using Azure Portal: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/quickstart-portal
Make sure to note the Cosmos DB cluster MongoDB connection string: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/quickstart-portal#get-cluster-credentials
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.
Congratulations! You should be able to access the 'sample_mflix' database and see the collections in it that were migrated from the local MongoDB instance.