databasepostgresqlazureserverazure-postgresql

Is it necessary to carry out a Point-in-Time Recovery for both an original Azure database server and its read-only complement?


Given that:

  1. You have an Azure subscription.
  2. Within that subscription, you have an "Azure Database for PostgreSQL flexible server" - call this Server A.
  3. Within the same subscription, you have another such database server - call this Server B - which is a read-only complement to Server A, and whose day-to-day function is to share some of the load from Server A.
  4. There are substantial financial costs to carrying out a Point-in-Time Restoration for either Server A or Server B.

Suppose that some sort of catastrophe were to occur, and we needed to carry out a Point-in-Time Restoration for the data stored within the above system.

Would it then be necessary, in order to retain all of the data, to restore both servers, or could we get away with restoring just one of them?


Solution

  • Is it necessary to carry out a Point-in-Time Recovery for both an original Azure database server and its read-only complement?

    No, it is not necessary to carry out a Point-in-Time Recovery (PITR) for both the original Azure database server and its read-only complement. The read-only replica is a replication of the primary database server, typically used for load balancing read workloads. PITR is only supported on the primary server, as it relies on transaction log backups and full backups maintained for that server. Read-only replicas cannot be restored independently using PITR. You must restore the original server and then recreate any read replicas from the newly restored server.

    If you're planning PITR due to data loss, corruption, or rollback needs, perform it on the original server. The read-only replicas are derived from it and will be invalid after PITR unless recreated.

    In the event of a catastrophe, you only need to perform a PITR on Server A (the Azure Database for PostgreSQL Flexible Server). Server B (the read-only replica) does not support independent PITR and does not maintain its own backups. After restoring Server A, you can recreate Server B as a read replica from the restored server if needed. Restoring both is unnecessary and would incur extra cost.

    For more information on PITR in Azure Database for PostgreSQL Flexible Server, refer to this article.