How to backup and restore Cosmos DB with Postgres and Citus?

Eric Bergqvist 0 Reputation points
2023-09-08T11:50:35.1133333+00:00

Hello,

We are using Azure Cosmos DB with Postgres using Citus. We would like to know how we can do proper backup and restore to be safe in case of a disaster for business continuity reasons. We have read https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/concepts-backup but we are worried about deletion of the cluster itself (accident or otherwise).
User's image

We are using management locks to reduce the effects of a disaster but we would like to store a cold backup in a another location. As we understand it, the WAL files are written to Azure Blob Storage but they can only be used to restore the database. We would like to export them in order to be able to restore the database in case the cluster is deleted.

Best regards,

Eric

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

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,482 Reputation points Microsoft Employee
    2023-09-08T18:08:04.9033333+00:00

    Hi @Eric Bergqvist Thanks for posting your question in the Microsoft Q&A forum.

    I Understand that you are concerned about the deletion of the cluster and want to store a cold backup in another location.

    It looks like you’re already using Azure locks which is the best and recommended way to prevent accidental deletion of Azure resources.

    There’s no built-in feature in Azure Cosmos DB for PostgreSQL that allows you to store data in your cluster and managed stored copies. However, you may consider using Postgres and/or Azure tools for manually managed copies of data. For smaller workloads you may try using pg_dump. Azure Data Factory is a more complex setup but can also be used for getting the data out of the cluster.

    I hope this information helps

    Regards

    Geetha

    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.