Key restoration from backup

Anonymous
2023-07-11T06:10:41.6033333+00:00

When i am trying to restore the key from backup getting below error,

There was a conflict restoring the key 'https://gkeyvtest.vault.azure.net/keys/key1/1e5a4c6ffdfe407b87de54204313d90d'. This can happen if either: a second key with the same name was created after the first key was deleted; thus trying to restore a key whose name is already in use. To fix this, rename the second key to something else so that the restore works. The second probable cause of this exception is when multiple operations are performed in parallel against the key. To avoid this error, perform operations against a key in a sequential manner.

First thought its due to purge protection enable

but Tried to restore key in the keyvault where purge protection is disabled same error

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,449 questions
{count} votes

2 answers

Sort by: Most helpful
  1. TP 125.5K Reputation points Volunteer Moderator
    2023-07-11T06:59:14.21+00:00

    Hi Gauri,

    Before restoring a key from backup, you need to Purge it. Please confirm that you have purged the soft-deleted key before attempting to restore it from backup. Please note your user account must have Purge Key permission.

    Please click Accept Answer if the above was helpful.

    Thanks.

    -TP


  2. Kadir Ercetin - ADM 0 Reputation points
    2024-02-18T21:34:05.3+00:00

    Both soft-delete and purge protection must be enabled on the key vault when configuring customer-managed TDE for SQL Server.

    To create a highly available SQL Server using customer managed key is to configure the server to use two different key vaults in two different regions with the same key material. If it is not possible to restore the with the same name when new version is available and renaming the key is not possible on restore, how on earth your recommendations will be done ??

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.