You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/backup/backup-azure-data-protection-use-rest-api-backup-postgresql.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Back Up PostgreSQL Databases by Using the Azure Data Protection REST API
3
-
description: In this article, learn how to configure, initiate, and manage backup operations of PostgreSQL databases in Azure Database for PostgreSQL by using the REST API.
2
+
title: Back Up PostgreSQL Databases by Using the Data Protection REST API
3
+
description: Learn how to configure, initiate, and manage backup operations of PostgreSQL databases in Azure Database for PostgreSQL by using the Data Protection REST API.
4
4
ms.topic: how-to
5
5
ms.date: 02/09/2025
6
6
ms.service: azure-backup
@@ -9,47 +9,48 @@ author: jyothisuri
9
9
ms.author: jsuri
10
10
---
11
11
12
-
# Back up PostgreSQL databases by using the Azure data protection REST API
12
+
# Back up PostgreSQL databases by using the Data Protection REST API
13
13
14
-
This article describes how to manage backups for PostgreSQL databases in Azure Database for PostgreSQL by using the REST API.
14
+
This article describes how to manage backups for PostgreSQL databases in Azure Database for PostgreSQL by using the Data Protection REST API for Azure Backup.
15
15
16
-
For information on the supported scenarios, limitations, and authentication mechanisms for PostgreSQL database backup in Azure Database for PostgreSQL, see the [overview](backup-azure-database-postgresql-overview.md)document.
16
+
For information on the supported scenarios, limitations, and authentication mechanisms for PostgreSQL database backup in Azure Database for PostgreSQL, see the [overview](backup-azure-database-postgresql-overview.md)article.
17
17
18
18
## Prerequisites
19
19
20
-
-[Create a Backup vault](backup-azure-dataprotection-use-rest-api-create-update-backup-vault.md)
21
-
20
+
-[Create a backup vault](backup-azure-dataprotection-use-rest-api-create-update-backup-vault.md)
22
21
-[Create a PostgreSQL backup policy](backup-azure-data-protection-use-rest-api-create-update-postgresql-policy.md)
23
22
24
23
## Configure backup
25
24
26
-
Once the vault and policy are created, there're three critical points that you need to consider to protect a PostgreSQL database.
25
+
After you create the vault and policy, you need to consider three critical points to back up a PostgreSQL database in Azure Database for PostgreSQL.
27
26
28
-
### Key entities involved
27
+
### Understand key entities
29
28
30
-
#### PostgreSQL database to be protected
29
+
#### PostgreSQL database to be backed up
31
30
32
-
Fetch the Azure Resource Manager ID (ARM ID) of the PostgreSQL database to be protected. This serves as the identifier of the database. We'll use an example of a database named **empdb11** under a PostgreSQL server **testpostgresql**, which is present in the resource group **ossdemoRG** under a different subscription. The following example uses bash.
31
+
Fetch the Resource Manager ID of the PostgreSQL database to be backed up. This ID serves as the identifier of the database. The following example uses a database named `empdb11` under the PostgreSQL server `testposgresql`, which is present in the resource group `ossrg` under a different subscription. The example uses Bash.
The Azure Backup service doesn't store the username and password to connect to the PostgreSQL database. Instead, the backup admin seeds the *keys* into the key vault. The Azure Backup service then accesses the key vault, reads the keys, and accesses the database.
39
40
40
-
The Azure Backup service doesn't store the username and password to connect to the PostgreSQL database. Instead, the backup admin needs to seed the *keys* into the key vault. Then the Azure Backup service will access the key vault, read the keys, and access the database. Note the secret identifier of the relevant key. The following example uses bash.
41
+
The following example uses Bash. Note the secret identifier of the relevant key.
Backup vault has to connect to the PostgreSQL server, and then access the database via the keys present in the key vault. So, it requires access to PostgreSQL server and the key vault. Access is granted to the Backup vault's managed identity.
49
+
A backup vault has to connect to the PostgreSQL server, and then access the database via the keys present in the key vault. So, it requires access to PostgreSQL server and the key vault. Access is granted to the backup vault's managed identity.
49
50
50
-
You need to grant permissions to the back up vault's managed identity on the PostgreSQL server and the Azure Key vault, where the keys to the database are stored. [Learn more](./backup-azure-database-postgresql-overview.md#set-of-permissions-needed-for-azure-postgresql-database-backup).
51
+
You need to grant permissions to the backup vault's managed identity on the PostgreSQL server and the key vault, where the keys to the database are stored. [Learn more](./backup-azure-database-postgresql-overview.md#set-of-permissions-needed-for-azure-postgresql-database-backup).
51
52
52
-
### Prepare the request to configure backup
53
+
### Prepare the request
53
54
54
55
After you set the relevant permissions to the vault and PostgreSQL database, and configure the vault and policy, prepare the request to configure backup. See the following request body to configure backup for a PostgreSQL database. The Azure Resource Manager ID (ARM ID) of the PostgreSQL database and its details are present in the _datasourceinfo_ section. The policy information is present in the _policyinfo_ section.
55
56
@@ -292,7 +293,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
292
293
293
294
### Configure backup request
294
295
295
-
Once the request is validated, you can submit the same to the [create backup instance API](/rest/api/dataprotection/backup-instances/create-or-update). One of the Azure Backup data protection services protects the Backup instance within the Backup vault. Here, the PostgreSQL database is the backup instance. Use the above-validated request body with minor additions.
296
+
Once the request is validated, you can submit the same to the [create backup instance API](/rest/api/dataprotection/backup-instances/create-or-update). One of the Azure Backup data protection services protects the Backup instance within the backup vault. Here, the PostgreSQL database is the backup instance. Use the above-validated request body with minor additions.
296
297
297
298
Use a unique name for the backup instance. So, we recommend you use a combination of the resource name and a unique identifier. For example, in the following operation, we'll use _testpostgresql-empdb11-957d23b1-c679-4c94-ade6-c4d34635e149_ and mark it as the backup instance name.
0 commit comments