Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit b1d74af

Browse files
authored
Merge pull request #30074 from MicrosoftDocs/release-arc-data
Arc SQL March 2024 release--scheduled release at 3PM of 3/12
2 parents e43c478 + 4da8dd3 commit b1d74af

2 files changed

Lines changed: 162 additions & 42 deletions

File tree

docs/sql-server/azure-arc/backup-local.md

Lines changed: 153 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Manage automated backups from Azure portal
2+
title: Manage automated backups
33
description: Describes how to configure automated backups
44
author: AbdullahMSFT
55
ms.author: amamun
66
ms.reviewer: mikeray, randolphwest
7-
ms.date: 11/14/2023
7+
ms.date: 3/12/2024
88
ms.topic: conceptual
99
ms.custom: ignite-2023, devx-track-azurecli
1010
---
1111

12-
# Manage automated backups - SQL Server enabled by Azure Arc
12+
# Manage automated backups - SQL Server enabled by Azure Arc (preview)
1313

1414
[!INCLUDE [sqlserver](../../includes/applies-to-version/sqlserver.md)]
1515

16-
The Azure extension for [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] can perform backups automatically for the system and user databases that are part of the instance of [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] enabled by Azure Arc.
16+
The Azure extension for [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] can perform backups automatically for the system and user databases of the instance of [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] enabled by Azure Arc.
1717

1818
This article explains how you can:
1919

@@ -22,35 +22,49 @@ This article explains how you can:
2222

2323
[!INCLUDE [azure-arc-sql-preview](includes/azure-arc-sql-preview.md)]
2424

25-
Automated backups are disabled by default.
25+
Backup files are stored in the default backup location of the SQL instance.
26+
27+
You can enable automated backups through Azure portal or via `az` CLI.
2628

27-
You can enable automated backups through Azure portal or via `az` CLI by setting the retention days property to a value between 1 and 35 days.
29+
To enable automated backups, set the retention days to a nonzero value.
2830

2931
### Supported license types
3032

