Skip to content

Commit 58e2532

Browse files
authored
Merge pull request #295373 from MicrosoftDocs/release-psqlflex-backup
Release psqlflex backup -> main -- 2/28 - 11:00AM IST (1:30 PM CST)
2 parents d56bf00 + dc757e0 commit 58e2532

File tree

53 files changed

+1007
-885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1007
-885
lines changed

articles/backup/back-up-azure-database-postgresql-flex-backup-cli.md

Lines changed: 43 additions & 225 deletions
Large diffs are not rendered by default.

articles/backup/back-up-azure-database-postgresql-flex-backup-powershell.md

Lines changed: 44 additions & 181 deletions
Large diffs are not rendered by default.

articles/backup/backup-azure-database-postgresql-flex-manage.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
title: Manage Azure Backup for Azure PostgreSQL - Flexible servers
2+
title: Manage backups of Azure Database for PostgreSQL - Flexible Server using Azure portal
33
description: Learn about managing backup for the Azure PostgreSQL - Flexible servers from the Azure portal.
44
ms.topic: how-to
5-
ms.date: 03/21/2024
5+
ms.date: 02/28/2025
66
author: jyothisuri
77
ms.author: jsuri
88
ms.service: azure-backup
99
ms.custom: engagement-fy24, ignite-2024
1010
---
1111

12-
# Manage Azure Backup for Azure PostgreSQL - Flexible servers (preview)
12+
# Manage backups of Azure Database for PostgreSQL - Flexible Server using Azure portal
1313

14-
This article explains how to manage backup for the Azure PostgreSQL - Flexible servers from the Azure portal.
14+
This article describes how to manage backup of Azure Database for PostgreSQL - Flexible Server using Azure portal.
1515

1616
## Change policy
1717

@@ -178,6 +178,7 @@ To delete a PostgreSQL server backup instance, follow these steps:
178178

179179
1. Select **Delete** to confirm and proceed with deleting backup instance.
180180

181-
## Next steps
182181

183-
[Backup vaults overview](backup-vault-overview.md)
182+
## Next step
183+
184+
[Troubleshoot common errors for backup and restore operations for Azure Database for PostgreSQL - Flexible Server](backup-azure-database-postgresql-flex-troubleshoot.md).

articles/backup/backup-azure-database-postgresql-flex-overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: About Azure Database for PostgreSQL Flexible server backup
33
description: An overview on Azure Database for PostgreSQL Flexible server backup
44
ms.topic: overview
5-
ms.date: 09/09/2024
5+
ms.date: 02/28/2025
66
ms.service: azure-backup
77
ms.custom:
88
- ignite-2024
99
author: jyothisuri
1010
ms.author: jsuri
1111
---
1212

13-
# About Azure Database for PostgreSQL - Flexible server backup (preview)
13+
# About Azure Database for PostgreSQL - Flexible Server backup
1414

1515
Azure Backup and Azure Database Services have come together to build an enterprise-class backup solution for Azure Database for PostgreSQL servers that retains backups for up to 10 years. The feature offers the following capabilities:
1616

@@ -27,7 +27,7 @@ To perform the backup operation:
2727
1. Grant permissions to the backup vault MSI on the target ARM resource (PostgreSQL-Flexible server), establishing access, and control.
2828
1. Configure backup policies, specify scheduling, retention, and other parameters.
2929

30-
Once the configuration is complete:
30+
Once the configuration is successful:
3131

3232
1. The Backup service invokes the backup based on the policy schedules on the ARM API of PostgresFlex server, writing data to a secure blob-container with a SAS for enhanced security.
3333
1. Backup runs independently preventing disruptions during long-running tasks.
@@ -59,4 +59,4 @@ You incur charges for:
5959

6060
## Next steps
6161

62-
[Azure Database for PostgreSQL -Flex backup](backup-azure-database-postgresql-flex.md).
62+
[Back up Azure Database for PostgreSQL - Flexible Server using Azure portal](tutorial-create-first-backup-azure-database-postgresql-flex.md).

articles/backup/backup-azure-database-postgresql-flex-restore-cli.md

Lines changed: 85 additions & 60 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,51 @@
11
---
2-
title: Restore Azure Database for PostgreSQL - flexible server via Azure PowerShell
3-
description: Learn how to restore Azure Database for PostgreSQL - flexible server using Azure PowerShell.
2+
title: Restore Azure Database for PostgreSQL - Flexible Server using Azure PowerShell
3+
description: Learn how to restore Azure Database for PostgreSQL - Flexible Server using Azure PowerShell.
44
ms.topic: how-to
5-
ms.date: 10/01/2024
5+
ms.date: 02/28/2025
66
ms.service: azure-backup
77
ms.custom: devx-track-azurepowershell, ignite-2024
88
author: jyothisuri
99
ms.author: jsuri
1010
---
1111

12-
# Restore Azure Database for PostgreSQL - flexible server using Azure PowerShell (preview)
12+
# Restore Azure Database for PostgreSQL - Flexible Server using Azure PowerShell
1313

14-
This article explains how to restore **Azure Database for PostgreSQL - flexible server** to an Azure Database for PostgreSQL - flexible server backed-up by Azure Backup.
14+
This article describes how to restore Azure Database for PostgreSQL - Flexible Server using Azure PowerShell.
1515

16-
In this article, you'll learn how to:
16+
>[!Note]
17+
>The Original Location Recovery (OLR) option isn't supported for PaaS databases. Instead, use the Alternate-Location Recovery (ALR) to restore from a recovery point and create a new database in the same or another Azure PostgreSQL – Flexible server, keeping both the source and restored databases.
1718
18-
- Restore to create a new PostgreSQL - flexible server
19-
20-
- Track the restore operation status
21-
22-
We'll refer to an existing backup vault _TestBkpVault_ under the resource group _testBkpVaultRG_ in the examples.
19+
Let's use an existing Backup vault `TestBkpVault`, under the resource group `testBkpVaultRG` in the examples.
2320

2421
```azurepowershell-interactive
2522
$TestBkpVault = Get-AzDataProtectionBackupVault -VaultName TestBkpVault -ResourceGroupName "testBkpVaultRG"
2623
```
2724

28-
## Restore to create a new PostgreSQL database
25+
## Set up permissions for restore
2926

30-
### Set up permissions
27+
Backup vault uses managed identity to access other Azure resources. To restore from backup, Backup vault’s managed identity requires a set of permissions on the Azure PostgreSQL – Flexible Server to which the database should be restored.
3128

32-
Backup vault uses managed identity to access other Azure resources. To restore from backup, Backup vault’s managed identity requires a set of permissions on the storage account to which the server would be restored.
33-
34-
To assign the relevant permissions for vault's system-assigned managed identity on the target storage account, see the [set of permissions needed to backup Azure PostgreSQL database](./backup-azure-database-postgresql-overview.md#set-of-permissions-needed-for-azure-postgresql-database-restore).
29+
To assign the relevant permissions for vault's system-assigned managed identity on the target PostgreSQL – Flexible Server, check the [set of permissions](backup-azure-database-postgresql-flex-overview.md#azure-backup-authentication-with-the-postgresql-server) needed to backup Azure PostgreSQL – Flexible Server database.
3530

