13

I have an Azure Cosmos DB and I need to delete all the resources from this subscription. Is there any way to take a backup offline from the portal?

huysmania
  • 1,054
  • 5
  • 11
Georgia Kalyva
  • 737
  • 2
  • 9
  • 23

4 Answers4

9

UPDATE : Cosmos DB now supports backup Online backup and on-demand data restore in Azure Cosmos DB


You can use Data Migration Tool suggested on Automatic online backup and restore with Azure Cosmos DB article to do the same.

There is no way to take a backup and import to Azure CosmosDB.

The recommendation is to open a support ticket (e.g. via Azure Portal) or call Azure Support to streamline the backup/restore strategy and to request Azure to restore the latest backup in case of a disaster event. In addition, you can contact the Azure CosmosDB team by sending an email to AskCosmosDB@microsoft.com.

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
2

Sajeetharan's answer is wrong.

mongodump --uri="PRIMARY_CONNECTION_STRING"

Use this command. It will create a dump in your current working DIR.

Misaz
  • 3,694
  • 2
  • 26
  • 42
Abhishek Kanthed
  • 1,744
  • 1
  • 11
  • 15
1

MS has finally introduced a backup policy feature to CosmosDB!
See https://learn.microsoft.com/en-us/azure/cosmos-db/online-backup-and-restore#modify-the-backup-interval-and-retention-period
I guess this removes the need for third party and/or custom tools to do such a basic Ops routine.

0

Automatic backup is not for free... Standard support plan ($100/mo)

I'm using free A̶z̶u̶r̶e̶ ̶C̶o̶s̶m̶o̶s̶ ̶D̶B̶ ̶D̶a̶t̶a̶ ̶M̶i̶g̶r̶a̶t̶i̶o̶n̶ ̶T̶o̶o̶l̶.

EDIT: thx @e2eDev link Azure Cosmos DB Data Migration Tool 1.8.3 on github

There is both GUI tool dtui.exe even CLI tool dt.exe

Supports many protocols and even JSON format (for both import and export).

Michal Miky Jankovský
  • 3,089
  • 1
  • 35
  • 36
  • above link is not working. instead try this https://github.com/Azure/azure-documentdb-datamigrationtool/releases/tag/1.8.3 this is archived version – e2eDev Dec 06 '22 at 07:09