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-sql-restore-cli.md
+43-11Lines changed: 43 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
title: Restore SQL server databases in Azure VMs using Azure Backup via CLI
3
3
description: Learn how to use CLI to restore SQL server databases in Azure VMs in the Recovery Services vault.
4
4
ms.topic: how-to
5
-
ms.date: 08/11/2022
5
+
ms.date: 07/18/2023
6
6
ms.service: backup
7
7
ms.custom: devx-track-azurecli
8
-
author: jyothisuri
9
-
ms.author: jsuri
8
+
author: AbhishekMallick-MS
9
+
ms.author: v-abhmallick
10
10
---
11
11
12
12
# Restore SQL databases in an Azure VM using Azure CLI
@@ -24,11 +24,11 @@ In this article, you'll learn how to:
24
24
25
25
This article assumes you've an SQL database running on Azure VM that's backed-up using Azure Backup. If you've used [Back up an SQL database in Azure using CLI](backup-azure-sql-backup-cli.md) to back up your SQL database, then you're using the following resources:
26
26
27
-
* A resource group named *SQLResourceGroup*
28
-
* A vault named *SQLVault*
29
-
* Protected container named *VMAppContainer;Compute;SQLResourceGroup;testSQLVM*
30
-
* Backed-up database/item named *sqldatabase;mssqlserver;master*
31
-
* Resources in the *westus2* region
27
+
* A resource group named `SQLResourceGroup`.
28
+
* A vault named `SQLVault`.
29
+
* Protected container named `VMAppContainer;Compute;SQLResourceGroup;testSQLVM`.
30
+
* Backed-up database/item named `sqldatabase;mssqlserver;master`.
31
+
* Resources in the `westus` region.
32
32
33
33
>[!Note]
34
34
>See the [SQL backup support matrix](sql-support-matrix.md) to know more about the supported configurations and scenarios.
@@ -144,7 +144,7 @@ Name Operation Status Item Name
The response provides you the job name. You can use this job name to track the job status using [az backup job show](/cli/azure/backup/job#az-backup-job-show) command.
147
+
The response provides you with the job name. You can use this job name to track the job status using [az backup job show](/cli/azure/backup/job#az-backup-job-show) command.
148
148
149
149
## Restore and overwrite
150
150
@@ -199,7 +199,7 @@ Name Operation Status Item Name
The response provides you the job name. You can use this job name to track the job status using the [az backup job show](/cli/azure/backup/job#az-backup-job-show) command.
202
+
The response provides you with the job name. You can use this job name to track the job status using the [az backup job show](/cli/azure/backup/job#az-backup-job-show) command.
203
203
204
204
## Restore to a secondary region
205
205
@@ -359,11 +359,43 @@ The output appears as:
359
359
}
360
360
```
361
361
362
-
The response provides you the job name. You can use this job name to track the job status using the [az backup job show](/cli/azure/backup/job#az-backup-job-show) command.
362
+
The response provides you with the job name. You can use this job name to track the job status using the [az backup job show](/cli/azure/backup/job#az-backup-job-show) command.
363
363
364
364
> [!NOTE]
365
365
> If you don't want to restore the entire chain but only a subset of files, follow the steps as documented [here](restore-sql-database-azure-vm.md#partial-restore-as-files).
366
366
367
+
## Cross Subscription Restore
368
+
369
+
With Cross Subscription Restore (CSR), you have the flexibility of restoring to any subscription and any vault under your tenant if restore permissions are available. By default, CSR is enabled on all Recovery Services vaults (existing and newly created vaults).
370
+
371
+
>[!Note]
372
+
>- You can trigger Cross Subscription Restore from Recovery Services vault.
373
+
>- CSR is supported only for streaming based backup and is not supported for snapshot-based backup.
374
+
>- Cross Regional Restore (CRR) with CSR is not supported.
375
+
376
+
377
+
```azurecli
378
+
az backup vault create
379
+
380
+
```
381
+
382
+
Add the parameter `cross-subscription-restore-state` that enables you to set the CSR state of the vault during vault creation and updating.
383
+
384
+
```azurecli
385
+
az backup recoveryconfig show
386
+
387
+
```
388
+
389
+
Add the parameter `--target-subscription-id` that enables you to provide the target subscription as the input while triggering Cross Subscription Restore for SQL or HANA datasources.
Copy file name to clipboardExpand all lines: articles/backup/restore-sql-database-azure-vm.md
+32-6Lines changed: 32 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
title: Restore SQL Server databases on an Azure VM
3
3
description: This article describes how to restore SQL Server databases that are running on an Azure VM and that are backed up with Azure Backup. You can also use Cross Region Restore to restore your databases to a secondary region.
4
4
ms.topic: conceptual
5
-
ms.date: 02/20/2023
5
+
ms.date: 07/18/2023
6
6
ms.service: backup
7
-
author: jyothisuri
8
-
ms.author: jsuri
7
+
author: AbhishekMallick-MS
8
+
ms.author: v-abhmallick
9
9
---
10
10
# Restore SQL Server databases on Azure VMs
11
11
@@ -28,7 +28,7 @@ Azure Backup can restore SQL Server databases that are running on Azure VMs as f
28
28
Before you restore a database, note the following:
29
29
30
30
- You can restore the database to an instance of a SQL Server in the same Azure region.
31
-
- The destination server must be registered to the same vault as the source.
31
+
- The destination server must be registered to the same vault as the source. If you want to restore backups to a different vault, [enable Cross Subscription Restore](#cross-subscription-restore).
32
32
- If you have multiple instances running on a server, all the instances should be up and running. Otherwise the server won't appear in the list of destination servers for you to restore the database to. For more information, refer to [the troubleshooting steps](backup-sql-server-azure-troubleshoot.md#faulty-instance-in-a-vm-with-multiple-sql-server-instances).
33
33
- To restore a TDE-encrypted database to another SQL Server, you need to first [restore the certificate to the destination server](/sql/relational-databases/security/encryption/move-a-tde-protected-database-to-another-sql-server).
34
34
-[CDC](/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server) enabled databases should be restored using the [Restore as files](#restore-as-files) option.
@@ -203,7 +203,7 @@ To restore the database files to the *original path on the source server*, remov
203
203
```
204
204
205
205
>[!Note]
206
-
>You shouldn’t have the same database files on the target server (restore with replace). Also, you can [enable instant file initialization on the target server to reduce the file initialization time overhead](/sql/relational-databases/databases/database-instant-file-initialization?view=sql-server-ver16).
206
+
>You shouldn’t have the same database files on the target server (restore with replace). Also, you can [enable instant file initialization on the target server to reduce the file initialization time overhead](/sql/relational-databases/databases/database-instant-file-initialization?view=sql-server-ver16&preserve-view=true).
207
207
208
208
To relocate the database files from the target restore server, you can frame a TSQL command using the `MOVE` clauses.
209
209
@@ -220,7 +220,7 @@ To relocate the database files from the target restore server, you can frame a T
220
220
GO
221
221
```
222
222
223
-
If there are more than two files for the database, you can add additional `MOVE` clauses to the restore query. You can also use SSMS for database recovery using `.bak` files. [Learn more](/sql/relational-databases/backup-restore/restore-a-database-backup-using-ssms?view=sql-server-ver16).
223
+
If there are more than two files for the database, you can add additional `MOVE` clauses to the restore query. You can also use SSMS for database recovery using `.bak` files. [Learn more](/sql/relational-databases/backup-restore/restore-a-database-backup-using-ssms?view=sql-server-ver16&preserve-view=true).
224
224
225
225
>[!Note]
226
226
>For large database recovery, we recommend you to use TSQL statements. If you want to relocate the specific database files, see the list of database files in the JSON format created during the **Restore as Files** operation.
@@ -267,6 +267,32 @@ The secondary region restore user experience will be similar to the primary regi
267
267
268
268
:::image type="content" source="./media/backup-azure-sql-database/backup-center-jobs-inline.png" alt-text="Screenshot showing the filtered Backup jobs." lightbox="./media/backup-azure-sql-database/backup-center-jobs-expanded.png":::
269
269
270
+
271
+
272
+
## Cross Subscription Restore
273
+
274
+
Azure Backup now allows you to restore SQL database to any subscription (as per the following Azure RBAC requirements) from the restore point. By default, Azure Backup restores to the same subscription where the restore points are available.
275
+
276
+
With Cross Subscription Restore (CSR), you have the flexibility of restoring to any subscription and any vault under your tenant if restore permissions are available. By default, CSR is enabled on all Recovery Services vaults (existing and newly created vaults).
277
+
278
+
>[!Note]
279
+
>- You can trigger Cross Subscription Restore from Recovery Services vault.
280
+
>- CSR is supported only for streaming based backup and is not supported for snapshot-based backup.
281
+
>- Cross Regional Restore (CRR) with CSR is not supported.
| Restore database or restore as files |`Virtual Machine Contributor`| Source VM that got backed up | Instead of a built-in role, you can consider a custom role which has the following permissions: <br><br> - `Microsoft.Compute/virtualMachines/write` <br> - `Microsoft.Compute/virtualMachines/read`|
288
+
||`Virtual Machine Contributor`| Target VM in which the database will be restored or files are created. | Instead of a built-in role, you can consider a custom role that has the following permissions: <br><br> - `Microsoft.Compute/virtualMachines/write` <br> - `Microsoft.Compute/virtualMachines/read`|
By default, CSR is enabled on the Recovery Services vault. To update the Recovery Services vault restore settings, go to **Properties** > **Cross Subscription Restore** and make the required changes.
292
+
293
+
:::image type="content" source="./media/sap-hana-db-restore/cross-subscription-restore-settings-for-database.png" alt-text="Screenshot shows how to modify the Cross Subscription Restore settings on a Recovery Services vault for SQL database." lightbox="./media/sap-hana-db-restore/cross-subscription-restore-settings-for-database.png":::
294
+
295
+
270
296
## Next steps
271
297
272
298
[Manage and monitor](manage-monitor-sql-database-backup.md) SQL Server databases that are backed up by Azure Backup.
Copy file name to clipboardExpand all lines: articles/backup/sap-hana-database-restore.md
+51-4Lines changed: 51 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
title: Restore SAP HANA databases on Azure VMs
3
3
description: In this article, you'll learn how to restore SAP HANA databases that are running on Azure virtual machines. You can also use Cross Region Restore to restore your databases to a secondary region.
4
4
ms.topic: how-to
5
-
ms.date: 07/14/2023
5
+
ms.date: 07/18/2023
6
6
ms.service: backup
7
7
ms.custom: ignite-2022
8
-
author: jyothisuri
9
-
ms.author: jsuri
8
+
author: AbhishekMallick-MS
9
+
ms.author: v-abhmallick
10
10
---
11
11
12
12
# Restore SAP HANA databases on Azure VMs
@@ -169,7 +169,7 @@ To restore the backup data as files instead of a database, select **Restore as F
169
169
*`<LogFilesDir>`: The folder that contains the log backups, differential backups, and incremental backups. For Full BackUp Restore, because the log folder isn't created, add an empty directory.
170
170
* `<PathToPlaceCatalogFile>`: The folder where the generated catalog file must be placed.
171
171
172
-
d. Restore by using the newly generated catalog file through HANA Studio, or run the SAP HANA HDBSQL tool restore query with this newly generated catalog. The HDBSQL queries are listed here:
172
+
d. You can restore by using the newly generated catalog file through HANA Studio or run the SAP HANA HDBSQL tool restore query with this newly generated catalog. The HDBSQL queries are listed here:
173
173
174
174
* To open the HDBSQL prompt, run the following command:
175
175
@@ -356,6 +356,53 @@ The secondary region restore user experience is similar to the primary region re
356
356
357
357
:::image type="content" source="./media/sap-hana-db-restore/hana-view-jobs-inline.png" alt-text="Screenshot that shows filtered backup jobs." lightbox="./media/sap-hana-db-restore/hana-view-jobs-expanded.png":::
358
358
359
+
## Cross Subscription Restore
360
+
361
+
Azure Backup now allows you to restore SAP HANA Database to any subscription (as per the following Azure RBAC requirements) from the restore point. By default, Azure Backup restores to the same subscription where the restore points are available.
362
+
363
+
With Cross Subscription Restore (CSR), you have the flexibility of restoring to any subscription and any vault under your tenant if restore permissions are available. By default, CSR is enabled on all Recovery Services vaults (existing and newly created vaults).
364
+
365
+
>[!Note]
366
+
>- You can trigger Cross Subscription Restore from Recovery Services vault.
367
+
>- CSR is supported only for streaming/Backint-based backups and is not supported for snapshot-based backup.
368
+
>- Cross Regional Restore (CRR) with CSR is not supported.
| Restore database or restore as files |`Virtual Machine Contributor`| Source VM that got backed up | Instead of a built-in role, you can consider a custom role which has the following permissions: <br><br> - `Microsoft.Compute/virtualMachines/write`<br> - `Microsoft.Compute/virtualMachines/read`|
375
+
||`Virtual Machine Contributor`| Target VM in which the database will be restored or files are created. | Instead of a built-in role, you can consider a custom role that has the following permissions: <br><br> - `Microsoft.Compute/virtualMachines/write`<br> - `Microsoft.Compute/virtualMachines/read`|
By default, CSR is enabled on the Recovery Services vault. To update the Recovery Services vault restore settings, go to **Properties**>**Cross Subscription Restore** and make the required changes.
379
+
380
+
:::image type="content" source="./media/sap-hana-db-restore/cross-subscription-restore-settings-for-database.png" alt-text="Screenshot shows how to modify the Cross Subscription Restore settings on a Recovery Services vault for HANA database." lightbox="./media/sap-hana-db-restore/cross-subscription-restore-settings-for-database.png":::
381
+
382
+
**Cross Subscription Restore using Azure CLI**
383
+
384
+
```azurecli
385
+
az backup vault create
386
+
387
+
```
388
+
389
+
Add the parameter `cross-subscription-restore-state` that enables you to set the CSR state of the vault during vault creation and updating.
390
+
391
+
```azurecli
392
+
az backup recoveryconfig show
393
+
394
+
```
395
+
396
+
Add the parameter `--target-subscription-id` that enables you to provide the target subscription as the input while triggering Cross Subscription Restore for SQL or HANA datasources.
Copy file name to clipboardExpand all lines: articles/backup/tutorial-sap-hana-backup-cli.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.author: jsuri
11
11
12
12
# Tutorial: Back up SAP HANA databases in an Azure VM using Azure CLI
13
13
14
-
This tutorial describes how to back up SAP HANA database instance and SAP HANA System Replication (HSR) instance (preview) using Azure CLI.
14
+
This tutorial describes how to back up SAP HANA database instance and SAP HANA System Replication (HSR) instance using Azure CLI.
15
15
16
16
Azure CLI is used to create and manage Azure resources from the Command Line or through scripts. This documentation details how to back up an SAP HANA database and trigger on-demand backups - all using Azure CLI. You can also perform these steps using the [Azure portal](./backup-azure-sap-hana-database.md).
17
17
@@ -64,7 +64,7 @@ Location Name ResourceGroup
64
64
westus2 saphanaVault saphanaResourceGroup
65
65
```
66
66
67
-
# [HSR (preview)](#tab/hsr)
67
+
# [HSR](#tab/hsr)
68
68
69
69
To create the Recovery Services vault for HSR instance protection, run the following command:
70
70
@@ -113,7 +113,7 @@ To register and protect database instance, follow these steps:
113
113
> The column “name” in the above output refers to the container name. This container name will be used in the next sections to enable backups and trigger them. Which in this case, is *VMAppContainer;Compute;saphanaResourceGroup;saphanaVM*.
114
114
115
115
116
-
# [HSR (preview)](#tab/hsr)
116
+
# [HSR](#tab/hsr)
117
117
118
118
To register and protect database instance, follow these steps:
119
119
@@ -217,7 +217,7 @@ To get container name, run the following command. [Learn about this CLI command]
217
217
218
218
```
219
219
220
-
# [HSR (preview)](#tab/hsr)
220
+
# [HSR](#tab/hsr)
221
221
222
222
To enable database instance backup, follow these steps:
223
223
@@ -292,7 +292,7 @@ The response will give you the job name. This job name can be used to track the
292
292
>[!NOTE]
293
293
>Log backups are automatically triggered and managed by SAP HANA internally.
294
294
295
-
# [HSR (preview)](#tab/hsr)
295
+
# [HSR](#tab/hsr)
296
296
297
297
To run an on-demand backup, run the following command:
0 commit comments