Skip to content

Commit 3aee140

Browse files
author
AbhishekMallick01
committed
addressed Pre-PLR review inputs
1 parent 974db7a commit 3aee140

File tree

8 files changed

+111
-111
lines changed

8 files changed

+111
-111
lines changed
610 Bytes
Loading

articles/backup/quick-backup-postgresql-flexible-server-cli.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ See the [permissions](.\backup-azure-database-postgresql-flex-overview.md#permis
3535

3636
2. Once all the required permissions are set, we prepare the relevant request to configure backup for the PostgreSQL - Flexible server.
3737

38-
```azurecli
39-
az dataprotection backup-instance initialize --datasource-id $ossId --datasource-type AzureDatabaseForPostgreSQLFlexibleServer -l <vault-location> --policy-id <policy_arm_id> > OSSBkpInstance.JSON
40-
```
38+
```azurecli
39+
az dataprotection backup-instance initialize --datasource-id $ossId --datasource-type AzureDatabaseForPostgreSQLFlexibleServer -l <vault-location> --policy-id <policy_arm_id> > OSSBkpInstance.JSON
40+
```
4141
4242
3. Then submit the request to protect the server with Azure Backup.
4343
44-
```azurecli
45-
az dataprotection backup-instance create --resource-group testBkpVaultRG --vault-name TestBkpVault TestBkpvault --backup-instance .\OSSBkpInstance.JSON
46-
```
44+
```azurecli
45+
az dataprotection backup-instance create --resource-group testBkpVaultRG --vault-name TestBkpVault TestBkpvault --backup-instance .\OSSBkpInstance.JSON
46+
```
4747
4848
After the backup configuration is complete, you can [run an on-demand backup](back-up-azure-database-postgresql-flex-backup-cli.md#run-an-on-demand-backup) to create the first full backup for the database.
4949

articles/backup/quick-backup-postgresql-flexible-server-powershell.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ See the [permissions](.\backup-azure-database-postgresql-flex-overview.md#permis
3535

3636
2. Once all the required permissions are set, prepare the relevant request to configure backup for the PostgreSQL - Flexible server.
3737

38-
```azurecli
39-
$instance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDatabaseForPostgreSQLFlexibleServer -DatasourceLocation $TestBkpvault.Location -PolicyId $polOss[0].Id -DatasourceId $ossId ConvertTo-Json -InputObject $instance -Depth 4
40-
```
38+
```azurepowershell
39+
$instance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDatabaseForPostgreSQLFlexibleServer -DatasourceLocation $TestBkpvault.Location -PolicyId $polOss[0].Id -DatasourceId $ossId ConvertTo-Json -InputObject $instance -Depth 4
40+
```
4141
4242
3. Then submit the request to protect the server with Azure Backup.
4343
44-
```azurecli
45-
New-AzDataProtectionBackupInstance -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -BackupInstance $instance
46-
```
44+
```azurepowershell
45+
New-AzDataProtectionBackupInstance -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -BackupInstance $instance
46+
```
4747
4848
After the backup configuration is complete, you can [run an on-demand backup](back-up-azure-database-postgresql-flex-backup-powershell.md#run-an-on-demand-backup) to create the first full backup for the database.
4949

articles/backup/quick-backup-postgresql-flexible-server-terraform.md

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ Before you configure backup for Azure Database for PostgreSQL - Flexible Server,
2525

2626
* [Install and configure Terraform](/azure/developer/terraform/quickstart-configure).
2727

28-
* Log in to your Azure account and [authenticate to Azure](/azure/developer/terraform/authenticate-to-azure).
28+
* Sign in to your Azure account and [authenticate to Azure](/azure/developer/terraform/authenticate-to-azure).
2929

3030
>[!Note]
3131
>Terraform only supports authenticating to Azure with the Azure CLI. Authenticating using Azure PowerShell isn't supported. Therefore, while you can use the Azure PowerShell module when doing your Terraform work, you first need to authenticate to Azure.
3232
3333
## Implement the Terraform code
3434

3535
> [!NOTE]
36-
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
36+
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform).
3737
3838
1. Create a directory you can use to test the sample Terraform code and make it your current directory.
3939

@@ -58,120 +58,120 @@ Before you configure backup for Azure Database for PostgreSQL - Flexible Server,
5858
5959
3. Create a file named `main.tf` and insert the following code:
6060
61-
```code-terraform
61+
```code-terraform
6262
63-
# Step 1: Create the Backup Vault
64-
resource "azurerm_data_protection_backup_vault" "backup_vault" {
65-
name = var.backup_vault_name
66-
resource_group_name = var.backup_vault_resource_group
67-
location = var.region
63+
# Step 1: Create the Backup Vault
64+
resource "azurerm_data_protection_backup_vault" "backup_vault" {
65+
name = var.backup_vault_name
66+
resource_group_name = var.backup_vault_resource_group
67+
location = var.region
6868
69-
identity {
70-
type = "SystemAssigned"
71-
}
69+
identity {
70+
type = "SystemAssigned"
71+
}
7272
73-
storage_settings {
74-
datastore_type = "VaultStore"
75-
type = "LocallyRedundant"
76-
}
77-
}
73+
storage_settings {
74+
datastore_type = "VaultStore"
75+
type = "LocallyRedundant"
76+
}
77+
}
7878
79-
# Step 2: Create Backup Policy for PostgreSQL
80-
resource "azurerm_data_protection_backup_policy" "postgresql_backup_policy" {
81-
name = var.policy_name
82-
resource_group_name = var.backup_vault_resource_group
83-
vault_name = azurerm_data_protection_backup_vault.backup_vault.name
79+
# Step 2: Create Backup Policy for PostgreSQL
80+
resource "azurerm_data_protection_backup_policy" "postgresql_backup_policy" {
81+
name = var.policy_name
82+
resource_group_name = var.backup_vault_resource_group
83+
vault_name = azurerm_data_protection_backup_vault.backup_vault.name
8484
85-
rule {
86-
name = "BackupSchedule"
85+
rule {
86+
name = "BackupSchedule"
8787
88-
backup_parameters {
89-
object_type = "AzureBackupParams"
90-
}
88+
backup_parameters {
89+
object_type = "AzureBackupParams"
90+
}
9191
92-
trigger {
93-
schedule {
94-
recurrence_rule {
95-
frequency = "Weekly"
96-
interval = var.backup_schedule_frequency
92+
trigger {
93+
schedule {
94+
recurrence_rule {
95+
frequency = "Weekly"
96+
interval = var.backup_schedule_frequency
97+
}
98+
}
9799
}
98-
}
99-
}
100100
101-
data_store {
102-
datastore_type = "VaultStore"
103-
}
104-
}
101+
data_store {
102+
datastore_type = "VaultStore"
103+
}
104+
}
105105
106-
retention_rule {
107-
name = "RetentionRule"
108-
is_default = true
106+
retention_rule {
107+
name = "RetentionRule"
108+
is_default = true
109109
110-
lifecycle {
111-
delete_after {
112-
object_type = "AbsoluteDeleteOption"
113-
duration = format("P%dM", var.retention_duration_in_months)
110+
lifecycle {
111+
delete_after {
112+
object_type = "AbsoluteDeleteOption"
113+
duration = format("P%dM", var.retention_duration_in_months)
114+
}
115+
}
114116
}
115-
}
116-
}
117117
118-
depends_on = [
119-
azurerm_data_protection_backup_vault.backup_vault
120-
]
121-
}
118+
depends_on = [
119+
azurerm_data_protection_backup_vault.backup_vault
120+
]
121+
}
122122
123-
# Step 3: Role Assignment for PostgreSQL Flexible Server Long Term Retention Backup Role
124-
data "azurerm_postgresql_flexible_server" "postgresql_server" {
125-
name = var.postgresql_server_name
126-
resource_group_name = var.postgresql_resource_group
127-
}
123+
# Step 3: Role Assignment for PostgreSQL Flexible Server Long Term Retention Backup Role
124+
data "azurerm_postgresql_flexible_server" "postgresql_server" {
125+
name = var.postgresql_server_name
126+
resource_group_name = var.postgresql_resource_group
127+
}
128128
129-
resource "azurerm_role_assignment" "backup_role" {
130-
principal_id = azurerm_data_protection_backup_vault.backup_vault.identity[0].principal_id
131-
role_definition_name = "PostgreSQL Flexible Server Long Term Retention Backup Role"
132-
scope = data.azurerm_postgresql_flexible_server.PostgreSQL_server.id
129+
resource "azurerm_role_assignment" "backup_role" {
130+
principal_id = azurerm_data_protection_backup_vault.backup_vault.identity[0].principal_id
131+
role_definition_name = "PostgreSQL Flexible Server Long Term Retention Backup Role"
132+
scope = data.azurerm_postgresql_flexible_server.PostgreSQL_server.id
133133
134-
depends_on = [
135-
azurerm_data_protection_backup_policy.postgresql_backup_policy
136-
]
137-
}
134+
depends_on = [
135+
azurerm_data_protection_backup_policy.postgresql_backup_policy
136+
]
137+
}
138138
139-
# Step 4: Role Assignment for Reader on Resource Group
140-
data "azurerm_resource_group" "postgresql_resource_group" {
141-
name = var.postgresql_resource_group
142-
}
139+
# Step 4: Role Assignment for Reader on Resource Group
140+
data "azurerm_resource_group" "postgresql_resource_group" {
141+
name = var.postgresql_resource_group
142+
}
143143
144-
resource "azurerm_role_assignment" "reader_role" {
145-
principal_id = azurerm_data_protection_backup_vault.backup_vault.identity[0].principal_id
146-
role_definition_name = "Reader"
147-
scope = data.azurerm_resource_group.postgresql_resource_group.id
144+
resource "azurerm_role_assignment" "reader_role" {
145+
principal_id = azurerm_data_protection_backup_vault.backup_vault.identity[0].principal_id
146+
role_definition_name = "Reader"
147+
scope = data.azurerm_resource_group.postgresql_resource_group.id
148148
149-
depends_on = [
150-
azurerm_role_assignment.backup_role
151-
]
152-
}
153-
154-
# Step 5: Create Backup Instance for PostgreSQL
155-
resource "azurerm_data_protection_backup_instance" "postgresql_backup_instance" {
156-
name = "PostgreSQLBackupInstance"
157-
resource_group_name = var.backup_vault_resource_group
158-
vault_name = azurerm_data_protection_backup_vault.backup_vault.name
159-
location = var.region
149+
depends_on = [
150+
azurerm_role_assignment.backup_role
151+
]
152+
}
160153
161-
datasource {
162-
object_type = "Datasource"
163-
datasource_type = "AzureDatabaseForPostgreSQLFlexibleServer"
164-
resource_id = data.azurerm_PostgreSQL_flexible_server.postgresql_server.id
165-
}
154+
# Step 5: Create Backup Instance for PostgreSQL
155+
resource "azurerm_data_protection_backup_instance" "postgresql_backup_instance" {
156+
name = "PostgreSQLBackupInstance"
157+
resource_group_name = var.backup_vault_resource_group
158+
vault_name = azurerm_data_protection_backup_vault.backup_vault.name
159+
location = var.region
160+
161+
datasource {
162+
object_type = "Datasource"
163+
datasource_type = "AzureDatabaseForPostgreSQLFlexibleServer"
164+
resource_id = data.azurerm_PostgreSQL_flexible_server.postgresql_server.id
165+
}
166166
167-
policy_id = azurerm_data_protection_backup_policy.postgresql_backup_policy.id
167+
policy_id = azurerm_data_protection_backup_policy.postgresql_backup_policy.id
168168
169-
depends_on = [
170-
azurerm_role_assignment.reader_role
171-
]
172-
}
169+
depends_on = [
170+
azurerm_role_assignment.reader_role
171+
]
172+
}
173173
174-
```
174+
```
175175
176176
4. Create a file named `variables.tf` and insert the following code:
177177

includes/configure-postgresql-flexible-server-backup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: jsuri
1212

1313
For long-term retention of Azure PostgreSQL – Flexible Server backups using Azure Backup, you can use one of the following methods:
1414

15-
- Azure PostgreSQL – Flexible Server: Manage pane
15+
- Azure PostgreSQL – Flexible Server: Database manage pane
1616
- Backup vault
1717
- Azure Business Continuity Center
1818

@@ -24,13 +24,13 @@ To configure backup on the Azure Database for PostgreSQL - Flexible Server via A
2424

2525
Alternatively, for configuring backup from the **Backup vault** pane, go to the **Backup vault** > **Overview**, and then select **+ Backup**.
2626

27-
To configure backup from the **database** pane, go to the **PostgreSQL - flexible server** pane, and then select **Settings** > **LTR (Vaulted Backups)**.
27+
To configure backup from the **Database manage** pane, go to the **PostgreSQL - flexible server** pane, and then select **Settings** > **LTR (Vaulted Backups)**.
2828

2929
2. On the **Configure protection** pane, select **Resource managed by** as **Azure**, **Datasource type** as **Azure Database for PostgreSQL flexible servers**, and **Solution** as **Azure Backup**, and then select **Continue**.
3030

3131
:::image type="content" source="./media/configure-postgresql-flexible-server-backup/configure-protection-pane.png" alt-text="Screenshot shows the datasource and solution selection." lightbox="./media/configure-postgresql-flexible-server-backup/configure-protection-pane.png":::
3232

33-
3. On the **Configure Backup** pane, on the **Basics** tab, check if **Datasource type** appears as **Azure Database for PostgreSQL flexible servers**, choose an existing Backup vault from the **Select a Vault** dropdown list, and then select **Next**.
33+
3. On the **Configure Backup** pane, on the **Basics** tab, check if **Datasource type** appears as **Azure Database for PostgreSQL flexible servers**, click **Select vault** under **Vault** and choose an existing Backup vault from the dropdown list, and then select **Next**.
3434

3535
If you don't have a Backup vault, [create a new one](../articles/backup/create-manage-backup-vault.md#create-a-backup-vault).
3636

@@ -52,7 +52,7 @@ To configure backup on the Azure Database for PostgreSQL - Flexible Server via A
5252

5353
Once you're on the **Datasources** tab, the Azure Backup service validates if it has all the necessary access permissions to connect to the server. If one or more access permissions are missing, one of the following error messages appears – **User cannot assign roles** or **Role assignment not done**.
5454

55-
- **User cannot assign roles**: This message appears when you (the backup admin) don’t have the **write access** on the PostgreSQL - flexible Server as listed under **View details**. To assign the necessary permissions on the required resources, select **Download the assignment template** to fetch the ARM template, and run the template as a PostgreSQL database administrator. Once the template is run successfully, select **Re-validate**.
55+
- **User cannot assign roles**: This message appears when you (the backup admin) don’t have the **write access** on the PostgreSQL - flexible Server as listed under **View details**. To assign the necessary permissions on the required resources, select **Download role assignment template** to fetch the ARM template, and run the template as a PostgreSQL database administrator. Once the template is run successfully, select **Revalidate**.
5656

5757
:::image type="content" source="./media/configure-postgresql-flexible-server-backup/user-cannot-assign-role.png" alt-text="Screenshot shows the role assignment using a template." lightbox="./media/configure-postgresql-flexible-server-backup/user-cannot-assign-role.png":::
5858

690 Bytes
Loading
-284 Bytes
Loading

includes/postgresql-flexible-server-on-demand-backup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ To trigger an on-demand backup (that's not in the schedule specified in the poli
1717
:::image type="content" source="./media/postgresql-flexible-server-on-demand-backup/filter-datasource-type.png" alt-text="screenshot shows the selection of datasource type." lightbox="./media/postgresql-flexible-server-on-demand-backup/filter-datasource-type.png":::
1818

1919
2. Select the protected item to run an on-demand backup.
20-
3. On the **Protected item** pane, select **more** icon under the **Associated items** section, and then select **Backup now**.
20+
3. On the **Protected items** pane, select **more** icon under the **Associated items** section, and then select **Backup now**.
2121

2222
:::image type="content" source="./media/postgresql-flexible-server-on-demand-backup/run-on-demand-datasource-backup.png" alt-text="screenshot shows how to run an on-demand backup." lightbox="./media/postgresql-flexible-server-on-demand-backup/run-on-demand-datasource-backup.png":::
2323

24-
4. On the **Backup Now** pane, validate **Retention rules** as per the associated Backup policy, and then select **Backup now**.
24+
4. On the **Backup Now** pane, validate Retention rules as per the associated Backup policy, and then select **Backup now**.
2525

2626
:::image type="content" source="./media/postgresql-flexible-server-on-demand-backup/start-backup-now.png" alt-text="screenshot shows how to start the Backup now operation." lightbox="./media/postgresql-flexible-server-on-demand-backup/start-backup-now.png":::

0 commit comments

Comments
 (0)