Use Azure Data Factory To Backup Azure Cosmos DB

Azure Cosmos DB is a fully managed globally distributed multi-model data service. Developers can leverage its capabilities of low latency, 99.99% high availability, predictable throughput, and multiple well-defined consistency models to develop applications that need faster reads and write from anywhere in the world. However, the data backup capabilities of Azure Cosmos DB are very much limited. Any accidental deletion of data from the database can be scary and can give you sleepless nights. Every Administrator needs to have a comprehensive backup plan to mitigate such scenarios.

In the article, we will back up data from Azure Cosmos DB to Blob storage using Azure Data Factory. So let’s begin.

Create Storage Account

This storage account is where we will back up Azure Cosmos DB data

  • Search Storage Accounts and click Add
  • Provide details and click Review + Create
  • Click on Containers
  • Click on +Container
  • Provide Name and click Create

Create Data Factory

This Azure data factory will be used to back up data from Azure Cosmos DB to Blob Storage.

  • Search Data factories and click on Add
  • Provide Details and Click Create
  • Click on Author and Monitor to be taken to the homepage

Create Data factory Pipeline

  • Click on Copy Data
  • Provide Name of the Task and click Next
  • Click on + Create new connections and add a Cosmos DB Linked Service as a source
  • Select Azure Cosmos DB(SQL API) and Click Continue.
  • Fill out the connection details and Click Create
  • Select Connection and Click Next
  • Select Container and Click Next
  • Click Next
  • Click Create New Connection
  • Select Azure Blob Storage and Click Continue
  • Provide Details and Click Create
  • Select Connection and Click Next
  • Select Folder Path and Click Next
  • Click Next
  • Verify Details and Click Next
  • Click Finish.

This process is very easy to develop and debug for any issues. This pipeline can be scheduled to run in a Maintenance window. A comprehensive back up strategy can help in avoiding hours to be spent in restoring data for every accidental delete.



Categories: Azure, Azure CosmosDB, Azure Data Factory

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: