Tutorial: Configure and run Cross Region Restore for Azure database for PostgreSQL by using Azure Backup

This tutorial describes how you can enable and run Cross Region Restore to restore SQL databases hosted on Azure VMs in a secondary region.

The Cross Region Restore option allows you to restore data in a secondary Azure paired region even when no outage occurs in the primary region; thus, enabling you to perform drills to assess regional resiliency. 

Note

  • Currently, Geo-redundant Storage (GRS) vault with Cross Region Restore enabled can't be changed to Zone-redundant Storage (ZRS) or Locally-redundant Storage (LRS) after the protection starts for the first time. 
  • Secondary region Recovery Point Objective (RPO) is currently 36 hours. This is because the RPO in the primary region is 24 hours and can take up to 12 hours to replicate the backup data from the primary to the secondary region.

Considerations

Before you begin Cross Region Restore for PostgreSQL server, see the following information:

  • Cross Region Restore is supported only for a Backup vault that uses Storage Redundancy = Geo-redundant.
  • PostgreSQL databases hosted on Azure VMs are supported. You can restore databases or their files. 
  • Review the support matrix for a list of supported managed types and regions.
  • Cross Region Restore option incurs additional charges. Learn more about pricing.
  • Once you enable Cross Region Restore, it might take up to 48 hours for the backup items to be available in secondary regions.
  • Review the permissions required to use Cross Region Restore. 

A vault created with GRS redundancy includes the option to configure the Cross Region Restore feature. Every GRS vault has a banner that links to the documentation. 

Enable Cross Region Restore on a Backup vault

The Cross Region Restore option allows you to restore data in a secondary Azure paired region.

To configure Cross Region Restore for the backup vault, follow these steps: 

  1. Sign in to Azure portal.

  2. Create a new Backup vault or choose an existing Backup vault.

  3. Enable Cross Region Restore:

    1. Select Properties (under Manage). 
    2. Under Vault Settings, select Update for Cross Region Restore.
    3. Under Cross Region Restore, select Enable.

    Screenshot showing the selection of update for cross region restore.

    Screenshot shows the Enable cross region restore option.

View backup instances in secondary region

If CRR is enabled, you can view the backup instances in the secondary region.

Follow these steps:

  1. From the Azure portal, go to your Backup vault.

  2. Select Backup instances under Manage.

  3. Select Instance Region == Secondary Region on the filters.

    Screenshot showing the secondary region filter.

Restore the database to the secondary region

To restore the database to the secondary region, follow these steps:

  1. Go to the Backup vault’s Overview pane, and then configure a backup for PostgreSQL database.

    Note

    Once the backup is complete in the primary region, it can take up to 12 hours for the recovery point in the primary region to get replicated to the secondary region.

  2. To check the availability of recovery point in the secondary region, go to the Backup center > Backup Instances.

  3. Filter to Azure Database for PostgreSQL servers, then filter Instance region as Secondary Region, and then select the required Backup Instance. Screenshot showing how to view jobs in secondary region.

    The recovery points available in the secondary region are now listed.

  4. Select Restore to secondary region.

    You can also trigger restores from the respective backup instance.

  5. Select Restore to secondary region to review the target region selected, and then select the appropriate recovery point and restore parameters.

  6. Once the restore starts, you can monitor the completion of the restore operation under Backup Jobs of the Backup vault by filtering Jobs workload type to Azure Database for PostgreSQL servers and Instance Region to Secondary Region.

Next steps

For more information about backup and restore with Cross Region Restore, see: