Redis version upgrade
You can upgrade a Managed Service for Redis cluster to any supported version.
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 September 9, 2024, Redis versions 6.2 and 7.0 are discontinued. You cannot create a cluster with these versions. All existing clusters will be automatically upgraded to version 7.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 a version upgrade
Make sure this does not affect your applications:
- See the Redis changelog
to check how updates might affect your applications. - Try upgrading the version on a test cluster. You can deploy it from a backup of the main cluster.
- Create a backup of the main cluster directly before the version upgrade.
Upgrading a cluster
Alert
- After updating the DBMS, the cluster cannot 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 begin by upgrading a test cluster that has 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.
- In the Version field, select the new version.
- Click Save changes.
As soon as you run the upgrade, the cluster status will change to Updating. Wait for the operation to complete and then check the cluster version.
If you do not 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 this command:
yc managed-redis cluster list
-
Get information about the cluster you need and check the Redis version in the
config.version
parameter:yc managed-redis cluster get <cluster_name_or_ID>
-
Run the Redis upgrade:
yc managed-redis cluster update <cluster_name_or_ID> \ --redis-version <new_version_number>
As soon as you run the upgrade, the cluster status will change to Updating. Wait for the operation to complete and then check the cluster version.
To update a cluster, use the update REST API method for the Cluster resource or the ClusterService/Update gRPC API call and provide the following in the request:
- Cluster ID in the
clusterId
parameter. To find out the cluster ID, get a list of clusters in the folder. - Redis version number in the
configSpec.version
parameter. - List of cluster configuration fields to update in the
updateMask
parameter.
Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask
parameter as a single comma-separated string.
Examples
Let's assume you need to upgrade your cluster from version 6.2 to version 7.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 | +----------------------+---------------+---------------------+--------+---------+ | c9q8p8j2gaih******** | redis406 | 2022-04-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: c9q8p8j2gaih******** ... config: version: "6.2" ...
-
To upgrade a cluster named
redis406
to version 7.0, run the following command:yc managed-redis cluster update redis406 --redis-version 7.0