Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Managed Service for Redis
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Changing cluster and database settings
    • Connecting to a database
    • Stopping and starting clusters
    • Updating a Redis version
    • Managing hosts in a cluster
    • Managing shards
    • Managing backups
    • Switching the master
    • Monitoring the state of clusters and hosts
    • Viewing cluster logs
    • Deleting clusters
  • Tutorials
  • Concepts
  • Access management
  • Pricing policy
  • API reference
  • Revision history
  • Questions and answers
  1. Step-by-step instructions
  2. Updating a Redis version

Redis version upgrade

Written by
Yandex Cloud
  • Supported versions
    • Viewing a list of available Redis versions
  • Before upgrading
  • Upgrading a cluster
  • Examples

You can upgrade a Managed Service for Redis cluster to any supported version.

You can only upgrade to a version that immediately follows the current one, such as version 5.0 to 6.0. Upgrades to higher versions are performed in steps. To upgrade Redis from version 5.0 to version 6.2, for instance, follow the steps 5.0 → 6.0 → 6.2.

Supported versions

All Redis versions, which were supported in Managed Service for Redis, will remain available as long as the vendor continues to support them. Normally, this is for 24 months after a version is released. For more information, see the Redis documentation.

As of June 1, 2022, Redis versions 5.0 and 6.0 will no longer be supported. You will not be able to create a cluster with these versions. The version of existing clusters was automatically upgraded to 6.2.

Viewing a list of available Redis versions

Management console
  1. In the management console go to the folder page and select Managed Service for Redis.
  2. Select a cluster and click Edit.
  3. Open the list in the Version field.

Before upgrading

Prior to upgrading a cluster, make sure this doesn't affect your applications:

  1. Review the change log for the Redis versions that you are upgrading your cluster to, and make sure that changes do not affect your application.
  2. Try upgrading a test cluster (you can try deploying it from a backup of the main cluster).
  3. Back up the main cluster prior to upgrading.

Upgrading a cluster

Alert

  • After updating the DBMS, the cluster can't be rolled back to the previous version.
  • The success of a Redis version upgrade depends on multiple factors, including cluster settings and data stored in databases. We recommend that you first upgrade a test cluster that uses the same data and settings.
Management console
CLI
API
  1. In the management console, go to the folder containing the cluster to upgrade.
  2. Select Managed Service for Redis.
  3. Select the cluster from the list and click Edit cluster.
  4. In the Version field, select the new version.
  5. Click Save changes.

Once the upgrade is launched, the cluster status changes to UPDATING. Wait for the operation to complete and then check the cluster version.

If you don't have the Yandex Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. Get a list of your Redis clusters using the command:

    yc managed-redis cluster list
    
  2. Get information about a cluster and check the Redis version in the config.version parameter:

    yc managed-redis cluster get <cluster ID or name>
    
  3. Start the Redis upgrade:

    yc managed-redis cluster update <cluster ID or name> \
      --redis-version <new version number>
    

    Once the upgrade is launched, the cluster status changes to UPDATING. Wait for the operation to complete and then check the cluster version.

Use the update API method and pass the following in the request:

  • The cluster ID in the clusterId parameter. To find out the cluster ID, get a list of clusters in the folder.
  • The Redis version number in the configSpec.version parameter.
  • List of cluster configuration fields to be changed in the updateMask parameter.

Warning

This API method overrides all parameters of the object being modified that were not explicitly passed in the request to the default values. To avoid this, list the settings you want to change in the updateMask parameter (one line separated by commas).

Examples

Let's assume that you need to upgrade your cluster from version 5.0 to version 6.0.

CLI
  1. To retrieve a list of clusters and find out their IDs and names, run the command below:

    yc managed-redis cluster list
    

    Result:

    +----------------------+---------------+---------------------+--------+---------+
    |          ID          |     NAME      |     CREATED AT      | HEALTH | STATUS  |
    +----------------------+---------------+---------------------+--------+---------+
    | c9q8p8j2gaih8iti42mh |   redis406    | 2021-11-23 12:44:17 | ALIVE  | RUNNING |
    +----------------------+---------------+---------------------+--------+---------+
    
  2. To get information about a cluster named redis406, run the following command:

    yc managed-redis cluster get redis406
    

    Result:

    id: c9q8p8j2gaih8iti42mh
    ...
    config:
      version: "5.0"
      ...
    
  3. To upgrade a cluster named redis406 to version 6.0, run the following command:

    yc managed-redis cluster update redis406 --redis-version 6.0
    

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Supported versions
  • Viewing a list of available Redis versions
  • Before upgrading
  • Upgrading a cluster
  • Examples