Cannot unlink or delete my redis cache

Carlos Santos 6 Reputation points
2021-04-06T11:54:26.257+00:00

Hi there. I have an instance of a Azure Redis Cache which was Geo-Replicated (it was the secondary instance). I deleted the primary instance and now I cannot unlink this one nor delete it. Any advice? TIA :)

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
251 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,606 Reputation points
    2021-04-06T13:40:01.683+00:00

    Hi @Carlos Santos , welcome to Microsoft Q&A forum.

    If the primary and secondary are linked as part of geo-replication, we cannot delete the primary till we unlink them. Please see the error message when we try to delete primary:

    Azure Portal:
    84921-image.png

    Azure CLI:

    84914-image.png

    If you are able to delete the primary that means both primary and secondary are already unlinked. I tried deleting primary after unlinking and was able to do that.

    In case you want to find secondary and delete it, you can go to your azure resource group and find all the services/resources under it.

    Another way is to use Azure CLI to find all redis cache for a resource group and then delete accordingly as below:

    //List all Redis Cache Instances for a resource group  
    az redis list --resource-group anurshar-Databases  
      
    //find the host from above query and delete it as below  
    az redis delete --name nameofcache --resource-group yourresourcegrp  
    

    Please let me know if this helps or else we can discuss more.

    ----------

    If answer helps, please mark it 'Accept Answer'

    1 person found this answer helpful.

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.