0% found this document useful (0 votes)
121 views8 pages

Migrate MongoDB To CosmosDB

The document discusses migrating a MongoDB database to Azure Cosmos DB's API for MongoDB using Azure Database Migration Service. The key steps are to create a migration project in ADBMS, specify the source as MongoDB and target as Cosmos DB, map databases and collections between source and target, and run the migration to transfer data from MongoDB to Cosmos DB.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views8 pages

Migrate MongoDB To CosmosDB

The document discusses migrating a MongoDB database to Azure Cosmos DB's API for MongoDB using Azure Database Migration Service. The key steps are to create a migration project in ADBMS, specify the source as MongoDB and target as Cosmos DB, map databases and collections between source and target, and run the migration to transfer data from MongoDB to Cosmos DB.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Migrate MongoDB database to Cosmos DB

You can use Azure Database Migration Service to perform an offline (one-time) migration of databases
from an on-premises or cloud instance of MongoDB to Azure Cosmos DB's API for MongoDB.

Mongodb  Cosmos db

 Create an instance of Azure Database Migration Service

 Create a new Migration Project in the Azure Database Migration Service

 Provide a name for the new migration project and select the source server type as mongodb and
target server type as Cosmos db (mongodb API). And select migration type as offline data migration
and click Create and run activity
 On the next pane enter the source server details and click Save
 On the next pane enter the migration target details. In this case select Cosmos DB target as Mode
and choose your subscription and then select the cosmos DB from the dropdown and click Save.

 On the Map to target databases screen, map the source and the target database for
migration. If the target database contains the same database name as the source database,
Azure Database Migration Service selects the target database by default. If the string Create
appears next to the database name, it indicates that Azure Database Migration Service didn't
find the target database, and the service will create the database for you.
 In the next step choose the Collection you want to migrate and set the throughput and shard key
value. Leave both as blank for default values. Click Save.
 On the next step you can see the migration summary. Give an activity name and Click Run migration
to start the migration process.

 You can monitor the activity of the migration in the next tab.
 Click refresh button to see the updated status. Wait till the status shows complete.

 Use MongoDB compass or studio 3T to connect to cosmos DB and check the data

You might also like