How to set up a ZRS & GRS BCP for Azure postgreSQL and how do we recover the database if the region goes down?

Gulavani, Amruta 40 Reputation points
2026-08-09T09:53:28.93+00:00

We have a subscription in Swiss North region. We wanted to setup a backup plan for our application. The application is tier 3 application, but we are planning to setup a ZRS & GRS for our application. We wanted to setup the pipeline to recover the database and the data in secondary region if the primary region goes down. We need help here.

Thanks,

Amruta.

Azure Database for PostgreSQL

Answer accepted by question author
Smaran Thoomu 35,870 Reputation points Microsoft External Staff Moderator
2026-08-12T14:33:38.58+00:00

Hi @Gulavani, Amruta

Based on our discussion, the proposed approach can be summarized as follows:

Zone-level failure

Configure Zone-Redundant High Availability (HA) on the primary PostgreSQL Flexible Server. Azure maintains a standby replica in another availability zone in the same region and can automatically fail over in the event of a zone-level failure.

Regional failure

Enable Geo-Redundant Backup on the primary server. Azure asynchronously copies the backup data and transaction logs to the paired region. If the primary region becomes unavailable, you can perform a geo-restore, which creates a new PostgreSQL Flexible Server in the paired region using the latest backup data available there. This is not an automatic failover to a running secondary server.

Therefore, the expected flow would be:

Primary PostgreSQL Server

→ Geo-redundant backup enabled

→ Backup replicated to paired region

→ Regional outage

→ Execute DR/Terraform recovery workflow

→ Geo-restore creates a new PostgreSQL server in the secondary region

→ Configure/validate networking and connectivity

→ Redirect the application to the recovered server.

The backup location itself does not need to be manually managed as a backup file. Azure handles the replication of the geo-redundant backup to the paired region.

Terraform implementation

You can maintain the normal deployment and DR recovery as separate Terraform workflows:

  • Primary deployment: Create the PostgreSQL Flexible Server with the required HA and geo-redundant backup configuration.
  • DR pipeline: Execute the geo-restore when a regional recovery is required and provide the required configuration for the restored server.

Geo-redundant backup needs to be enabled when the primary server is created; it cannot be enabled later by changing the backup redundancy setting on an already provisioned server.

Private networking

Since your current server uses private networking, the secondary region needs its own regional VNet/networking configuration. A VNet from Switzerland North cannot be reused in Switzerland West because VNets are regional. For geo-restore from a private-access server, the restored server must use a different VNet in the secondary region.

Recovery and RPO

Geo-backup replication is asynchronous. Microsoft documentation indicates that there can be up to approximately one hour of delay in the data available in the paired region, so the DR design should account for up to approximately one hour of RPO. Geo-restore recovers to the latest backup data available in the paired region; point-in-time recovery isn't currently available against the remote geo-redundant backup.

The actual recovery time depends on factors such as database size, the latest available backup, and transaction logs that need to be processed. Therefore, we recommend validating the complete recovery workflow in pre-production before relying on it for production.

Geo-restore vs. Read Replica

As discussed, these are different approaches:

  • Geo-redundant backup + geo-restore: Lower infrastructure cost, but recovery requires creating a new server from the backup.
  • Cross-region read replica: Maintains a secondary server and can be promoted during a regional failure, providing a different RPO/RTO profile but with additional infrastructure and cost.

Based on the stated 72-hour recovery requirement and cost considerations, the geo-redundant backup + geo-restore approach appears aligned with the requirement.

Recommended next step: We recommend implementing and testing the complete geo-restore workflow in the pre-production environment first, including the secondary-region networking and application connectivity, and then using the validated Terraform workflow for production DR.

References:

I hope this clarifies the expected architecture and recovery approach.


If this answers your question, please accept this answer. It may also help other customers looking for similar.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-08-09T09:53:52.97+00:00

    For Azure Database for PostgreSQL, the supported business continuity options in the provided guidance are:

    • Zone-level resilience in the same region: use availability zones or zone-redundant HA for the PostgreSQL server.
    • Region-level recovery: use geo-redundant backup so a new server can be restored in the paired region if the primary region fails.
    • Long-term backup / cross-region restore workflow with Azure Backup: use a Backup vault with Geo-redundant storage (GRS) and enable Cross Region Restore (CRR).

    A practical setup for the database portion is:

    1. For in-region resilience, deploy Azure Database for PostgreSQL with zone-level protection.
      • The guidance states to use availability zones for zone-level resilience.
    2. For region failure recovery, enable geo-redundant backup for the PostgreSQL server.
      • In a region failure, Azure can provision and recover a new server in the paired region from the last available replicated backup.
      • The service replicates backups asynchronously.
    3. If Azure Backup is being used for PostgreSQL backups, configure a Backup vault with:
      • Storage Redundancy = Geo-redundant
      • Cross Region Restore = Enable
    4. Run at least one full backup for the protected PostgreSQL database.
      • Cross-region restore requires the database to be protected by Azure Backup and to have at least one full backup completed.

    Recovery path when the primary region goes down:

    1. In Azure portal, open the Backup vault.
    2. Go to Backup Instances.
    3. Filter Azure Database for PostgreSQL servers.
    4. Set Instance Region to Secondary Region.
    5. Select the required backup instance.
    6. Select Restore to secondary region.
    7. Choose the required recovery point and restore parameters.
    8. Monitor progress in Backup Jobs, filtering for PostgreSQL and Secondary Region.

    Important constraints and expectations:

    • Cross Region Restore is supported only for a Backup vault that uses Geo-redundant storage.
    • CRR with Cross Subscription Restore is not supported.
    • After CRR is enabled, it can take up to 48 hours for backup items to appear in the secondary region.
    • After backup completes in the primary region, the recovery point can take up to 12 hours to replicate to the secondary region.
    • The documented secondary-region RPO is currently 36 hours for this Azure Backup CRR flow.
    • Once protection starts on a GRS vault with CRR enabled, the vault redundancy can't be changed to ZRS or LRS.

    For accidental data changes or logical errors, the documented recovery method is point-in-time restore (PITR). That creates a new PostgreSQL server at a chosen restore time. For a regional failure, restoring a geo-redundant backup also creates a new server in the paired region.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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