How to trigger failover for Azure Cache for Redis using CLI

Maulin Shah (Crest Data Systems Private Lim) 40 Reputation points Microsoft Vendor
2024-02-16T13:21:32.9166667+00:00

I have setup the two Azure Cache for Redis, one in the primary region and another in paired region. After that I have setup the Geo replication between this two servers using replication link. so now I want to trigger a manual failover on this so how we can do that using the az cli or REST API? Using portal it's a straight forward way but I didn't found anything in the doc related to az cli or REST API

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

Accepted answer
  1. Oury Ba-MSFT 19,571 Reputation points Microsoft Employee
    2024-02-20T19:43:59.7666667+00:00

    Maulin Shah (Crest Data Systems Private Lim) Azure Cache for Redis provides several ways to trigger a manual failover between paired regions, even if the portal isn’t your preferred method. You need to execute the server-link create command with the cache names reversed like this:  az redis server-link create --name cache2 --resource-group testResourceGroup --server-to-link cache1 --replication-role Secondary

    cache2 is old secondary or new primary
    cache1 is old primary or new secondary Regards, Oury

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deepanshukatara-6769 10,690 Reputation points
    2024-02-16T13:31:59.6633333+00:00

    Hi , please find below answer Using Azure CLI: Please find document https://learn.microsoft.com/en-us/cli/azure/redis?view=azure-cli-latest#az-redis-force-reboot Using REST API: Please check below link-->

    https://learn.microsoft.com/en-us/rest/api/redis/redis?view=rest-redis-2023-08-01

    Please accept answer ,if it helps , Thanks!


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.