| title | Configure backup for Azure Database for PostgreSQL - Flexible Server using Azure portal | |
|---|---|---|
| description | Learn about how to configure backup for Azure Database for PostgreSQL - Flexible Server using Azure portal. | |
| ms.topic | how-to | |
| ms.date | 01/22/2026 | |
| ms.service | azure-backup | |
| ms.custom |
|
|
| author | AbhishekMallick-MS | |
| ms.author | v-mallicka |
This article describes how to configure backup for Azure Database for PostgreSQL - Flexible Server using Azure portal.
Before you configure backup for Azure Database for PostgreSQL - Flexible Server, ensure the following prerequisites are met:
[!INCLUDE Prerequisites for backup of Azure Database for PostgreSQL - Flexible Server.]
[!INCLUDE Configure protection for Azure Database for PostgreSQL - Flexible Server.]
You can create a backup policy on the go during the backup configuration flow.
To create a backup policy, follow these steps:
-
On the Configure Backup pane, select the Backup policy tab.
-
On the Backup policy tab, select Create new under Backup policy.
-
On the Create Backup Policy pane, on the Basics tab, provide a name for the new policy on Policy name.
:::image type="content" source="./media/backup-azure-database-postgresql-flex/enter-policy-name.png" alt-text="Screenshot sows how to provide the Backup policy name.":::
-
On the Schedule + retention tab, under Backup schedule, define the Backup frequency.
-
Under Retention rules, select Add retention rule.
:::image type="content" source="./media/backup-azure-database-postgresql-flex/define-backup-schedule.png" alt-text="Screenshot shows how to define the backup schedule in the Backup policy." lightbox="./media/backup-azure-database-postgresql-flex/define-backup-schedule.png":::
-
On the Add retention pane, define the retention period, and then select Add.
[!Note] The default retention period for Weekly backup is 10 years. You can add retention rules for specific backups, including data store and retention duration.
:::image type="content" source="./media/backup-azure-database-postgresql-flex/add-retention-rules.png" alt-text="Screenshot shows how to define the retention for the database backups." lightbox="./media/backup-azure-database-postgresql-flex/add-retention-rules.png":::
-
Once you are on the Create Backup Policy pane, select Review + create.
:::image type="content" source="./media/backup-azure-database-postgresql-flex/complete-policy-creation.png" alt-text="Screenshot shows how to trigger the Backup policy creation." lightbox="./media/backup-azure-database-postgresql-flex/complete-policy-creation.png":::
[!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.
When the backup configuration is complete, you can run an on-demand backup and track the progress of the backup operation.
Restore Azure Database for PostgreSQL - Flexible Server using Azure portal.