31-
Automated backups are only supported for license types of PAID or PAYG.
33+
Automated backups are only available for licenses with Software Assurance, SQL subscription, or pay-as-you-go. For details, see [Feature availability depending on license type](overview.md#feature-availability-depending-on-license-type).
3234

3335
## Backup frequency and retention days
3436

35-
Two properties can be configured when you enable automated backups:
37+
You can configure two properties for automated backups:
3638

37-
- **retention days** - number of days to retain the backup files. Use a number between 1 and 35.
38-
- **backup schedule** - the schedule at which the full, differential, and transaction log backups should be performed. Full backups can be configured to run on a daily or weekly basis. Differential backups can be configured to run either every 12 hours or every 24 hours. Transaction log backups can be configured to run in increments of 5 minutes.
39+
- **retention days** - number of days to retain the backup files. Use a number between 1 and 35. If the backup retention day is set to 0, automated backup is disabled and no backups are taken, even though backup policy is retained.
40+
- **backup schedule** - the schedule at which the full, differential, and transaction log backups should be performed. Depends on backup type:
41+
- Full backups: Daily or weekly
42+
- Differential backups: Every 12 hours or every 24 hours
43+
- Transaction log backups: Increments of 5 minutes.
3944

40-
Backups can also be configured to run on a **default** schedule which is as follows:
45+
You can also run backups on a **default** schedule:
4146

47+
- Retention period: 7 days
4248
- Full backups: every 7 days
4349
- Differential backups: every 24 hours
44-
- Transaction log backups: every 15 minutes
50+
- Transaction log backups: every 5 minutes
51+
52+
## Backup schedule level
53+
54+
You can schedule backups at
55+
56+
- Instance level
57+
- Database level (available from [extension version 1.1.2594.118](release-notes.md#march-12-2024) or later)
58+
59+
If both database and instance level backup schedule is set, database level schedule takes precedence over the instance level backup schedule. If you delete the database level backup schedule, the instance level backup schedule applies.
4560

4661
## Assign permissions
4762

48-
The backup service within the Azure extension for Arc-enabled SQL Server uses [NT AUTHORITY\SYSTEM] account to perform the backups. If you are [operating SQL Server enabled by Arc with least privilege](configure-least-privilege.md), backup is performed by local Windows account [NT Service\SQLServerExtension].
49-
50-
If you are using Azure extension for SQL Server [version 1.1.2504.99](release-notes.md#november-14-2023) or later, the necessary permissions are granted to [NT AUTHORITY\SYSTEM] automatically and you do not need to perform any additional steps to assign permissions.
51-
52-
**For earlier extensions only**, follow the below steps to assign permission to [NT AUTHORITY\SYSTEM] account.
63+
The backup service within the Azure extension for Arc-enabled SQL Server uses [NT AUTHORITY\SYSTEM] account to perform the backups. If you're [operating SQL Server enabled by Arc with least privilege](configure-least-privilege.md), A local Windows account - [NT Service\SQLServerExtension] - performs the backup.
5364

65+
If you use Azure extension for SQL Server [version 1.1.2504.99](release-notes.md#november-14-2023) or later, the necessary permissions are granted to [NT AUTHORITY\SYSTEM] automatically. You don't need to assign permissions manually.
66+
67+
**For earlier extensions only**, follow the below steps to assign permission to [NT AUTHORITY\SYSTEM] account.
5468

5569
> [!NOTE]
5670
> This requirement applies to the preview release.
@@ -79,15 +93,21 @@ If you are using Azure extension for SQL Server [version 1.1.2504.99](release-no
7993

8094
1. Run the preceding code for each user and system database (except `tempdb`).
8195

82-
## Enable automated backups
96+
## Configure automated backups
8397

84-
After you have assigned permissions, you can enable automated backups.
98+
Automated backups are disabled by default.
99+
100+
After you assigned permissions, you can schedule automated backups. After the automated backups are configured, the Arc SQL extension initiates a backup to the default backup location.
101+
102+
The backups are native SQL Server backups, so all backup history is available in the backup related tables in the msdb database.
103+
104+
### Instance level
85105

86106
### [Azure portal](#tab/azure)
87107

88108
To enable automated backups in Azure portal:
89109

90-
1. Disable any existing backup routines.
110+
1. Disable any existing external backup routines.
91111
1. Browse to the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] you want to enable automated backups.
92112
1. Select **Backups**.
93113
1. Select **Configure policies**.
@@ -96,55 +116,146 @@ To enable automated backups in Azure portal:
96116
- Set a schedule for the full, differential, and transactional log backups.
97117
1. Select **Apply** to enable this configuration.
98118

99-
Once the automated backups are configured, the Arc SQL extension will initiate a backup of all the databases to the default backup location configured.
100-
101-
Once the backups are enabled, a full backup for each user database is initiated right away. The backups are native [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] backups which means all backup history is available in the backup related tables in the `msdb` database.
119+
Set retention period and frequency to meet business requirements. The retention policy should be greater than the full backup frequency. As a measure of safety, the automated backup process always keeps backups sets of at least one full backup frequency plus the retention days.
102120

103121
### [Azure CLI](#tab/az)
104122

105123
To enable automated backups using `az` CLI:
106124

107125
1. Disable any existing backup routines.
108-
1. After you disable existing backup routines, run the following command:
109-
110-
a. Add the extension:
126+
1. If necessary, add the arcdata extension:
111127

112128
```azurecli
113-
--Install the arcdata extension if not already done
114129
az extension add --name arcdata
115130
```
116131

117-
b. Configure either the default schedule or a custom schedule:
132+
1. Configure either the default schedule or a custom schedule:
118133

119134
**Default schedule**
120135

121136
```azurecli
122-
az sql server-arc backups-policy set --name <arc-server-name> --resource-group <resourcegroup> --retention-days <retentiondays>
137+
az sql server-arc backups-policy set --name <arc-server-name> --resource-group <resourcegroup> --default-policy
123138
```
124139
125140
Example:
126141
127142
```azurecli
128-
az sql server-arc backups-policy set --name MyArcServer_SQLServerPROD --resource-group my-rg --retention-days 24
143+
az sql server-arc backups-policy set --name MyArcServer_SQLServerPROD --resource-group MyResourceGroup --default-policy
129144
```
130145
131146
**Custom schedule**
132147
133148
```azurecli
134-
az sql server-arc backups-policy set --name <arc-server-name> --resource-group <resourcegroup> --retention-days <retentiondays> --full-backup-days <num of days> --diff-backup-hours <12 or 24 hours> --tlog-backup-mins <num in minutes>
149+
az sql server-arc backups-policy set --name <arc-server-name> --resource-group <resourcegroup> --retention-days <number of days> --full-backup-days <num of days> --diff-backup-hours <12 or 24 hours> --tlog-backup-mins <number of minutes>
135150
```
136151
137152
Example:
138153
139154
```azurecli
140-
az sql server-arc backups-policy set --name MyArcServer_SQLServerPROD --resource-group my-rg --retention-days 24 --full-backup-days 7 --diff-backup-hours 24 --tlog-backup-mins 30
155+
az sql server-arc backups-policy set --name MyArcServer_SQLServerPROD --resource-group MyResourceGroup --retention-days 24 --full-backup-days 7 --diff-backup-hours 24 --tlog-backup-mins 30
141156
```
142157
158+
> [!NOTE]
159+
> If the backup retention day is set to 0, automated backup is disabled and no backups are taken.
160+
143161
---
144162
163+
### Database level
164+
165+
### [Azure portal](#tab/azure)
166+
167+
To configure individual custom database level backup in the portal:
168+
169+
1. Select the instance
170+
1. Select the database
171+
1. Under **Data management** on the left
172+
1. Select **Backup (preview) - Configure database backup policies (Preview)**
173+
1. Select **Configure policies**.
174+
1. Under **Configure policies**:
175+
- Set a value for backup retention days - between 1 and 35.
176+
- Set a schedule for the full, differential, and transactional log backups.
177+
1. Select **Apply** to enable this configuration.
178+
179+
Set retention period and frequency to meet business requirements. The retention policy should be greater than the full backup frequency. As a measure of safety, the automated backup process always keeps backups sets of at least one full backup frequency plus the retention days.
180+
181+
### [Azure CLI](#tab/az)
182+
183+
To enable automated backups on a database level using az CLI:
184+
185+
1. Disable any existing backup routines.
186+
2. If necessary, add the arcdata extension:
187+
188+
```azurecli
189+
az extension add --name arcdata
190+
```
191+
192+
1. Configure either the default schedule or a custom schedule:
193+
194+
**Default schedule**
195+
196+
```azurecli
197+
az sql db-arc backups-policy set --name <sql-database-name> --server <arc-server-name> --resource-group <resourcegroup> --default-policy
198+
```
199+
200+
Example:
201+
202+
```azurecli
203+
az sql db-arc backups-policy set --name MyDatabaseName--server MyArcServer_SQLServerPROD --resource-group MyResourceGroup --default-policy
204+
```
205+
206+
**Custom schedule**
207+
208+
```azurecli
209+
az sql db-arc backups-policy set --name <sql-database-name> --server <arc-server-name> --resource-group <resourcegroup> --retention-days <number of days> --full-backup-days <num of days> --diff-backup-hours <12 or 24 hours> --tlog-backup-mins <number of minutes>
210+
```
211+
212+
Example:
213+
214+
```azurecli
215+
az sql db-arc backups-policy set --name MyDatabaseName --server MyArcServer_SQLServerPROD --resource-group MyResourceGroup --retention-days 30 --full-backup-days 7 --diff-backup-hours 12 --tlog-backup-mins 10
216+
```
217+
218+
---
219+
220+
## Disable automated backup
221+
222+
If the backup retention day is set to 0, automated backup is disabled and no backups are taken, even though backup policy is retained. Setting the backup retention to a nonzero value enables the policy again.
223+
224+
This setting applies to both database and instance level backup. If database level backup schedule is disabled, no backups are taken for the database even if instance level backup is scheduled.
225+
226+
## Delete automated backup
227+
228+
From the portal for individual database level backup scheduling page, select **Revert backup policy to instance level** to delete the database level backup policy.
229+
230+
To delete instance level backup schedule, you can do it through CLI. Once deleted, no backup is taken either in instance level or database level. You must configure a new backup schedule to take the backup again.
231+
232+
### Delete Instance Level Policy
233+
234+
```azurecli
235+
az sql server-arc backups-policy delete --name <arc-server-name> --resource-group <resourcegroup>
236+
```
237+
238+
Example:
239+
240+
```azurecli
241+
az sql server-arc backups-policy delete --name MyArcServer_SQLServerPROD --resource-group MyResourceGroup
242+
```
243+
244+
### Delete Database Level Policy
245+
246+
```azurecli
247+
az sql db-arc backups-policy delete --name <sql-database-name> --server <arc-server-name> --resource-group <resourcegroup>
248+
```
249+
250+
Example:
251+
252+
```azurecli
253+
az sql db-arc backups-policy delete --name MyDatabaseName --server MyArcServer_SQLServerPROD --resource-group MyResourceGroup
254+
```
255+
145256
## View current backup policy
146257

147-
To view the current backup policy for a given Arc-enabled [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)], run the following command:
258+
To view the current backup policy for a [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)], run the following command:
148259

149260
```azurecli
150261
az sql server-arc backups-policy show --name <arc-server-name> --resource-group <resourcegroup>
@@ -153,7 +264,7 @@ az sql server-arc backups-policy show --name <arc-server-name> --resource-group
153264
Example:
154265

155266
```azurecli
156-
az sql server-arc backups-policy show --name MyArcServer_SQLServerPROD --resource-group my-rg
267+
az sql server-arc backups-policy show --name MyArcServer_SQLServerPROD --resource-group MyResourceGroup
157268
```
158269

159270
Output:
@@ -175,7 +286,7 @@ When the built-in automated backups are enabled on an instance of [!INCLUDE [ssn
175286
## Considerations
176287

177288
- The backup files are stored in the default backup location.
178-
- To find the default backup location for a [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance (on [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)] and later) run:
289+
- To find the default backup location for a [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instance (on [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)] and later), run:
179290

180291
```sql
181292
SELECT SERVERPROPERTY('InstanceDefaultBackupPath');
@@ -186,19 +297,20 @@ When the built-in automated backups are enabled on an instance of [!INCLUDE [ssn
186297
1. Connect to the Arc-enabled SQL Server from SSMS.
187298
1. Go to **Server properties** > **Database Settings** > **Database default locations**.
188299

189-
- The backup policy is configured at the instance level and applies to all the databases on the instance.
300+
- The backup policy configured at the instance level applies to all the databases on the instance.
301+
- If both database and instance level backup schedules are set, database level takes precedence over the instance level backup schedule. Deleting the database level backup schedule reverts back to instance level backup schedule, if there's any.
190302
- The value for `--name` should be the name of the [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] enabled by Azure Arc, which is usually in the `[Servername_SQLservername]` format.
191303
- The value for `--retention-days` can be from 0-35.
192-
- A value of `0` for `--retention-days` indicates to not perform automated backups for the instance.
193-
- The backup files are written to the default backup location as configured at the instance level.
304+
- A value of `0` for `--retention-days` indicates to not perform automated backups for the instance or the database.
305+
- The backup files are written to the default backup location as configured at the SQL Server instance level.
194306
- If there are multiple [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] instances on the same host where the Azure extension for [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] is installed, you need to configure automated backups separately for each instance.
195-
- If you change the `--retention-days` after the `--backups-policy` is already configured, any change will take effect going forward and isn't retroactively applied.
307+
- If you change the `--retention-days` after the `--backups-policy` is already configured, any change takes effect going forward and isn't retroactively applied.
196308

197309
## Limitations
198310

311+
- The user databases need to be in full recovery model for the backups to be performed. Databases that aren't in full recovery model aren't automatically backed up.
199312
- Automated backups are currently not supported for Always On failover cluster instances (FCI).
200-
- Automated backups are not supported on any instance that hosts an availability group (AG) replica.
201-
- The user databases need to be in full recovery model for the backups to be performed. Databases that aren't in full recovery model are not automatically backed up.
313+
- Automated backups aren't supported on any instance that hosts an availability group (AG) replica.
202314
- Automated backups are only available for licenses with Software Assurance, SQL subscription, or pay-as-you-go. For details, see [Feature availability depending on license type](overview.md#feature-availability-depending-on-license-type).
203315

204316
## Related tasks

docs/sql-server/azure-arc/release-notes.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Latest release notes for SQL Server enabled by Azure Arc
44
author: anosov1960
55
ms.author: sashan
66
ms.reviewer: mikeray, randolphwest
7-
ms.date: 02/15/2024
7+
ms.date: 03/12/2024
88
ms.topic: conceptual
99
ms.custom: ignite-2023
1010
---
@@ -13,6 +13,14 @@ ms.custom: ignite-2023
1313

1414
[!INCLUDE [sqlserver](../../includes/applies-to-version/sqlserver.md)]
1515

16+
## March, 12 2024
17+
18+
**Extension version**: `1.1.2620.127`
19+
20+
## Backup management
21+
22+
- Schedule backup at instance level or database level. For details, review [Backup schedule level](backup-local.md#backup-schedule-level).
23+
1624
## February 13, 2024
1725

1826
**Extension version**: `1.1.2594.118`

0 commit comments

Comments
 (0)