Redis version upgrade
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
- In the management console go to the folder page and select Managed Service for Redis.
- Select a cluster and click Edit.
- Open the list in the Version field.
Before upgrading
Prior to upgrading a cluster, make sure this doesn't affect your applications:
- 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.
- Try upgrading a test cluster (you can try deploying it from a backup of the main cluster).
- 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.
- In the management console, go to the folder containing the cluster to upgrade.
- Select Managed Service for Redis.
- Select the cluster from the list and click Edit cluster.
- In the Version field, select the new version.
- 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.
-
Get a list of your Redis clusters using the command:
yc managed-redis cluster list
-
Get information about a cluster and check the Redis version in the
config.version
parameter:yc managed-redis cluster get <cluster ID or name>
-
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.
-
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 | +----------------------+---------------+---------------------+--------+---------+
-
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" ...
-
To upgrade a cluster named
redis406
to version 6.0, run the following command:yc managed-redis cluster update redis406 --redis-version 6.0