升级 Redis Enterprise Software 数据库
升级 Redis Enterprise Software 数据库。
Redis 企业软件 |
---|
默认 Redis 数据库版本
升级现有数据库时,它将使用最新的捆绑 Redis 版本,除非您使用redis_version
选项或rladmin upgrade db
.
Redis Enterprise Software v6.x 包括两个 Redis 数据库版本:6.0 和 6.2。 从版本 7.2 开始,Redis Enterprise Software 包括三个 Redis 数据库版本。
要查看可用的 Redis 数据库版本:
-
在集群管理器 UI 中,请参阅 Cluster > Configuration 屏幕上的 Redis 数据库版本。
-
发送
GET /nodes
REST API 请求然后看supported_database_versions
在响应中。
Redis Enterprise 版本之间的默认 Redis 数据库版本有所不同,如下所示:
Redis 软件 |
捆绑的 Redis 数据库版本 |
默认数据库版本 (升级/新数据库) |
---|---|---|
7.8.x | 6.2, 7.2, 7.4 | 7.4 |
7.4.x 版本 | 6.0, 6.2, 7.2 | 7.2 |
7.2.4 | 6.0, 6.2, 7.2 | 7.2 |
6.4.2 | 6.0, 6.2 | 6.2 |
6.2.x 版本 | 6.0, 6.2 | 6.0 |
升级策略仅与 Redis Enterprise Software 版本 6.2.4 到 6.2.18 相关。有关升级策略的更多信息,请参阅本文档的 6.2 版本。
升级先决条件
升级数据库之前:
-
查看相关的发行说明,了解任何准备说明。
-
验证集群的 Redis Enterprise Software 版本是否支持当前数据库版本和目标数据库版本。
要确定当前数据库版本,请执行以下作:
-
(可选)使用
rladmin status extra all
命令显示配置详细信息:rladmin status extra all
When the database compatibility version is outdated,
appears in the command output.OLD REDIS VERSION
-
Verify the cluster is fully upgraded and operational.
Use the Cluster Manager UI to display the Configuration tab for the cluster. The tab displays the cluster version information and the Redis database compatibility version.
-
Check client compatibility with the database version.
If you run Redis Stack commands with Go-Redis versions 9 and later or Lettuce versions 6 and later, set the client’s protocol version to RESP2 before upgrading your database to Redis version 7.2 to prevent potential application issues due to RESP3 breaking changes. See Client prerequisites for Redis 7.2 upgrade for more details and examples.
-
To avoid data loss during the upgrade, back up your data.
You can export the data to an external location, enable replication, or enable persistence.
When choosing how to back up data, keep the following in mind:
-
To reduce downtime when replication is enabled, a failover is performed before restarting the primary (master) database.
-
When persistence is enabled without replication, the database is unavailable during restart because the data is restored from the persistence file. AOF persistence restoration is slower than snapshot restoration.
-
Upgrade database
To upgrade a database:
-
(Optional) Back up the database to minimize the risk of data loss.
-
Use rladmin
to upgrade the database. During the upgrade process, the database will restart without losing any data.
-
To upgrade a database and its modules:
rladmin upgrade db <database name | database ID>
Example of a successful upgrade:
rladmin> upgrade db demo
Monitoring d194c4a3-631c-4726-b799-331b399fc85c
active - SMUpgradeBDB init
active - SMUpgradeBDB wait_for_version
active - SMUpgradeBDB configure_shards
completed - SMUpgradeBDB
Done
-
To upgrade the database to a version other than the default version, use the redis_version
parameter:
rladmin upgrade db <database name | database ID> redis_version <version>
-
Check the Redis database compatibility version for the database to confirm the upgrade.
To do so:
-
Use the Cluster Manager UI to open the Configuration tab for the database and select
About.
-
Use rladmin status databases extra all
to display a list of the databases in your cluster and their current Redis database compatibility version:
rladmin status databases extra all
Verify that the Redis version is set to the expected value.
On this page