Skip to content

Commit 9e230dc

Browse files
author
AbhishekMallick-MS
committed
addressed peer-review inputs
1 parent d35631d commit 9e230dc

3 files changed

+26
-27
lines changed

articles/backup/backup-azure-database-postgresql-flex-use-rest-api-create-update-policy.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Create backup policies for Azure database for PostgreSQL - Flexible server using data protection REST API in Azure Backup
33
description: Learn how to create the backup policy to protect Azure PostgreSQL flexible servers using REST API.
44
ms.topic: conceptual
5-
ms.date: 04/30/2024
5+
ms.date: 05/13/2024
66
ms.assetid: 759ee63f-148b-464c-bfc4-c9e640b7da6b
77
author: AbhishekMallick-MS
88
ms.author: v-abhmallick
@@ -14,7 +14,7 @@ This article describes how to create the backup policy to protect Azure PostgreS
1414

1515
A backup policy governs the retention and schedule of your backups. Azure PostgreSQL flexible servers Backup offers long-term retention and supports a backup per day.
1616

17-
You can reuse an existing backup policy to configure backup for PostgreSQL flexible servers to a vault, or [create a backup policy for an Azure Recovery Services vault using REST API](/rest/api/dataprotection/backup-policies/create-or-update)
17+
You can reuse an existing backup policy to configure backup for PostgreSQL flexible servers to a vault, or [create a backup policy for an Azure Recovery Services vault using REST API](/rest/api/dataprotection/backup-policies/create-or-update).
1818

1919
## Understanding PostgreSQL backup policy
2020

@@ -30,7 +30,7 @@ Before you start creating the backup policy, learn about the backup policy objec
3030
- Default Tagging Criteria (A default 'tag' for all the scheduled backups. This tag links the backups to the retention rule)
3131
- Default Retention Rule (A rule that will be applied to all backups, by default, on the initial datastore)
3232

33-
This object defines the type of backups that are triggered, the way they are triggered (via a schedule), the tags marked for the backup operation, the path where the backups are stored (a datastore), and the lifecycle of the backup data in a datastore. The default PowerShell object for PostgreSQL - Flexible servers trigger a full backup every week, and stores the backups in the vault, and retains them for three months.
33+
This object defines the type of backups that are triggered, the way they are triggered (via a schedule), the tags marked for the backup operation, the path where the backups are stored (a datastore), and the lifecycle of the backup data in a datastore. The default PowerShell object for PostgreSQL - Flexible servers triggers a full backup every week, and stores the backups in the vault, and retains them for three months.
3434

3535
## Create a backup policy
3636

@@ -47,7 +47,7 @@ The `{policyName}` and `{vaultName}` are provided in the URI. Additional informa
4747

4848
## Create the request body
4949

50-
For example, to create a policy for PostgreSQL - Flexible servers backup, the request body needs the following components:
50+
For example, to create a policy for Azure Database for PostgreSQL - Flexible servers backup, the request body needs the following components:
5151

