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: azure-sql/database/backup-immutability-legal-hold.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to configure legal hold backup immutability for long-term
5
5
author: WilliamDAssafMSFT
6
6
ms.author: wiassaf
7
7
ms.reviewer: dinethi
8
-
ms.date: 09/29/2025
8
+
ms.date: 11/06/2025
9
9
ms.service: azure-sql-database
10
10
ms.subservice: backup-restore
11
11
ms.topic: how-to
@@ -35,7 +35,7 @@ For permissions to view, managed, and delete LTR backups, see [Manage Azure SQL
35
35
36
36
## Enable legal hold immutability for existing LTR backups
37
37
38
-
You can enable legal hold immutability on any existing backups. These backups are protected from any edits or deletes until the legal hold is explicitly removed.
38
+
You can enable legal hold immutability on any existing backups in the Azure portal, PowerShell, and Azure CLI. These backups are protected from any edits or deletes until the legal hold is explicitly removed.
39
39
40
40
> [!IMPORTANT]
41
41
> Legal hold backup immutability can apply only to existing backups. To make future backups automatically immutable, instead use [time-based immutability](backup-immutability-time-based.md).
@@ -56,19 +56,31 @@ You can enable legal hold immutability on any existing backups. These backups ar
56
56
57
57
**To enable legal hold backup immutability with PowerShell:**
58
58
59
+
Replace `<backup name>` with the unique identifier of the desired backup.
60
+
59
61
```powershell
60
62
Set-AzSqlDatabaseLongTermRetentionBackupLegalHold
61
63
-Location southeastasia
62
64
-ServerName myAzureSQL
63
65
-DatabaseName mysqldb
64
-
-BackupName 'myLTRbackup-1-24'
66
+
-BackupName '<backup name>'
67
+
```
68
+
69
+
#### [Azure CLI](#tab/azure-cli)
70
+
71
+
**To enable legal hold backup immutability with the Azure CLI:**
72
+
73
+
Replace `<backup name>` with the unique identifier of the desired backup.
74
+
75
+
```azurecli
76
+
az sql db ltr-backup set-legal-hold-immutability --resource-group mygroup --location southeastasia --server myserver --database mydb --name "<backup name>"
65
77
```
66
78
67
79
---
68
80
69
81
## Remove legal hold immutability
70
82
71
-
Legal hold immutability on specific backups can be disabled as follows:
83
+
Legal hold immutability on specific backups can be disabled in the Azure portal, PowerShell, and Azure CLI.
72
84
73
85
#### [Azure portal](#tab/azure-portal)
74
86
@@ -84,12 +96,24 @@ Legal hold immutability on specific backups can be disabled as follows:
84
96
85
97
**To remove legal hold immutability from a backup with PowerShell:**
86
98
99
+
Replace `<backup name>` with the unique identifier of the desired backup.
Copy file name to clipboardExpand all lines: azure-sql/database/backup-immutability-time-based.md
+45-5Lines changed: 45 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to configure time-based backup immutability for long-term
5
5
author: WilliamDAssafMSFT
6
6
ms.author: wiassaf
7
7
ms.reviewer: dinethi
8
-
ms.date: 09/29/2025
8
+
ms.date: 11/06/2025
9
9
ms.service: azure-sql-database
10
10
ms.subservice: backup-restore
11
11
ms.topic: how-to
@@ -38,6 +38,8 @@ For permissions to view, managed, and delete LTR backups, see [Manage Azure SQL
38
38
> [!IMPORTANT]
39
39
> Only backups taken after enabling and locking the policy will be immutable. To make existing backups immutable, instead use [legal hold immutability](backup-immutability-legal-hold.md).
40
40
41
+
You can create time-based immutability in the Azure portal, PowerShell, and Azure CLI.
42
+
41
43
#### [Azure portal](#tab/azure-portal)
42
44
43
45
**To enable and lock time-based immutability from the Azure portal:**
**To remove immutability on a backup with the Azure CLI:**
170
+
171
+
Replace `<backup name>` with the unique identifier of the desired backup.
172
+
173
+
```azurecli
174
+
az sql db ltr-backup remove-time-based-immutability --resource-group mygroup --location southeastasia --server myserver --database mydb --name "<backup name>"
175
+
```
143
176
144
177
---
145
178
146
179
## Disable immutability policy
147
180
148
-
Immutability can be disabled from the LTR policy configuration page in the Azure portaland PowerShell.
181
+
Immutability can be disabled from the LTR policy configuration page in the Azure portal, PowerShell, and Azure CLI.
149
182
150
183
Once immutability is disabled, any new LTR backups from this point won't be protected from immutability. Any existing LTR backups however, will continue to be immutable, if already locked as immutable.
0 commit comments