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-database-postgresql-flex-use-rest-api-create-update-policy.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Create backup policies for Azure database for PostgreSQL - Flexible server using data protection REST API in Azure Backup
3
3
description: Learn how to create the backup policy to protect Azure PostgreSQL flexible servers using REST API.
4
4
ms.topic: conceptual
5
-
ms.date: 04/30/2024
5
+
ms.date: 05/13/2024
6
6
ms.assetid: 759ee63f-148b-464c-bfc4-c9e640b7da6b
7
7
author: AbhishekMallick-MS
8
8
ms.author: v-abhmallick
@@ -14,7 +14,7 @@ This article describes how to create the backup policy to protect Azure PostgreS
14
14
15
15
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.
16
16
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).
18
18
19
19
## Understanding PostgreSQL backup policy
20
20
@@ -30,7 +30,7 @@ Before you start creating the backup policy, learn about the backup policy objec
30
30
- Default Tagging Criteria (A default 'tag' for all the scheduled backups. This tag links the backups to the retention rule)
31
31
- Default Retention Rule (A rule that will be applied to all backups, by default, on the initial datastore)
32
32
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.
34
34
35
35
## Create a backup policy
36
36
@@ -47,7 +47,7 @@ The `{policyName}` and `{vaultName}` are provided in the URI. Additional informa
47
47
48
48
## Create the request body
49
49
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:
51
51
52
52
| Name | Required | Type | Description |
53
53
| --- | --- | --- | --- |
@@ -57,9 +57,9 @@ For the complete list of definitions in the request body, see the [backup policy
57
57
58
58
### Example request body
59
59
60
-
The policy explains:
60
+
The policy says that:
61
61
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).
63
63
- Datastore is vault store, as the backups are directly transferred to the vault.
64
64
- The backups are retained in the vault for three months (P3M).
65
65
@@ -131,7 +131,7 @@ The policy explains:
131
131
132
132
Let's update the above JSON template with one change - Backups on multiple days of the week.
133
133
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*.
135
135
136
136
**Scheduled trigger**:
137
137
@@ -151,7 +151,7 @@ The following example modifies the weekly backup to back up occurring on every S
151
151
152
152
If you want to add another retention rule, then modify the *policy JSON* as follows:
153
153
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*.
155
155
156
156
**Retention lifecycle**:
157
157
@@ -195,7 +195,7 @@ The above JSON has a lifecycle for the initial datastore under the default reten
195
195
196
196
```
197
197
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.
199
199
200
200
In this example, the tag criteria should be named *Monthly*.
201
201
@@ -324,7 +324,7 @@ For more details about policy creation, see the [PostGreSQL database Backup poli
324
324
325
325
### Responses
326
326
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.
328
328
329
329
| Name | Type | Description |
330
330
| --- | --- | --- |
@@ -440,7 +440,7 @@ Once the operation completes, it returns 200 (OK) with the policy content in the
440
440
441
441
[Enable protection for Azure Database for PostgreSQL - Flexible server](backup-azure-database-postgresql-flex-use-rest-api.md).
442
442
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:
444
444
445
445
-[Azure Data Protection REST API](/rest/api/dataprotection)
446
446
-[Get started with Azure REST API](/rest/api/azure)
Copy file name to clipboardExpand all lines: articles/backup/backup-azure-database-postgresql-flex-use-rest-api-restore.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
title: Restore Azure Database for PostgreSQL - Flexible servers using in Azure Backup
3
3
description: Learn how to restore Azure Database for PostgreSQL - Flexible servers using REST API.
4
4
ms.topic: conceptual
5
-
ms.date: 04/30/2024
5
+
ms.date: 05/13/2024
6
6
ms.assetid: 759ee63f-148b-464c-bfc4-c9e640b7da6b
7
7
author: AbhishekMallick-MS
8
8
ms.author: v-abhmallick
9
9
---
10
10
11
11
# Restore Azure Database for PostgreSQL - Flexible servers using REST API (preview)
12
12
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 backedup by Azure Backup.
14
14
15
15
## Prerequisites
16
16
@@ -27,7 +27,7 @@ Let's use an existing Backup vault `TestBkpVault`, under the resource group `tes
27
27
### Set up permissions
28
28
29
29
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).
31
31
32
32
### Fetch the relevant recovery point
33
33
@@ -43,7 +43,7 @@ For example, this API translates to:
43
43
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
44
44
```
45
45
46
-
**Responses for list of recovery points**:
46
+
**Responses for the list of recovery points**:
47
47
48
48
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.
49
49
@@ -106,7 +106,7 @@ Select the relevant recovery points from the above list and proceed to prepare t
106
106
107
107
### Restore as files
108
108
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.
@@ -254,7 +254,7 @@ It returns two responses: 202 (Accepted) when another operation is created. Then
254
254
255
255
Example response to trigger restore request:
256
256
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.
258
258
259
259
```HTTP
260
260
HTTP/1.1 202 Accepted
@@ -276,7 +276,7 @@ X-Powered-By: ASP.NET
276
276
277
277
```
278
278
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.
280
280
281
281
```HTTP
282
282
GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZmMzNDFmYWMtZWJlMS00NGJhLWE4YTgtMDNjYjI4Y2M5OTExO2Q1NDIzY2VjLTczYjYtNDY5ZC1hYmRjLTc1N2Q0ZTJmOGM5OQ==?api-version=2021-07-01
Copy file name to clipboardExpand all lines: articles/backup/backup-azure-database-postgresql-flex-use-rest-api.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Back up Azure Database for PostgreSQL - Flexible servers using in Azure Backup
3
3
description: Learn how to back up Azure Database for PostgreSQL - Flexible servers using REST API.
4
4
ms.topic: conceptual
5
-
ms.date: 04/30/2024
5
+
ms.date: 05/13/2024
6
6
ms.assetid: 759ee63f-148b-464c-bfc4-c9e640b7da6b
7
7
author: AbhishekMallick-MS
8
8
ms.author: v-abhmallick
@@ -39,7 +39,7 @@ Once the vault and policy are created, there're three critical points to conside
39
39
40
40
Backup vault has to connect and access the PostgreSQL flexible server. Access is granted to the Backup vault's Managed Service Identity (MSI).
41
41
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).
43
43
44
44
### Prepare the request to configure backup
45
45
@@ -80,10 +80,9 @@ After you set the relevant permissions to the vault and PostgreSQL flexible serv
80
80
81
81
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.
82
82
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.
POST https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{vaultresourceGroupname}/providers/Microsoft.DataProtection/backupVaults/{backupVaultName}/validateForBackup?api-version=2021-01-01
88
87
89
88
```
@@ -145,7 +144,7 @@ It returns two responses: 202 (Accepted) when another operation is created, and
145
144
146
145
*Error response*
147
146
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.
149
148
150
149
```HTTP
151
150
HTTP/1.1 400 BadRequest
@@ -233,7 +232,7 @@ GET https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
233
232
234
233
```
235
234
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.
237
236
238
237
```HTTP
239
238
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
276
275
277
276
```
278
277
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.
280
279
281
280
```HTTP
282
281
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
295
294
296
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 Azure PostgreSQL flexible server is the backup instance. Use the above-validated request body with minor additions.
297
296
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.
299
298
300
299
To create or update the backup instance, use the following *PUT* operation:
301
300
@@ -358,7 +357,7 @@ We'll use the [same request body that we used to validate the backup request](ba
358
357
### Responses to configure backup request
359
358
360
359
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.
0 commit comments