3631
To restore the recovery point as files to a storage account, the [Backup vault's system-assigned managed identity needs access on the target storage account](./restore-azure-database-postgresql.md#restore-permissions-on-the-target-storage-account).
3732

38-
### Fetching the relevant recovery point
33+
## Fetch the relevant recovery point
3934

40-
Fetch all instances using [Get-AzDataProtectionBackupInstance](/powershell/module/az.dataprotection/get-azdataprotectionbackupinstance) command and identify the relevant instance.
35+
Fetch all instances using [Get-AzDataProtectionBackupInstance](/powershell/module/az.dataprotection/get-azdataprotectionbackupinstance) cmdlet and identify the relevant instance.
4136

4237
```azurepowershell-interactive
4338
$AllInstances = Get-AzDataProtectionBackupInstance -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name
39+
4440
```
4541

46-
You can also use **Az.Resourcegraph** and the [Search-AzDataProtectionBackupInstanceInAzGraph](/powershell/module/az.dataprotection/search-azdataprotectionbackupinstanceinazgraph) command to search recovery points across instances in many vaults and subscriptions.
42+
You can also use `Az.Resourcegraph` and the [Search-AzDataProtectionBackupInstanceInAzGraph](/powershell/module/az.dataprotection/search-azdataprotectionbackupinstanceinazgraph) cmdlet to search recovery points across instances in many vaults and subscriptions.
4743

4844
```azurepowershell-interactive
4945
$AllInstances = Search-AzDataProtectionBackupInstanceInAzGraph -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -DatasourceType AzureDatabaseForPGFlexServer -ProtectionStatus ProtectionConfigured
5046
```
5147

52-
To filter the search criteria, use the PowerShell client search capabilities as shown below:
48+
To filter the search criteria, use the following PowerShell client search capabilities:
5349

5450
```azurepowershell-interactive
5551
Search-AzDataProtectionBackupInstanceInAzGraph -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -DatasourceType AzureDatabaseForPGFlexServer -ProtectionStatus ProtectionConfigured | Where-Object { $_.BackupInstanceName -match "testpgflex"}
@@ -61,64 +57,66 @@ Once the instance is identified, fetch the relevant recovery point.
6157
$rp = Get-AzDataProtectionRecoveryPoint -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -BackupInstanceName $AllInstances[2].BackupInstanceName
6258
```
6359

64-
### Prepare the restore request
60+
## Prepare the restore request
6561

66-
You can restore the recovery point for a PostgreSQL – Flexible server database as files only.
62+
You can restore the recovery point for a PostgreSQL – Flexible Server database as files only.
6763

68-
#### Restore as files
64+
### Restore as files
6965

70-
Fetch the URI of the container, within the storage account to which permissions were assigned as detailed [above](#set-up-permissions). For example, a container named **testcontainerrestore** under a storage account **testossstorageaccount** with a different subscription.
66+
Fetch the Uniform Resource Identifier (URI) of the container, within the storage account to which permissions were assigned. For example, a container named `testcontainerrestore` under a storage account `testossstorageaccount` with a different subscription.
7167

7268
```azurepowershell-interactive
7369
$contURI = "https://testossstorageaccount.blob.core.windows.net/testcontainerrestore"
7470
```
7571

76-
Use the [Initialize-AzDataProtectionRestoreRequest](/powershell/module/az.dataprotection/initialize-azdataprotectionrestorerequest) command to prepare the restore request with all relevant details.
72+
Use the [Initialize-AzDataProtectionRestoreRequest](/powershell/module/az.dataprotection/initialize-azdataprotectionrestorerequest) cmdlet to prepare the restore request with all relevant details.
7773

7874
```azurepowershell-interactive
79-
$OssRestoreAsFilesReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPGFlexServer -SourceDataStore VaultStore -RestoreLocation $TestBkpVault.Location -RestoreType RestoreAsFiles -RecoveryPoint $rps[0].Property.RecoveryPointId -TargetContainerURI $contURI -FileNamePrefix "testpgflex-westus_1628853549768"
75+
$OssRestoreAsFilesReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPGFlexServer -SourceDataStore VaultStore -RestoreLocation $TestBkpVault.Location -RestoreType RestoreAsFiles -RecoveryPoint $rps[0].Property.RecoveryPointId -TargetContainerURI $contURI -FileNamePrefix "empdb11_postgresql-westus_1628853549768"
8076
```
8177

82-
### Trigger the restore
78+
>[!Note]
79+
>After the restore to the target storage account is complete , you can use the pg_restore utility to restore an Azure Database for PostgreSQL – Flexible Server database from the target.
8380
84-
Use the [Start-AzDataProtectionBackupInstanceRestore](/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore) command to trigger the restore with the request prepared above.
81+
To connect to an existing PostgreSQL – Flexible Server and an existing database, use the following cmdlet:
8582

8683
```azurepowershell-interactive
87-
Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $AllInstances[2].BackupInstanceName -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -Parameter $OssRestoreReq
84+
pg_restore -h <hostname> -U <username> -d <db name> -Fd -j <NUM> -C <dump directory>
8885
```
8986

90-
## Tracking job
87+
In this script:
9188

92-
Track all the jobs using the [Get-AzDataProtectionJob](/powershell/module/az.dataprotection/get-azdataprotectionjob) command. You can list all jobs and fetch a particular job detail.
89+
- `-Fd`: The directory format.
90+
- `-j`: The number of jobs.
91+
- `-C`: Starts the output with a cmdlet to create the database itself and then reconnect to it.
9392

94-
You can also use *Az.ResourceGraph* to track jobs across all Backup vaults. Use the [Search-AzDataProtectionJobInAzGraph](/powershell/module/az.dataprotection/search-azdataprotectionjobinazgraph) command to get the relevant job, which is across all backup vault.
93+
The following example shows how the syntax might appear:
9594

9695
```azurepowershell-interactive
97-
$job = Search-AzDataProtectionJobInAzGraph -Subscription $sub -ResourceGroupName "testBkpVaultRG" -Vault $TestBkpVault.Name -DatasourceType AzureDatabaseForPGFlexServer -Operation OnDemandBackup
96+
pg_restore -h <hostname> -U <username> -j <Num of parallel jobs> -Fd -C -d <databasename> sampledb_dir_format
9897
```
9998

100-
### Create PostgreSQL - flexible server from restored storage account
99+
If you have more than one database to restore, rerun the earlier cmdlet for each database.
100+
Also, by using multiple concurrent jobs `-j`, you can reduce the restore time of a large database on a **multi-vCore** target server. The number of jobs can be equal to or less than the number of `vCPUs` allocated for the target server.
101101

102-
Post restoration completion to the target storage account, you can use **pg_restore** utility to restore an Azure Database for PostgreSQL – Flexible server database from the target. Use the following command to connect to an existing PostgreSQL – Flexible server and an existing database.
102+
## Trigger the restore
103+
104+
To trigger the restore operation with the prepared request, use the [`Start-AzDataProtectionBackupInstanceRestore`](/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore) cmdlet
103105

104106
```azurepowershell-interactive
105-
pg_restore -h <hostname> -U <username> -d <db name> -Fd -j <NUM> -C <dump directory>
107+
Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $AllInstances[2].BackupInstanceName -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -Parameter $OssRestoreReq
106108
```
107109

108-
-Fd: The directory format.
109-
-j: The number of jobs.
110-
-C: Begin the output with a command to create the database itself and then reconnect to it.
110+
## Track jobs
111+
112+
Track all jobs by using the [`Get-AzDataProtectionJob`](/powershell/module/az.dataprotection/get-azdataprotectionjob) cmdlet. You can list all jobs and fetch a particular job detail.
111113

112-
Here's an example of how this syntax might appear:
114+
You can also use `Az.ResourceGraph` to track jobs across all Backup vaults. Use the [`Search-AzDataProtectionJobInAzGraph`](/powershell/module/az.dataprotection/search-azdataprotectionjobinazgraph) cmdlet to get the relevant job that is across all Backup vaults.
113115

114116
```azurepowershell-interactive
115-
pg_restore -h <hostname> -U <username> -j <Num of parallel jobs> -Fd -C -d <databasename> sampledb_dir_format
117+
$job = Search-AzDataProtectionJobInAzGraph -Subscription $sub -ResourceGroupName "testBkpVaultRG" -Vault $TestBkpVault.Name -DatasourceType AzureDatabaseForPGFlexServer -Operation OnDemandBackup
116118
```
117119

118-
If you have more than one database to restore, re-run the earlier command for each database.
119-
120-
Also, by using multiple concurrent jobs -j, you can reduce the time it takes to restore a large database on a multi-vCore target server. The number of jobs can be equal to or less than the number of vCPUs that are allocated for the target server.
121-
122120
## Next steps
123121

124-
- [Azure PostgreSQL - flexible server Backup](backup-azure-database-postgresql-flex-overview.md)
122+
[Troubleshoot common errors for backup and restore operations for Azure Database for PostgreSQL - Flexible Server](backup-azure-database-postgresql-flex-troubleshoot.md).

articles/backup/backup-azure-database-postgresql-flex-support-matrix.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@
22
title: Azure Database for PostgreSQL- Flexible server support matrix
33
description: Provides a summary of support settings and limitations of Azure Database for PostgreSQL- Flexible server backup.
44
ms.topic: reference
5-
ms.date: 12/17/2024
5+
ms.date: 02/28/2025
66
ms.custom: references_regions, ignite-2024
77
ms.service: azure-backup
88
author: jyothisuri
99
ms.author: jsuri
1010
---
1111

12-
# Support matrix for Azure Database for PostgreSQL- Flexible server (preview)
12+
# Support matrix for Azure Database for PostgreSQL- Flexible Server
1313

14-
You can use [Azure Backup](./backup-overview.md) to protect Azure Database for PostgreSQL- Flexible server. This article summarizes supported regions, scenarios, and the limitations.
14+
You can use [Azure Backup](./backup-overview.md) to protect Azure Database for PostgreSQL- Flexible Server. This article summarizes supported regions, scenarios, and the limitations.
1515

1616
## Supported regions
1717

18-
Azure Database for PostgreSQL - Flexible server backup is now available in all public regions.
18+
Azure Database for PostgreSQL - Flexible server backup is generally available in the following regions: East Asia, Central India, Southeast Asia, UK South, and UK West. However, this feature is currently in preview for other regions.
1919

2020
## Support scenarios
2121

22-
- PostgreSQL Flexible Server backup data can be recovered in user specified storage containers that can be used to rebuild the PostgreSQL flexible server. You can restore this data as a new PostgreSQL - flexible server with the database native tools.
22+
Consider the following support scenarios when you back up Azure Database for PostgreSQL – Flexible Server:
2323

24+
- Vaulted backup restores are only available as **Restore to Files** in user specified storage containers. You can restore this data as a new PostgreSQL - flexible server with the database native tools.
2425
- Backups for the PostgreSQL server are supported when the Backup Vault is in the same or a different subscription as the database, provided they are within the same tenant and region. Restores are supported across regions (Azure Paired) and across subscriptions within the same tenant.
25-
26-
- Recommended limit for the maximum server size is 4 TB.
27-
26+
- For vaulted backups, entire server is backed up with all databases. Backup of specific databases isn't supported.
27+
- Recommended limit for the maximum server size is **1 TB**. While backups can be attempted on server size exceeding 1 TB, which aren't officially supported, and the success of vaulted backups for such server can't be guaranteed.
2828
- PostgreSQL - Flexible servers encrypted by Customer Managed Key are supported.
29-
30-
- Private endpoint-enabled Azure PostgreSQL flexible servers can be backed up by allowing trusted Microsoft services in the network settings.
31-
32-
- Backups for PGSQLFlex will exclude databases owned by `azuresu` or `azure_pg_admin`, including the native `postgres` database. As a result, databases with these owners cannot be backed up or restored.
33-
29+
- Private endpoint-enabled Azure Database for PostgreSQL - Flexible servers can be backed up by allowing trusted Microsoft services in the network settings.
30+
- Backups for PostgreSQL Flexible servers exclude databases owned by `azuresu` or `azure_pg_admin`, including the native PostgreSQL database. So, databases with these owners can't be backed up or restored.
3431

3532
## Limitation
3633

37-
- Currently, restoring backups directly to flexible server isn't supported.
34+
Azure Database for PostgreSQL – Flexible Server backups include the following limitations:
3835

39-
- Currently, backing up individual databases isn't supported. You can only back up the entire server.
36+
- Vaulted backup doesn't support storage in archive tier.
37+
- Vaulted backup isn't supported on replicas; backup can be configured only on primary servers.
38+
- For restore operation, item level recovery (recovery of specific databases) isn't supported.
39+
- Weekly backups are supported for only one day in the week on which backup is initiated.
40+
- Vaulted backups don't support tables containing a row with **BYTEA length exceeding 500 MB**.
4041

41-
- Only weekly backups are supported with option to opt for only one day in the week on which backup is initiated.
4242

4343

4444
## Next steps
4545

46-
- [Back up Azure Database for PostgreSQL -flex server](backup-azure-database-postgresql-flex.md).
46+
- [Back up Azure Database for PostgreSQL -Flexible Server using Azure portal](tutorial-create-first-backup-azure-database-postgresql-flex.md).

0 commit comments

Comments
 (0)