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/backup-restore.md
+21-19Lines changed: 21 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ tags: azure-key-vault
8
8
ms.service: key-vault
9
9
ms.subservice: managed-hsm
10
10
ms.topic: tutorial
11
-
ms.date: 10/23/2023
11
+
ms.date: 12/11/2023
12
12
ms.author: mbaldwin
13
13
# Customer intent: As a developer using Key Vault I want to know the best practices so I can implement them.
14
14
---
@@ -25,42 +25,44 @@ Only following built-in roles have permission to perform full backup:
25
25
- Managed HSM Administrator
26
26
- Managed HSM Backup
27
27
28
-
You must provide following information to execute a full backup:
28
+
There are 2 ways to execute a full backup. You must provide the following information to execute a full backup:
29
29
- HSM name or URL
30
30
- Storage account name
31
31
- Storage account blob storage container
32
-
-Storage container SAS token with permissions `crdw` (if storage account is not behind a private endpoint)
32
+
-User assigned managed identity OR storage container SAS token with permissions 'crdw'
33
33
34
-
#### Prerequisites if the storage account is behind a private endpoint (preview):
34
+
> [!NOTE]
35
+
> Backing up and restoring using storage container SAS token requires your storage account to have public network access enabled. You can backup and restore your MHSM using a user assigned managed identity regardless of whether your storage account has public network access or private network access enabled, including if the storage account is behind a private endpoint.
#### Prerequisites if backing up and restoring using user assigned managed identity (preview):
35
40
36
41
1. Ensure you have the Azure CLI version 2.54.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
37
42
2. Create a user assigned managed identity.
38
43
3. Create a storage account (or use an existing storage account).
39
-
4. Enable Trusted service bypass on the storage account in the “Networking” tab, under “Exceptions.”
40
-
41
-
6. Provide ‘storage blob data contributor’ role access to the user assigned managed identity created in step#2. Do this by going to the “Access Control” tab on the portal -> Add Role Assignment. Then select “managed identity” and select the managed identity created in step#2 -> Review + Assign
42
-
7. Create the Managed HSM and associate the managed identity with below command.
44
+
4. If public network access is diabled on your storage account, enable trusted service bypass on the storage account in the “Networking” tab, under “Exceptions.”
45
+
5. Provide ‘storage blob data contributor’ role access to the user assigned managed identity created in step#2. Do this by going to the “Access Control” tab on the portal -> Add Role Assignment. Then select “managed identity” and select the managed identity created in step#2 -> Review + Assign
46
+
6. Create the Managed HSM and associate the managed identity with below command.
Backup is a long running operation but will immediately return a Job ID. You can check the status of backup process using this Job ID. The backup process creates a folder inside the designated container with a following naming pattern **`mhsm-{HSM_NAME}-{YYYY}{MM}{DD}{HH}{mm}{SS}`**, where HSM_NAME is the name of managed HSM being backed up and YYYY, MM, DD, HH, MM, mm, SS are the year, month, date, hour, minutes, and seconds of date/time in UTC when the backup command was received.
56
58
57
59
While the backup is in progress, the HSM might not operate at full throughput as some HSM partitions will be busy performing the backup operation.
58
60
59
-
### Backup HSM when storage account is behind a private endpoint (preview)
61
+
### Backup HSM using user assigned managed identity (preview)
### Backup HSM when storage account is not behind a private endpoint
65
+
### Backup HSM using SAS token
64
66
65
67
```azurecli-interactive
66
68
# time for 500 minutes later for SAS token expiry
@@ -94,20 +96,20 @@ Full restore allows you to completely restore the contents of the HSM with a pre
94
96
95
97
Restore is a data plane operation. The caller starting the restore operation must have permission to perform dataAction **Microsoft.KeyVault/managedHsm/restore/start/action**. The source HSM where the backup was created and the destination HSM where the restore will be performed **must** have the same Security Domain. See more [about Managed HSM Security Domain](security-domain.md).
96
98
97
-
You must provide the following information to execute a full restore:
99
+
There are 2 ways to execute a full restore. You must provide the following information to execute a full restore:
98
100
- HSM name or URL
99
101
- Storage account name
100
102
- Storage account blob container
101
-
-Storage container SAS token with permissions `rl`(if storage account is not behind a private endpoint)
103
+
-User assigned managed identity OR storage container SAS token with permissions `rl`
102
104
- Storage container folder name where the source backup is stored
103
105
104
106
Restore is a long running operation but will immediately return a Job ID. You can check the status of the restore process using this Job ID. When the restore process is in progress, the HSM enters a restore mode and all data plane command (except check restore status) are disabled.
105
107
106
-
### Restore HSM when storage account is behind a private endpoint (preview)
108
+
### Restore HSM using user assigned managed identity (preview)
0 commit comments