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
For the SAP HANA instance (the VM with SAP HANA installed on it) to be discovered by the Azure services, a [pre-registration script](https://aka.ms/scriptforpermsonhana) must be run on the SAP HANA machine. Make sure that all the [prerequisites](https://docs.microsoft.com/azure/backup/tutorial-backup-sap-hana-db#prerequisites) are met before running the script. To learn more about what the script does, refer to the [setting up permissions](https://docs.microsoft.com/azure/backup/tutorial-backup-sap-hana-db#setting-up-permissions) section.
67
67
68
-
Once the script is run, the SAP HANA instance can be registered with the recovery services vault we created earlier. To register the instance, use the [az backup container register]() cmdlet. *VMResourceId* is the resource ID of the VM that you created to install SAP HANA.
68
+
Once the script is run, the SAP HANA instance can be registered with the recovery services vault we created earlier. To register the instance, use the [az backup container register](https://docs.microsoft.com/cli/azure/backup/container?view=azure-cli-latest#az-backup-container-register) cmdlet. *VMResourceId* is the resource ID of the VM that you created to install SAP HANA.
69
69
70
70
```azurecli-interactive
71
71
az backup container register --resource-group saphanaResourceGroup \
>If the VM is not in the same resource group as the vault, then *saphanaResourceGroup* refers to the resource group where the vault was created.
81
81
82
-
Registering the SAP HANA instance automatically discovers all its current databases. However, to discover any new databases that may be added in the future refer to the [Discovering new databases added to the registered SAP HANA]() instance section.
82
+
Registering the SAP HANA instance automatically discovers all its current databases. However, to discover any new databases that may be added in the future refer to the [Discovering new databases added to the registered SAP HANA](tutorial-sap-hana-manage-cli.md#protect-new-databases-added-to-an-sap-hana-instance) instance section.
83
83
84
-
To check if the SAP HANA instance is successfully registered with your vault, use the [az backup container list]() cmdlet. You'll see the following response:
84
+
To check if the SAP HANA instance is successfully registered with your vault, use the [az backup container list](https://docs.microsoft.com/cli/azure/backup/container?view=azure-cli-latest#az-backup-container-list) cmdlet. You'll see the following response:
85
85
86
86
```output
87
87
Name Friendly Name Resource Group Type Registration Status
@@ -93,7 +93,7 @@ Note that “name” in the above output refers to the container name, this cont
93
93
94
94
## Enable backup on SAP HANA database
95
95
96
-
The [az backup protectable-item list]() cmdlet lists out all the databases discovered on the SAP HANA instance that you registered in the previous step.
96
+
The [az backup protectable-item list](https://docs.microsoft.com/cli/azure/backup/protectable-item?view=azure-cli-latest#az-backup-protectable-item-list) cmdlet lists out all the databases discovered on the SAP HANA instance that you registered in the previous step.
97
97
98
98
```azurecli-interactive
99
99
az backup protectable-item list --resource-group saphanaResourceGroup \
As you can see from the above output, the SID of the SAP HANA system is HXE. In this tutorial, we'll configure backup for the *saphanadatabase;hxe;hxe* database that resides on the *hxehost* server.
116
116
117
-
To protect and configure backup on a database, one at a time, we use the [az backup protection enable-for-azurewl]() cmdlet. Provide the name of the policy that you want to use. To create a policy using CLI, use the [az backup policy create](https://docs.microsoft.com//cli/azure/backup/policy?view=azure-cli-latest#az-backup-policy-create) cmdlet. For this tutorial, we'll be using the *sapahanaPolicy* policy.
117
+
To protect and configure backup on a database, one at a time, we use the [az backup protection enable-for-azurewl](https://docs.microsoft.com/cli/azure/backup/protection?view=azure-cli-latest#az-backup-protection-enable-for-azurewl) cmdlet. Provide the name of the policy that you want to use. To create a policy using CLI, use the [az backup policy create](https://docs.microsoft.com//cli/azure/backup/policy?view=azure-cli-latest#az-backup-policy-create) cmdlet. For this tutorial, we'll be using the *sapahanaPolicy* policy.
118
118
119
119
```azurecli-interactive
120
120
az backup protection enable-for-azurewl --resource-group saphanaResourceGroup \
@@ -170,6 +170,6 @@ The response will give you the job name. This job name can be used to track the
170
170
171
171
## Next steps
172
172
173
-
* To learn how to restore an SAP HANA database in Azure VM using CLI, continue to the tutorial – [Restore an SAP HANA database in Azure VM using CLI]()
173
+
* To learn how to restore an SAP HANA database in Azure VM using CLI, continue to the tutorial – [Restore an SAP HANA database in Azure VM using CLI](tutorial-sap-hana-restore-cli.md)
174
174
175
-
* To learn how to back up an SAP HANA database running in Azure VM using Azure portal, refer to [Backup an SAP HANA databases on Azure VMs](https://docs.microsoft.com/azure/backup/backup-azure-sap-hana-database-troubleshoot)
175
+
* To learn how to back up an SAP HANA database running in Azure VM using Azure portal, refer to [Backup an SAP HANA databases on Azure VMs](https://docs.microsoft.com/azure/backup/backup-azure-sap-hana-database)
[Registering an SAP HANA instance with a recovery services vault](tutorial-sap-hana-backup-cli.md#register-and-protect-the-sap-hana-instance) automatically discovers all the databases on this instance.
78
78
79
-
However, in cases when new databases are added to the SAP HANA instance later, use the [az backup protectable-item initialize]() cmdlet. This cmdlet discovers the new databases added.
79
+
However, in cases when new databases are added to the SAP HANA instance later, use the [az backup protectable-item initialize](https://docs.microsoft.com/cli/azure/backup/protectable-item?view=azure-cli-latest#az-backup-protectable-item-initialize) cmdlet. This cmdlet discovers the new databases added.
80
80
81
81
```azurecli-interactive
82
82
az backup protectable-item initialize --resource-group saphanaResourceGroup \
Then use the [az backup protectable-item list]() cmdlet to list all the databases that have been discovered on your SAP HANA instance. This list, however, excludes those databases on which backup has already been configured. Once the database to be backed-up is discovered, refer to [Enable backup on SAP HANA database](tutorial-sap-hana-backup-cli.md#enable-backup-on-sap-hana-database).
88
+
Then use the [az backup protectable-item list](https://docs.microsoft.com/cli/azure/backup/protectable-item?view=azure-cli-latest#az-backup-protectable-item-list) cmdlet to list all the databases that have been discovered on your SAP HANA instance. This list, however, excludes those databases on which backup has already been configured. Once the database to be backed-up is discovered, refer to [Enable backup on SAP HANA database](tutorial-sap-hana-backup-cli.md#enable-backup-on-sap-hana-database).
89
89
90
90
```azurecli-interactive
91
91
az backup protectable-item list --resource-group saphanaResourceGroup \
@@ -170,7 +170,7 @@ To check the status of this operation, use the [az backup job show](https://docs
170
170
171
171
When you stop protection for the SAP HANA database with retain data, you can later resume protection. If you don't retain the backed-up data, you won't be able to resume protection.
172
172
173
-
To resume protection, use the [az backup protection resume]() cmdlet.
173
+
To resume protection, use the [az backup protection resume](https://docs.microsoft.com/cli/azure/backup/protection?view=azure-cli-latest#az-backup-protection-resume) cmdlet.
174
174
175
175
```azurecli-interactive
176
176
az backup protection resume --resource-group saphanaResourceGroup \
Copy file name to clipboardExpand all lines: articles/backup/tutorial-sap-hana-restore-cli.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ This tutorial assumes you have an SAP HANA database running on Azure VM that is
28
28
29
29
## View restore points for a backed-up database
30
30
31
-
To view the list of all the recovery points for a database, use the [az backup recoverypoint list](https://docs.microsoft.com/cli/azure/backup/recoverypoint?view=azure-cli-latest#az-backup-recoverypoint-list) cmdlet as follows:
31
+
To view the list of all the recovery points for a database, use the [az backup recoverypoint list](https://docs.microsoft.com/cli/azure/backup/recoverypoint?view=azure-cli-latest#az-backup-recoverypoint-show-log-chain) cmdlet as follows:
32
32
33
33
```azurecli-interactive
34
34
az backup recoverypoint list --resource-group saphanaResourceGroup \
As you can see, the list above contains three recovery points: one each for full, differential, and log backup.
52
52
53
53
>[!NOTE]
54
-
>You can also view the start and end points of every unbroken log backup chain, using the [az backup recoverypoint show-log-chain]() cmdlet.
54
+
>You can also view the start and end points of every unbroken log backup chain, using the [az backup recoverypoint show-log-chain](https://docs.microsoft.com/cli/azure/backup/recoverypoint?view=azure-cli-latest#az-backup-recoverypoint-show-log-chain) cmdlet.
55
55
56
56
## Prerequisites to restore a database
57
57
@@ -68,7 +68,7 @@ Azure Backup can restore SAP HANA databases that are running on Azure VMs as fol
68
68
* Restore to a specific date or time (to the second) by using log backups. Azure Backup automatically determines the appropriate full, differential backups and the chain of log backups that are required to restore based on the selected time.
69
69
* Restore to a specific full or differential backup to restore to a specific recovery point.
70
70
71
-
To restore a database, use the [az restore restore-azurewl]() cmdlet, which requires a recovery config object as one of the inputs. This object can be generated using the [az backup recoveryconfig show]() cmdlet. The recovery config object contains all the details to perform a restore. One of them being the restore mode – **OriginalWorkloadRestore** or **AlternateWorkloadRestore**.
71
+
To restore a database, use the [az restore restore-azurewl](https://docs.microsoft.com/cli/azure/backup/restore?view=azure-cli-latest#az-backup-restore-restore-azurewl) cmdlet, which requires a recovery config object as one of the inputs. This object can be generated using the [az backup recoveryconfig show](https://docs.microsoft.com/cli/azure/backup/recoveryconfig?view=azure-cli-latest#az-backup-recoveryconfig-show) cmdlet. The recovery config object contains all the details to perform a restore. One of them being the restore mode – **OriginalWorkloadRestore** or **AlternateWorkloadRestore**.
72
72
73
73
>[!NOTE]
74
74
> **OriginalWorkloadRestore** - Restore the data to the same SAP HANA instance as the original source. This option overwrites the original database. <br>
@@ -78,11 +78,9 @@ To restore a database, use the [az restore restore-azurewl]() cmdlet, which requ
78
78
79
79
To restore a database to an alternate location, use **AlternateWorkloadRestore** as the restore mode. You must then choose the restore point, which could either be a previous point-in-time or any of the previous restore points.
80
80
81
-
In this tutorial, you'll restore to a previous restore point. [View the list of restore points]() for the database and choose the point you want to restore to. This tutorial will use the restore point with the name *7660777527047692711*.
81
+
In this tutorial, you'll restore to a previous restore point. [View the list of restore points](#view-restore-points-for-a-backed-up-database) for the database and choose the point you want to restore to. This tutorial will use the restore point with the name *7660777527047692711*.
82
82
83
-
Using the above restore point name and the restore mode, let's create the recovery config object using the [az backup recoveryconfig show]() cmdlet.
84
-
85
-
Let's look at what each of the remaining parameters in the [az backup recoveryconfig show]() cmdlet mean:
83
+
Using the above restore point name and the restore mode, let's create the recovery config object using the [az backup recoveryconfig show](https://docs.microsoft.com/cli/azure/backup/recoveryconfig?view=azure-cli-latest#az-backup-recoveryconfig-show) cmdlet. Let's look at what each of the remaining parameters in this cmdlet mean:
86
84
87
85
***--target-item-name** This is the name that the restored database will be using. In this case, we used the name *restored_database*.
88
86
***--target-server-name** This is the name of an SAP HANA server that is successfully registered to a recovery services vault and lies in the same region as the database to be restored. For this tutorial, we'll restore the database to the same SAP HANA server that we have protected, named *hxehost*.
@@ -109,7 +107,7 @@ The response to the above query will be a recovery config object that looks some
Now, to restore the database run the [az restore restore-azurewl]() cmdlet. To use this command, we will enter the above json output that is saved to a file named *recoveryconfig.json*.
110
+
Now, to restore the database run the [az restore restore-azurewl](https://docs.microsoft.com/cli/azure/backup/restore?view=azure-cli-latest#az-backup-restore-restore-azurewl) cmdlet. To use this command, we will enter the above json output that is saved to a file named *recoveryconfig.json*.
113
111
114
112
```azurecli-interactive
115
113
az backup restore restore-azurewl --resource-group saphanaResourceGroup \
@@ -132,7 +130,7 @@ The response will give you the job name. This job name can be used to track the
132
130
133
131
To restore to the original location, we'll use **OrignialWorkloadRestore** as the restore mode. You must then choose the restore point, which could either be a previous point-in-time or any of the previous restore points.
134
132
135
-
For this tutorial, we'll choose the previous point-in-time “28-11-2019-09:53:00” to restore to. You can provide this restore point in the following formats: dd-mm-yyyy, dd-mm-yyyy-hh:mm:ss. To choose a valid point-in-time to restore to, use the [az backup recoverypoint show-log-chain]() cmdlet, which lists the intervals of unbroken log chain backups.
133
+
For this tutorial, we'll choose the previous point-in-time “28-11-2019-09:53:00” to restore to. You can provide this restore point in the following formats: dd-mm-yyyy, dd-mm-yyyy-hh:mm:ss. To choose a valid point-in-time to restore to, use the [az backup recoverypoint show-log-chain](https://docs.microsoft.com/cli/azure/backup/recoverypoint?view=azure-cli-latest#az-backup-recoverypoint-show-log-chain) cmdlet, which lists the intervals of unbroken log chain backups.
136
134
137
135
```azurecli-interactive
138
136
az backup recoveryconfig show --resource-group saphanaResourceGroup \
@@ -150,7 +148,7 @@ The response to the above query will be a recovery config object that looks as f
Now, to restore the database run the [az restore restore-azurewl]() cmdlet. To use this command, we will enter the above json output that is saved to a file named *recoveryconfig.json*.
151
+
Now, to restore the database run the [az restore restore-azurewl](https://docs.microsoft.com/cli/azure/backup/restore?view=azure-cli-latest#az-backup-restore-restore-azurewl) cmdlet. To use this command, we will enter the above json output that is saved to a file named *recoveryconfig.json*.
154
152
155
153
```azurecli-interactive
156
154
az backup restore restore-azurewl --resource-group saphanaResourceGroup \
@@ -171,6 +169,6 @@ The response will give you the job name. This job name can be used to track the
171
169
172
170
## Next steps
173
171
174
-
* To learn how to manage a backed-up SAP HANA database in Azure VM using CLI, continue to the tutorial [Manage an SAP HANA database in Azure VM using CLI](tutorial-sap-hana-backup-cli.md)
172
+
* To learn how to manage SAP HANA databases that are backed up using Azure CLI, continue to the tutorial [Manage an SAP HANA database in Azure VM using CLI](tutorial-sap-hana-backup-cli.md)
175
173
176
174
* To learn how to restore an SAP HANA database running in Azure VM using the Azure portal, refer to [Restore an SAP HANA databases on Azure VMs](https://docs.microsoft.com/azure/backup/sap-hana-db-restore)
0 commit comments