Skip to content

Commit 88a606d

Browse files
Merge pull request #264084 from AbhishekMallick-MS/Jan-24-2024-SQL
SQL AG protection updates
2 parents 5ce0a46 + b64d3c9 commit 88a606d

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

articles/backup/backup-sql-server-on-availability-groups.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Back up SQL Server always on availability groups
33
description: In this article, learn how to back up SQL Server on availability groups.
44
ms.topic: conceptual
5-
ms.date: 08/11/2022
5+
ms.date: 01/25/2024
66
author: AbhishekMallick-MS
77
ms.author: v-abhmallick
88
---
@@ -23,7 +23,7 @@ The backup preference used by Azure Backup SQL AG supports full and differential
2323
| Prefer Secondary | Primary replica | Secondary replicas are preferred, but backups can run on primary replica also. |
2424
| None/Any | Primary replica | Any replica |
2525

26-
The workload backup extension gets installed on the node when it is registered with the Azure Backup service. When an AG database is configured for backup, the backup schedules are pushed to all the registered nodes of the AG. The schedules fire on all the AG nodes and the workload backup extensions on these nodes synchronize between themselves to decide which node will perform the backup. The node selection depends on the backup type and the backup preference as explained in section 1.
26+
The workload backup extension gets installed on the node when it's registered with the Azure Backup service. When an AG database is configured for backup, the backup schedules are pushed to all the registered nodes of the AG. The schedules fire on all the AG nodes and the workload backup extensions on these nodes synchronize between themselves to decide which node will perform the backup. The node selection depends on the backup type and the backup preference as explained in section 1.
2727

2828
The selected node proceeds with the backup job, whereas the job triggered on the other nodes bails out, that is, it skips the job.
2929

@@ -50,7 +50,7 @@ Based on the above sample AG deployment, following are various considerations:
5050
- VM4 can't be registered to Vault 1 as it's in a different region.
5151
- If the backup preference is _secondary only_, VM1 (Primary) and VM2 (Secondary) must be registered to the Vault 1 (because full backups require the primary node and logs require a secondary node). For other backup preferences, VM1 (Primary) must be registered to Vault 1, VM2 is optional (because all backups can run on primary node).
5252
- While VM3 could be registered to vault 2 in subscription 2 and the AG databases would then show up for protection in vault 2 but due to absence of the primary node in vault 2, configuring backups would fail.
53-
- Similarly, while VM4 could be registered to vault 4 in region 2, configuring backups would fail since the primary node is not registered in vault 4.
53+
- Similarly, while VM4 could be registered to vault 4 in region 2, configuring backups would fail since the primary node isn't registered in vault 4.
5454

5555
## Handle failover
5656

