How to upgrade an existing Redis 4 cache to Redis 6

Azure Cache for Redis supports upgrading the version of your Azure Cache for Redis from Redis 4 to Redis 6. Upgrading is similar to regular monthly maintenance. Upgrading follows the same pattern as maintenance: First, the Redis version on the replica node is updated, followed by an update to the primary node. Your client application should treat the upgrade operation exactly like a planned maintenance event.

As a precautionary step, we recommend exporting the data from your existing Redis 4 cache and testing your client application with a Redis 6 cache in a lower environment before upgrading.

For more information on how to export, see Import and Export data in Azure Cache for Redis.


As announced in What's new, we'll retire version 4 for Azure Cache for Redis instances on June 30, 2023. Before that date, you need to upgrade any of your cache instances to version 6.

For more information on the retirement of Redis 4, see Retirements and Frequently asked questions



  • When you upgrade a cache in the Basic tier, it's unavailable for several minutes and results in data loss.
  • Upgrading on geo-replicated cache isn't supported. You must manually unlink the cache instances before upgrading.
  • Upgrading a cache with a dependency on Cloud Services isn't supported. You should migrate your cache instance to Virtual Machine Scale Set before upgrading.
  • When trying to upgrade to Redis 6, your VNet must be configured in accord with the requirements. Your upgrade might fail or the cache might not function properly after the upgrade if not configured correctly.

Check the version of a cache

Before you upgrade, check the Redis version of a cache by selecting Properties from the Resource menu of the Azure Cache for Redis. We recommend you use Redis 6.

Screenshot of properties selected in the Resource menu.

Upgrade using the Azure portal

  1. In the Azure portal, select the Azure Cache for Redis instance that you want to upgrade from Redis 4 to Redis 6.

  2. On the left side of the screen, select Advanced settings.

  3. If your cache instance is eligible to be upgraded, you should see the following blue banner. If you want to proceed, select the text in the banner.

    Screenshot informing you that you can upgrade your cache to Redis 6 with more features. Upgrading your cache instance can't be reversed.

  4. A dialog box displays a popup notifying you that upgrading is permanent and might cause a brief connection blip. Select Yes if you would like to upgrade your cache instance.

    Screenshot showing a dialog with more information about upgrading your cache with Yes selected.

  5. To check on the status of the upgrade, navigate to Overview.

    Screenshot showing Overview in the Resource menu. Status shows cache is being upgraded.

Upgrade using Azure CLI

To upgrade a cache from 4 to 6 using the Azure CLI that is not using Private Endpoint, use the following command.

az redis update --name cacheName --resource-group resourceGroupName --set redisVersion=6

Private Endpoint

If Private Endpoint is enabled on the cache, use the command that is appropriate based on whether PublicNetworkAccess is enabled or disabled:

If PublicNetworkAccess is enabled:

 az redis update --name <cacheName> --resource-group <resourceGroupName> --set publicNetworkAccess=Enabled redisVersion=6

If PublicNetworkAccess is disabled:

az redis update --name <cacheName> --resource-group <resourceGroupName> --set publicNetworkAccess=Disabled redisVersion=6

Upgrade using PowerShell

To upgrade a cache from 4 to 6 using PowerShell, use the following command:

Set-AzRedisCache -Name "CacheName" -ResourceGroupName "ResourceGroupName" -RedisVersion "6"

Next steps