5252
| Name | Required | Type | Description |
5353
| --- | --- | --- | --- |
@@ -57,9 +57,9 @@ For the complete list of definitions in the request body, see the [backup policy
5757

5858
### Example request body
5959

60-
The policy explains:
60+
The policy says that:
6161

62-
- Scheduled trigger for a weekly backup and choose the starting time (Time + P1W).
62+
- It's scheduled to triggrr weekly backup and choose the start time (Time + P1W).
6363
- Datastore is vault store, as the backups are directly transferred to the vault.
6464
- The backups are retained in the vault for three months (P3M).
6565

@@ -131,7 +131,7 @@ The policy explains:
131131
132132
Let's update the above JSON template with one change - Backups on multiple days of the week.
133133

134-
The following example modifies the weekly backup to back up occurring on every Sunday, Wednesday, and Friday of every week. The schedule date array mentions the dates, and dates of the week are taken as days of the week. You also need to specify that these schedules should repeat every week. So, the schedule interval is *1* and the interval type is *Weekly*.
134+
The following example modifies the weekly backup to back up on every Sunday, Wednesday, and Friday of every week. The schedule date array mentions the dates, and the dates of the week are taken as days of the week. You also need to specify that these schedules should repeat every week. So, the schedule interval is *1* and the interval type is *Weekly*.
135135

136136
**Scheduled trigger**:
137137

@@ -151,7 +151,7 @@ The following example modifies the weekly backup to back up occurring on every S
151151

152152
If you want to add another retention rule, then modify the *policy JSON* as follows:
153153

154-
The above JSON has a lifecycle for the initial datastore under the default retention rule. In this scenario, the rule mentions deleting the backup data after three months. You can add a new retention rule that defines a longer retention duration of 6 months for first backups taken at start of every month - let's name this new rule as *Monthly*.
154+
The above JSON has a lifecycle for the initial datastore under the default retention rule. In this scenario, the rule mentions deleting the backup data after three months. You can add a new retention rule that defines a longer retention duration of 6 months for the first backups taken at the start of every month. Let's name this new rule as *Monthly*.
155155

156156
**Retention lifecycle**:
157157

@@ -195,7 +195,7 @@ The above JSON has a lifecycle for the initial datastore under the default reten
195195

196196
```
197197

198-
Every time you add a retention rule, you need to add a corresponding tag in *Trigger* property of the policy. The following example creates a new tag along with the criteria (the first successful backup of the month) with the exact same name as the corresponding retention rule to be applied.
198+
Every time you add a retention rule, you need to add a corresponding tag in the *Trigger* property of the policy. The following example creates a new tag along with the criteria (the first successful backup of the month) with the exact same name as the corresponding retention rule to be applied.
199199

200200
In this example, the tag criteria should be named *Monthly*.
201201

@@ -324,7 +324,7 @@ For more details about policy creation, see the [PostGreSQL database Backup poli
324324

325325
### Responses
326326

327-
The backup policy creation or update is a synchronous operation and returns &OK* once the operation is successful.
327+
The backup policy creation or update is a synchronous operation and returns *OK* once the operation is successful.
328328

329329
| Name | Type | Description |
330330
| --- | --- | --- |
@@ -440,7 +440,7 @@ Once the operation completes, it returns 200 (OK) with the policy content in the
440440

441441
[Enable protection for Azure Database for PostgreSQL - Flexible server](backup-azure-database-postgresql-flex-use-rest-api.md).
442442

443-
For more information on the Azure Backup REST APIs, see the following articles:
443+
For more information on Azure Backup REST APIs, see the following articles:
444444

445445
- [Azure Data Protection REST API](/rest/api/dataprotection)
446446
- [Get started with Azure REST API](/rest/api/azure)

articles/backup/backup-azure-database-postgresql-flex-use-rest-api-restore.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: Restore Azure Database for PostgreSQL - Flexible servers using in Azure Backup
33
description: Learn how to restore Azure Database for PostgreSQL - Flexible servers using REST API.
44
ms.topic: conceptual
5-
ms.date: 04/30/2024
5+
ms.date: 05/13/2024
66
ms.assetid: 759ee63f-148b-464c-bfc4-c9e640b7da6b
77
author: AbhishekMallick-MS
88
ms.author: v-abhmallick
99
---
1010

1111
# Restore Azure Database for PostgreSQL - Flexible servers using REST API (preview)
1212

13-
This article describes how to restore an Azure PostgreSQL flexible server backed-up by Azure Backup.
13+
This article describes how to restore an Azure Database for PostgreSQL - Flexible server backed up by Azure Backup.
1414

1515
## Prerequisites
1616

@@ -27,7 +27,7 @@ Let's use an existing Backup vault `TestBkpVault`, under the resource group `tes
2727
### Set up permissions
2828

2929
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 target to be restored to.
30-
To restore the recovery point as files to a storage account, Backup vault's system assigned managed identity needs access on the target storage account as [mentioned here](restore-azure-database-postgresql.md#restore-permissions-on-the-target-storage-account).
30+
To restore the recovery point as files to a storage account, Backup vault's system assigned managed identity needs access on the target storage account as mentioned [here](restore-azure-database-postgresql.md#restore-permissions-on-the-target-storage-account).
3131

3232
### Fetch the relevant recovery point
3333

@@ -43,7 +43,7 @@ For example, this API translates to:
4343
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/resourceGroups/TestBkpVaultRG/providers/Microsoft.DataProtection/backupVaults/testBkpVault/backupInstances/pgflextestserver-857d23b1-c679-4c94-ade6-c4d34635e149/recoveryPoints?api-version=2021-07-01
4444
```
4545

46-
**Responses for list of recovery points**:
46+
**Responses for the list of recovery points**:
4747

4848
Once you submit the *GET* request, it returns response as *200* (OK), and the list of all discrete recovery points with all the relevant details.
4949

@@ -106,7 +106,7 @@ Select the relevant recovery points from the above list and proceed to prepare t
106106

107107
### Restore as files
108108

109-
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.
109+
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.
110110

111111
```HTTP
112112
"https://testossstorageaccount.blob.core.windows.net/testcontainerrestore"
@@ -254,7 +254,7 @@ It returns two responses: 202 (Accepted) when another operation is created. Then
254254

255255
Example response to trigger restore request:
256256

257-
Once the *POST* operation is submitted, it will return the initial response as *202* (Accepted) with an *Azure-asyncOperation* header.
257+
Once the *POST* operation is submitted, it will return the initial response as *202* (Accepted) with an `Azure-asyncOperation` header.
258258

259259
```HTTP
260260
HTTP/1.1 202 Accepted
@@ -276,7 +276,7 @@ X-Powered-By: ASP.NET
276276
277277
```
278278

279-
Track the `Azure-AsyncOperation` header with a simple *GET* request. When the request is successful, it will return 200 (OK) with a job ID that should be further tracked for completion of restore request.
279+
Track the `Azure-AsyncOperation` header with a simple *GET* request. When the request is successful, it will return 200 (OK) with a job ID that should be further tracked for completion of the restore request.
280280

281281
```HTTP
282282
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZmMzNDFmYWMtZWJlMS00NGJhLWE4YTgtMDNjYjI4Y2M5OTExO2Q1NDIzY2VjLTczYjYtNDY5ZC1hYmRjLTc1N2Q0ZTJmOGM5OQ==?api-version=2021-07-01

articles/backup/backup-azure-database-postgresql-flex-use-rest-api.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Back up Azure Database for PostgreSQL - Flexible servers using in Azure Backup
33
description: Learn how to back up Azure Database for PostgreSQL - Flexible servers using REST API.
44
ms.topic: conceptual
5-
ms.date: 04/30/2024
5+
ms.date: 05/13/2024
66
ms.assetid: 759ee63f-148b-464c-bfc4-c9e640b7da6b
77
author: AbhishekMallick-MS
88
ms.author: v-abhmallick
@@ -39,7 +39,7 @@ Once the vault and policy are created, there're three critical points to conside
3939

4040
Backup vault has to connect and access the PostgreSQL flexible server. Access is granted to the Backup vault's Managed Service Identity (MSI).
4141

42-
You need to grant permissions to back up vault's MSI on the PostgreSQL. Learn more.
42+
You need to grant permissions to back up vault's MSI on the PostgreSQL. [Learn more](backup-azure-database-postgresql-overview.md#set-of-permissions-needed-for-azure-postgresql-database-backup).
4343

4444
### Prepare the request to configure backup
4545

@@ -80,10 +80,9 @@ After you set the relevant permissions to the vault and PostgreSQL flexible serv
8080

8181
To validate if the backup configuration request will be successful, use the *validate for backup* API. You can use the response to perform the required prerequisites, and then submit the configuration for the backup request.
8282

83-
**Validate for backup request is a POST operation and the Uniform Resource Identifier (URI)**
83+
*Validate for backup request* is a *POST* operation and the Uniform Resource Identifier (URI) contains `{subscriptionId}`, `{vaultName}`, `{vaultresourceGroupName}` parameters.
8484

8585
```HTTP
86-
contains {subscriptionId}, {vaultName}, {vaultresourceGroupName} parameters.
8786
POST https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{vaultresourceGroupname}/providers/Microsoft.DataProtection/backupVaults/{backupVaultName}/validateForBackup?api-version=2021-01-01
8887
8988
```
@@ -145,7 +144,7 @@ It returns two responses: 202 (Accepted) when another operation is created, and
145144

146145
*Error response*
147146

148-
If the given server is already protected, it returns the response as HTTP 400 (Bad request) and states that the given server is already protected in a backup vault along with details.
147+
If the given server is already protected, it returns the response as HTTP 400 (Bad request) and states that the given server is already protected in a backup vault along with the details.
149148

150149
```HTTP
151150
HTTP/1.1 400 BadRequest
@@ -233,7 +232,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
233232
234233
```
235234

236-
It returns 200 (OK) once it completes and the response body lists further requirements to be fulfilled, such as permissions.
235+
It returns 200 (OK) once it completes and the response body lists more requirements to be fulfilled, such as permissions.
237236

238237
```HTTP
239238
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZmMzNDFmYWMtZWJlMS00NGJhLWE4YTgtMDNjYjI4Y2M5OTExOzM2NDdhZDNjLTFiNGEtNDU4YS05MGJkLTQ4NThiYjRhMWFkYg==?api-version=2021-01-01
@@ -276,7 +275,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
276275
277276
```
278277

279-
If you grant all permissions, then resubmit the validation request, track the resulting operation. It'll return the success response as 200 (OK) if all the conditions are met.
278+
If you grant all permissions, then resubmit the validation request, and track the resulting operation. It'll return the success response as 200 (OK) if all the conditions are met.
280279

281280
```HTTP
282281
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZmMzNDFmYWMtZWJlMS00NGJhLWE4YTgtMDNjYjI4Y2M5OTExOzlhMjk2YWM2LWRjNDMtNGRjZS1iZTU2LTRkZDNiMDhjZDlkOA==?api-version=2021-01-01
@@ -295,7 +294,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
295294

296295
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 Azure PostgreSQL flexible server is the backup instance. Use the above-validated request body with minor additions.
297296

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 *pgflextestserver-857d23b1-c679-4c94-ade6-c4d34635e149* and mark it as the backup instance name.
297+
Use a unique name for the backup instance. We recommend you to use a combination of the resource name and a unique identifier. For example, in the following operation, we'll use *pgflextestserver-857d23b1-c679-4c94-ade6-c4d34635e149* and mark it as the backup instance name.
299298

300299
To create or update the backup instance, use the following *PUT* operation:
301300

@@ -358,7 +357,7 @@ We'll use the [same request body that we used to validate the backup request](ba
358357
### Responses to configure backup request
359358

360359
Create backup instance request is an [asynchronous operation](../azure-resource-manager/management/async-operations.md). So, this operation creates another operation that needs to be tracked separately.
361-
It returns two responses: 201 (Created) when backup instance is created and the protection is configured. 200 (OK) when that configuration completes.
360+
It returns two responses: *201* (Created) when the backup instance is created and the protection is configured. 200 (OK) when that configuration completes.
362361

363362
| Name | Type | Description |
364363
| --- | --- | --- |

0 commit comments

Comments
 (0)