How to rename/clone the cosmos db colletion?

Nilesh Prajapati 21 Reputation points
2022-04-08T06:22:10.627+00:00

Hi Team,
Below is our nosql cosmos db-
191262-screenshot-2022-04-08-at-114648.png

Here,
We want to make copy/clone of collection - 'MenuItemDetailsV2', with new name i.e. 'MenuItemDetailsV2_backup'

Please suggest how we can do it.

Business use-case-
Take backup of existing collection and make clone of X collection with same name.

Looking for your expert advice,
Thank you

Regards,
Nilesh P

Tech lead, Mobiquity Solutions

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,054 questions
{count} votes

Accepted answer
  1. sreejukg 10,461 Reputation points
    2022-04-08T07:01:24.207+00:00

    You have couple of options here. Let me give you a brief about the options one by one.

    1. Use Azure Cosmos DB Data Migration Tool.
      As per the documentation states The Azure Cosmos DB Data Migration tool is an open source solution that imports data to Azure Cosmos DB from a variety of sources, including Azure Cosmos DB collections. The tool is available as a graphical interface tool or as command-line tool.
    2. Use Azure Data Factory "Copy Activity" to copy data from and to to Azure Cosmos DB. Refer https://learn.microsoft.com/en-us/azure/data-factory/connector-azure-cosmos-db?tabs=data-factory
    3. I found a tool in github than can do the job. https://github.com/Microsoft/CosmicClone. You may refer the documentation in the github about how to use the tool.
    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Gillhofer Michael 11 Reputation points
    2022-10-20T11:37:57.413+00:00

    As of end of 2022, is there still no way to rename a collection without moving all of its content?

    2 people found this answer helpful.
    0 comments No comments