Muokkaa

Jaa


Back up Azure Database for PostgreSQL Flexible server with long-term retention (preview)

This article describes how to back up Azure Database for PostgreSQL Flexible Server.

Prerequisites

Before you configure backup for Azure Database for PostgreSQL Flexible server:

Configure backup

To configure backup on the Azure Database for PostgreSQL Flexible Server databases using Azure Backup, follow these steps:

  1. Create a Backup vault.

  2. Go to Backup vault > +Backup.

    Screenshot showing the option to add a backup.

    Alternatively, go to Azure Business Continuity Center and select +Configure Protection.

  3. Select the data source type as Azure Database for PostgreSQL flexible servers.

  4. Select or create a Backup Policy to define the backup schedule and the retention duration. Screenshot showing the option to edit a backup policy.

  5. Select Next then select Add to select the Azure Database for PostgreSQL Flexible Server that you want to back up. Screenshot showing the select server option.

  6. Choose one of the Azure Database for PostgreSQL Flexible Servers across subscriptions if they're in the same region as that of the vault. Expand the arrow to see the list of databases within a server. Screenshot showing the select resources option.

  7. After the selection, the validation starts. The backup readiness check ensures the vault has sufficient permissions for backup operations. Resolve any access issues by granting appropriate permissions to the vault MSI and re-triggering the validation.

  8. Submit the configure backup operation and track the progress under Backup instances.

Create a backup policy

To create a backup policy, follow these steps:

  1. In the Backup vault you created, go to Backup policies and select Add. Alternatively, go to Backup center > Backup policies > Add.

  2. Enter a name for the new policy.

  3. Select the data source type as Azure Database for PostgreSQL flexible servers.

  4. Specify the Backup schedule.

    Currently, only Weekly backup option is available. You can opt for specific day in the week on which backup should be initiated. Screenshot showing the schedule process for the new policy.

  5. Specify Retention settings.

    You can add one or more retention rules. Each retention rule assumes inputs for specific backups, and data store and retention duration for those backups.

    Note

    Retention duration ranges from seven days to 10 years in the Backup data store.

    Note

    The retention rules are evaluated in a pre-determined order of priority. The priority is the highest for the yearly rule, followed by the monthly, and then the weekly rule. Default retention settings are applied when no other rules qualify. For example, the same recovery point may be the first successful backup taken every week as well as the first successful backup taken every month. However, as the monthly rule priority is higher than that of the weekly rule, the retention corresponding to the first successful backup taken every month applies.

Run an on-demand backup

To trigger a backup not in the schedule specified in the policy, go to Backup instances > Backup Now. Choose from the list of retention rules that were defined in the associated Backup policy.

Screenshot showing the option to navigate to the list of retention rules that were defined in the associated Backup policy.

Track a backup job

Azure Backup service creates a job for scheduled backups or if you trigger on-demand backup operation for tracking.

To view the backup job status:

  1. Go to the Backup instance screen.

    It shows the jobs dashboard with operation and status for the past seven days.

    Screenshot showing the Jobs dashboard.

  2. To view the status of the backup job, select View all to see ongoing and past jobs of this backup instance.

    Screenshot showing to select the View all option.

Next steps

Restore Azure Database for PostgreSQL Flexible backups