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/key-vault/managed-hsm/disaster-recovery-guide.md
+38-7Lines changed: 38 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,33 +95,61 @@ az keyvault security-domain upload --hsm-name ContosoMHSM2 --sd-exchange-key Con
95
95
96
96
Now both the source HSM (ContosoMHSM) and the destination HSM (ContosoMHSM2) have the same security domain. We can now restore a full backup from the source HSM into the destination HSM.
97
97
98
-
## Create a backup (as a restore point) of your new HSM
98
+
## Backup and restore
99
99
100
-
It's always a good idea to take a full backup before you execute a full HSM restore, so that you have a restore point in case something goes wrong with the restore.
100
+
It's always a good idea to take a full backup before you execute a full HSM restore, so that you have a restore point in case something goes wrong with the restore. You can do this using one of two methods: user assigned managed identity, or SAS tokens.
101
+
102
+
### Create a backup (as a restore point) of your new HSM
101
103
102
104
To create an HSM backup, you'll need:
103
105
- A storage account where the backup will be stored
104
106
- A blob storage container in this storage account where the backup process will create a new folder to store encrypted backup
107
+
- A user assigned managed identity that has the Storage Blob Data Contributor role on the storage account OR storage container SAS token with permissions 'crdw'
108
+
109
+
We use az keyvault backup command to the HSM backup in the storage container **mhsmbackupcontainer**, which is in the storage account **mhsmdemobackup** in the following examples.
110
+
111
+
### [User assigned managed identity](#tab/uami)
105
112
106
-
We use `az keyvault backup` command to the HSM backup in the storage container **mhsmbackupcontainer**, which is in the storage account **mhsmdemobackup** in the following example. We create a SAS token that expires in 30 minutes and provide that to Managed HSM to write the backup.
113
+
If using the user assigned managed identity method, we specify the user assigned managed identity with the `--mi-user-assigned` parameter and associate that to the Managed HSM before writing the backup in the below example.
114
+
115
+
```azurecli-interactive
116
+
az keyvault update-hsm --hsm-name ContosoMHSM2 --mi-user-assigned "/subscriptions/subid/resourcegroups/mhsmrgname/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userassignedidentityname"
If using the SAS token method, we create a SAS token that expires in 30 minutes and provide that to Managed HSM to write the backup in the below example.
- The storage account and the blob container in which the source HSM's backups are stored.
122
138
- The folder name from where you want to restore the backup. If you create regular backups, there will be many folders inside this container.
123
139
124
-
We use `az keyvault restore` command to the new HSM **ContosoMHSM2**, using the backup of the source MHSM we are trying to restore, which is in the folder name **mhsm-ContosoMHSM-2020083120161860** found in the storage container **mhsmdemobackupcontainer** of the storage account **ContosoBackup** in the following example. We create a SAS token that expires in 30 minutes and provide that to Managed HSM to write the restore.
140
+
We use az keyvault restore command to the new HSM ContosoMHSM2, using the backup of the source MHSM we are trying to restore, which is in the folder name **mhsm-ContosoMHSM-2020083120161860** found in the storage container **mhsmdemobackupcontainer** of the storage account **ContosoBackup** in the following example.
141
+
142
+
### [User assigned managed identity](#tab/uami)
143
+
144
+
If using the user assigned managed identity method, we set the `--use-managed-identity` pramater to "true".
Now you've completed a full disaster recovery process. The contents of the source HSM when the backup was taken are copied to the destination HSM, including all the keys, versions, attributes, tags, and role assignments.
134
164
165
+
135
166
## Next steps
136
167
137
168
- Learn more about Security Domain see [About Managed HSM Security Domain](security-domain.md)
0 commit comments