How to rename/clone the cosmos db colletion?

Nilesh Prajapati 21 Reputation points

Hi Team,
Below is our nosql cosmos db-

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

Nilesh P

Tech lead, Mobiquity Solutions

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

Accepted answer
  1. Sreeju Nair 12,026 Reputation points

    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
    3. I found a tool in github than can do the job. 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 21 Reputation points

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

    4 people found this answer helpful.
    0 comments No comments