Cosmos database - need to configure periodic backups of replicated destination database.

victor 0 Reputation points
2023-12-04T21:50:17.58+00:00

We have a requirement where we need periodic backups of replicated destination database.

The current database is replicated to a paired Azure region for HA.

To cover our risk of an accidental, delete of substantial data or the database itself we can to failover a backup of the replicated destination database in the paired region.

to elaborate further we have say

  1. cosmos_primary_db is in North Europe and is being replicated to cosmos_primary_replicated_db in Western Europe region.
  2. Now cosmos_primary_db had an accidental delete of data then the data in cosmos_primary_replicated_db is also deleted.

We need a way we can have the deleted data available in a periodic backup of cosmos_primary_replicated_db (assuming that a backup was completed before delete) in Western Europe.

Is it possible for us to have a periodic backup schedule setup for

cosmos_primary_replicated_db in Western Europe.

So essentially the question is if we configure cosmos db to have it automatically replicated to a paired region, can we also configure the destination replicated database in the destination paired region to be backed up periodically.

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

2 answers

Sort by: Most helpful
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2023-12-05T11:09:54.8366667+00:00

    Hi victor •,

    Welcome to Microsoft Q&A forum.

    As I understood, you want to configure periodic backups of replicated destination database.

    Azure Cosmos DB automatically takes a full backup of your database every 4 hours and at any point of time, only the latest two backups are stored by default. If the default intervals aren't sufficient for your workloads, you can change the backup interval and the retention period from the Azure portal. You can change the backup configuration during or after the Azure Cosmos DB account is created. If the container or database is deleted, Azure Cosmos DB retains the existing snapshots of a given provisioned throughput container or shared throughput database for 30 days. If throughput is provisioned at the database level, the backup and restore process happens across the entire database scope.

    To guarantee low latency, the snapshot of your backup is stored in Azure Blob storage in the same region as the current write region (or one of the write regions, in case you have a multi-region write configuration). For resiliency against regional disaster, each snapshot of the backup data in Azure Blob storage is again replicated to another region through geo-redundant storage (GRS). The region to which the backup is replicated is based on your source region and the regional pair associated with the source region. To learn more, see the list of geo-redundant pairs of Azure regions article. You can't access this backup directly. Azure Cosmos DB team restores your backup when you request through a support request.

    Hope this helps. Let us know if further queries.

    Thanks

    0 comments No comments

  2. SSingh-MSFT 16,371 Reputation points Moderator
    2023-12-11T05:01:09.6866667+00:00

    Hi victor •,

    Thaks for your patience.

    Internal team has suggested to raise support case for further investigation.

    There is on demand backup.

    There is no custom schedule of backups. 

    Cross region restores are not planned soon. 

    Accidental deletes are well covered by the continuous backup at present. Continuous backup takes backup in region, you can do restore of the backup in the given region. 

    Let us know if you have further queries. Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.