How to migrate all collections in one db in Azure Cosmos DB(Mongo API) to another db in Azure Cosmos DB(Mongo API)?

Anoop Chandra Manduri 1 Reputation point
2022-05-05T14:18:42.857+00:00

How to migrate all the collections in a db in Azure Cosmos DB API for Mongo to another db in Azure Cosmos DB API for Mongo? I have tried using Azure data factory but for that we need to create all the collections in target destination and then map each collection.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,534 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,127 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 17,791 Reputation points Microsoft Employee
    2022-05-06T16:35:37.77+00:00

    Hi @Anoop Chandra Manduri Thank you for posting your question on Microsoft Q&A and for using Azure services.

    My understanding is that you are trying to migrate all collections in one DB in Azure Cosmos DB (MongoDB API) to another db. in Azure Cosmos DB (Mongo API). Please let me know if my understanding is not correct.
    To achieve that Azure Data Factory is one of the options and it is also an Azure Tool.

    Cosmos DB Migration options | Microsoft Learn

    Another approach will be the native mongo export and mongo import tools, as per the below reference.
    Migrate MongoDB offline to Azure Cosmos DB API for MongoDB, using MongoDB native tools | Microsoft Learn

    Besides the native mongo export and mongo import, and the Azure Data Factory approach, you can try Azure Database Migration Service:
    Tutorial: Migrate MongoDB online to Azure Cosmos DB API for MongoDB - Azure Database Migration Service | Microsoft Learn

    Please let us know if that helps.

    Regards,
    Oury