Skip to content

Latest commit

 

History

History
123 lines (78 loc) · 6.23 KB

upgrade-database.md

File metadata and controls

123 lines (78 loc) · 6.23 KB
Title alwaysopen categories description linkTitle weight url
Upgrade a Redis Enterprise Software database
false
docs
operate
rs
Upgrade a Redis Enterprise Software database.
Upgrade database
50
/operate/rs/7.4/installing-upgrading/upgrading/upgrade-database/

Default Redis database versions {#default-db-versions}

When you upgrade an existing database, it uses the latest bundled Redis version unless you specify a different version with the redis_version option in the [REST API]({{< relref "/operate/rs/7.4/references/rest-api/requests/bdbs" >}}) or [rladmin upgrade db]({{< relref "/operate/rs/7.4/references/cli-utilities/rladmin/upgrade#upgrade-db" >}}).

Redis Enterprise Software v6.x includes two Redis database versions: 6.0 and 6.2. As of version 7.2, Redis Enterprise Software includes three Redis database versions.

To view available Redis database versions:

  • In the Cluster Manager UI, see Redis database versions on the Cluster > Configuration screen.

  • Send a [GET /nodes REST API request]({{< relref "/operate/rs/7.4/references/rest-api/requests/nodes" >}}) and see supported_database_versions in the response.

The default Redis database version differs between Redis Enterprise releases as follows:

Redis
Enterprise
Bundled Redis
DB versions
Default DB version
(upgraded/new databases)
7.4.2 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

The upgrade policy is only relevant for Redis Enterprise Software versions 6.2.4 through 6.2.18. For more information about upgrade policies, see the 6.2 version of this document.

Upgrade prerequisites

Before upgrading a database:

  • Review the relevant release notes for any preparation instructions.

  • Verify that the database version meets the minimums specified earlier.

    To determine the database version:

    • Use the Cluster Manager UI to open the Configuration tab for the database and select {{< image filename="/images/rs/icons/info-icon.png#no-click" alt="The About database button" width="18px" class="inline" >}} About.

    • (Optional) Use the [rladmin status extra all]({{< relref "/operate/rs/7.4/references/cli-utilities/rladmin/status" >}}) command to display configuration details:

      rladmin status extra all

      When the database compatibility version is outdated, OLD REDIS VERSION appears in the command output.

  • 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]({{< relref "/operate/rs/7.4/references/compatibility/resp#client-prerequisites-for-redis-72-upgrade" >}}) for more details and examples.

  • To avoid data loss during the upgrade, [back up your data]({{< relref "/operate/rs/7.4/databases/import-export/schedule-backups" >}}).

    You can [export the data]({{< relref "/operate/rs/7.4/databases/import-export/export-data" >}}) to an external location, [enable replication]({{< relref "/operate/rs/7.4/databases/durability-ha/replication" >}}), or [enable persistence]({{< relref "/operate/rs/7.4/databases/configure/database-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:

  1. (Optional) Back up the database to minimize the risk of data loss.

  2. Use [rladmin]({{< relref "/operate/rs/7.4/references/cli-utilities/rladmin/upgrade" >}}) to upgrade the database. During the upgrade process, the database will restart without losing any data.

    • To upgrade a database without 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
    • If the database has modules enabled and new module versions are available in the cluster, run rladmin upgrade db with additional parameters to upgrade the module versions when you upgrade the database. See [Upgrade modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) for more details.

    • 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>
  3. 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 {{< image filename="/images/rs/icons/info-icon.png#no-click" alt="The About database button" width="18px" class="inline" >}} About.

    • Use [rladmin status databases extra all]({{< relref "/operate/rs/7.4/references/cli-utilities/rladmin/status#status-databases" >}}) 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.