@@ -72,19 +72,19 @@ Based on the above sample AG deployment, following are the various failover poss
7272
- If the backup preference isn't secondary-only, backups can be configured now in Vault 2, because the primary node is registered in this vault. But this can lead to conflicts/backup failures. More about this in [Configure backups for a multi-region AG](#configure-backups-for-a-multi-region-ag).
7373
- Failover to VM4 (another region)
7474
- As backups aren't configured in Vault 4, no backups would happen.
75-
- If the backup preference is not secondary-only, backups can be configured now in Vault 4, because the primary node is registered in this vault. But this can lead to conflicts/backup failures. More about this in [Configure backups for a multi-region AG](#configure-backups-for-a-multi-region-ag).
75+
- If the backup preference isn't secondary-only, backups can be configured now in Vault 4, because the primary node is registered in this vault. But this can lead to conflicts/backup failures. More about this in [Configure backups for a multi-region AG](#configure-backups-for-a-multi-region-ag).
7676

7777
## Configure backups for a multi-region AG
7878

7979
Recovery services vault doesn’t support cross-subscription or cross-region backups. This section summarizes how to enable backups for AGs that are spanning subscriptions or Azure regions and the associated considerations.
8080

81-
- Evaluate if you really need to enable backups from all nodes. If one region/subscription has most of the AG nodes and failover to other nodes happens very rarely, setting up the backup in that first region may be enough. If the failovers to other region/subscription happen frequently and for prolonged duration, then you may want to set aup backups proactively in the other region as well.
81+
- Evaluate if you really need to enable backups from all nodes. If one region/subscription has most of the AG nodes and failover to other nodes happens very rarely, setting up the backup in that first region may be enough. If the failovers to other region/subscription happen frequently and for prolonged duration, then you may want to set up backups proactively in the other region as well.
8282

8383
- Each vault where the backup gets enabled will have its own set of recovery point chains. Restores from these recovery points can be done to VMs registered in that vault only.
8484

8585
- Full/differential backups will happen successfully only in the vault that has the primary node. These backups in other vaults will keep failing.
8686

87-
- Log backups will keep working in the previous vault till a log backup runs in the new vault (that is, in the vault where the new primary node is present) and _breaks_ the log chain for old vault.
87+
- Log backups will keep working in the previous vault till a log backup runs in the new vault (that's, in the vault where the new primary node is present) and _breaks_ the log chain for old vault.
8888
>[!Note]
8989
>There's a hard limit of 15 days beyond which log backups will start failing.
9090
@@ -164,14 +164,31 @@ The database must be configured for protection from under the standalone instanc
164164

165165
When a new node gets added to an AG that is configured for backups, the workload backup extensions running on the already registered AG nodes detect the AG topology change and inform the Azure Backup service during the next scheduled database discovery job. When this new node gets registered for backups to the same Recovery Services vault as the other existing nodes, Azure Backup service triggers a workflow that configures this new node with the necessary metadata for performing AG backups.
166166

167-
After this, the new node syncs the AG backup schedule information from the Azure Backup service and starts participating in the synchronized backup process. If the new node is not able to sync the backup schedules and participate in backups, triggering a re-registration on the node forces reconfiguration of the node for AG backups as well. Similarly, node addition, the workload extensions detect the AG topology change in this case and inform the Azure Backup service. The service starts a node _un-configuration_ workflow in the removed node to clear the backup schedules for AG databases and delete the AG related metadata.
167+
After this, the new node syncs the AG backup schedule information from the Azure Backup service and starts participating in the synchronized backup process. If the new node isn't able to sync the backup schedules and participate in backups, triggering a re-registration on the node forces reconfiguration of the node for AG backups as well. Similarly, node addition, the workload extensions detect the AG topology change in this case and inform the Azure Backup service. The service starts a node _un-configuration_ workflow in the removed node to clear the backup schedules for AG databases and delete the AG related metadata.
168168

169169
## Un-register an AG node from Azure Backup
170170

171171
If a node is part of an AG that has one or more databases configured for backup, then Azure Backup doesn’t allow un-registration of that node. This is to prevent future backup failures in case the backup preference can’t be met without this node. To unregister the node, first you need to remove it from the AG. When the node _un-configuration_ workflow completes, cleaning up that node, you can unregister it.
172172

173-
Restore a database from Azure Backup to an AG
174-
SQL Availability Groups do not support directly restoring a database into AG. The database needs to be restored to a standalone SQL instance and then needs to be joined to an AG.
173+
Restore a database from Azure Backup to an AG SQL Availability Groups don't support directly restoring a database into AG. The database needs to be restored to a standalone SQL instance and then needs to be joined to an AG.
174+
175+
176+
177+
178+
## Availability group re-creation scenarios for the SQL database server
179+
180+
Re-creation of Availability group (AG), duplicate AGs, and the backup items get listed as *protectable items* or *protected items* in the following scenarios:
181+
182+
- Re-creating AGs that are already protected appear as duplicate AGs on the **Configure Backup** page and in the **Protected items** list. If you want to retain the backup data that is already present in the older AG, then stop the backup by using the **Stop protection and retain data** option before re-creating and scheduling backups on the new AG items.
183+
184+
By design, Azure Backup lists the duplicate items on the **Protected items list**, and the **Configure Backup** page or **Protectable item list** and displays these items until you want to retain the backup data.
185+
186+
- If you don't want the backup data from the older AG, then stop the backup operation by using the **Stop protection and delete data** option for the older item before re-creating and scheduling backups on the new AG.
187+
188+
>[!Caution]
189+
>Stop protection and delete data is a destructive operation.
190+
191+
- You can recreate the AG after performing one of the above Stop protection process to avoid backup failures.
175192

176193
## Next steps
177194

0 commit comments

Comments
 (0)