From 6e8f5342ed41dea343534342e8b0e5c52846d1a1 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 15 Apr 2025 14:48:37 -0700 Subject: [PATCH 1/2] Initial commit of upgrade docs --- .../operate/oss_and_stack/install/_index.md | 8 +- .../oss_and_stack/install/archive/_index.md | 2 +- .../install/build-stack/_index.md | 4 +- .../install/install-stack/windows.md | 6 -- .../oss_and_stack/install/upgrade/_index.md | 16 ++++ .../oss_and_stack/install/upgrade/cluster.md | 64 +++++++++++++++ .../install/upgrade/standalone.md | 78 +++++++++++++++++++ 7 files changed, 166 insertions(+), 12 deletions(-) create mode 100644 content/operate/oss_and_stack/install/upgrade/_index.md create mode 100644 content/operate/oss_and_stack/install/upgrade/cluster.md create mode 100644 content/operate/oss_and_stack/install/upgrade/standalone.md diff --git a/content/operate/oss_and_stack/install/_index.md b/content/operate/oss_and_stack/install/_index.md index a4a9c3ed42..38ccf45262 100644 --- a/content/operate/oss_and_stack/install/_index.md +++ b/content/operate/oss_and_stack/install/_index.md @@ -6,15 +6,17 @@ categories: - oss description: How to install Redis CE on your target platform hideListLinks: true -linkTitle: Install +linkTitle: Install and upgrade title: Install Redis Community Edition (CE) weight: 30 --- -You can install [Redis CE]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis CE is available on Docker, Linux, macOS, and Windows (using Docker only). +You can install [Redis CE]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine or in the cloud. +Redis CE is available on Docker, Linux, macOS, and Windows (using Docker only). -Here are the installation instructions: +Here are the installation and upgrade instructions: * [Install Redis CE]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) +* [Upgrade Redis CE]({{< relref "/operate/oss_and_stack/install/upgrade" >}}) While you can install Redis CE locally, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). Redis CE 8.0 is not yet available on Redis Cloud. diff --git a/content/operate/oss_and_stack/install/archive/_index.md b/content/operate/oss_and_stack/install/archive/_index.md index b8c76ce808..aa3b54bfde 100644 --- a/content/operate/oss_and_stack/install/archive/_index.md +++ b/content/operate/oss_and_stack/install/archive/_index.md @@ -9,7 +9,7 @@ hideListLinks: true linkTitle: Archived instructions title: Install Redis Community Edition or Redis Stack weight: 30 -bannerText: These docs apply to versions of Redis Community Edition and Redis Stack earlier than 8.0.0. +bannerText: These docs apply to Redis Community Edition and Redis Stack version 7.x. bannerChildren: true --- diff --git a/content/operate/oss_and_stack/install/build-stack/_index.md b/content/operate/oss_and_stack/install/build-stack/_index.md index a902acdfa5..17c8ec3142 100644 --- a/content/operate/oss_and_stack/install/build-stack/_index.md +++ b/content/operate/oss_and_stack/install/build-stack/_index.md @@ -5,9 +5,9 @@ categories: - stack - oss description: Build and run Redis Community Edition 8 on Linux and macOS -linkTitle: Build and run Redis Community Edition 8 +linkTitle: Build and run Redis CE stack: true -title: Build and run Redis Community Edition 8 +title: Build and run Redis CE weight: 20 --- diff --git a/content/operate/oss_and_stack/install/install-stack/windows.md b/content/operate/oss_and_stack/install/install-stack/windows.md index 2382915573..5ef8227949 100644 --- a/content/operate/oss_and_stack/install/install-stack/windows.md +++ b/content/operate/oss_and_stack/install/install-stack/windows.md @@ -13,9 +13,3 @@ weight: 7 ## Run Redis Community Edition (CE) on Windows using Docker To install Redis CE on Windows, you will need to have Docker installed. When Docker is up and running, open Windows PowerShell and follow the instructions described in [Run Redis CE on Docker]({{< relref "/operate/oss_and_stack/install/install-stack/docker" >}}). Then, use Docker to connect with `redis-cli` as explained in that topic. - -{{% alert title="About using WSL and Ubuntu for Windows " color="warning" %}} -If you attempt to use Windows Subsystem for Linux (WSL) or Ubuntu for Windows to follow [Linux instructions]({{< relref "/operate/oss_and_stack/install/install-stack/apt" >}}), you will get a `systemd` error telling you `System has not been booted with systemd as init system (PID 1). Can't operate.` Do not fret. Just use Docker. - -_`systemd` is a suite of basic building blocks for a Linux system._ For more information about its function, see [System and Service Manager](https://systemd.io/). This becomes an issue due to the lack of support for Linux workflows on WSL. But, you can test the instructions listed in [Systemd support is now available in WSL!](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/). Let us know how that worked for you. -{{% /alert %}} diff --git a/content/operate/oss_and_stack/install/upgrade/_index.md b/content/operate/oss_and_stack/install/upgrade/_index.md new file mode 100644 index 0000000000..7326e13684 --- /dev/null +++ b/content/operate/oss_and_stack/install/upgrade/_index.md @@ -0,0 +1,16 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: Upgrade Redis Community Edition +linkTitle: Upgrade Redis CE +stack: true +title: Upgrade Redis Community Edition +weight: 10 +--- + +Upgrade Redis Community Edition to version 8 from version 7.x with or without modules or from Redis Stack 7.2 and 7.4. + +
\ No newline at end of file diff --git a/content/operate/oss_and_stack/install/upgrade/cluster.md b/content/operate/oss_and_stack/install/upgrade/cluster.md new file mode 100644 index 0000000000..b1f30b5169 --- /dev/null +++ b/content/operate/oss_and_stack/install/upgrade/cluster.md @@ -0,0 +1,64 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: Upgrade a Redis Community Edition cluster to Redis 8 +linkTitle: Redis cluster +title: Upgrade a Redis cluster to Redis 8 +weight: 30 +--- + +{{< note >}} +The supported upgrade paths are: + +- Redis Community Edition 7.x (with or without modules) to Redis Community Edition 8 +- Redis Stack 7.2 or 7.4 to Redis Community Edition 8 +{{< /note >}} + +{{< note >}} +It's essential to practice upgrading Redis in a controlled environment before upgrading it in a production environment. +Docker is an excellent tool to use for this purpose. +{{< /note >}} + +Follow these instructions to upgrade a Redis cluster. This guide assumes you have installed Redis using one of the supported methods listed [here]({{< relref "/operate/oss_and_stack/install/archive" >}}). + +### Save your current data + +Before upgrading, create a snapshot of your current dataset on each node (identified by its port) using the following command: + +```bash +redis-cli -p SAVE +``` + +Repeat for every node in your cluster, both masters and replicas. + +This creates or updates an `RDB` file, for example `dump.rdb`, in the node's Redis data directory. If you use AOF persistence, the files will be named `appendonly.aof.*` and they will be written in the `appendonlydir` directory inside the data directory. These directory and file names are the default. Use the names defined in your `redis.conf` file if different from the defaults. + +Use the following command on each node to identify where your data directories are located: + +```bash +redis-cli -p CONFIG GET dir +``` + +Make a copy of the files contained in each of those directories before proceeding. + +### Upgrade Redis nodes + +Upgrade each node one at a time starting with the replicas. +Follow the installation steps that correspond to your [installation method]({{< relref "/operate/oss_and_stack/install/install-stack" >}}). Only upgrade after you've saved and backed up your data. + +### Restore from saved files (if needed) + +If necessary, restore the saved files to their original location on each node. Then restart Redis on each node. + +### Verify the upgrade + +```bash +redis-cli -p INFO server | grep redis_version +redis-cli -p cluster info +redis-cli --cluster check : +``` + +You should also verify that your data is accessible and that your clients can connect successfully. diff --git a/content/operate/oss_and_stack/install/upgrade/standalone.md b/content/operate/oss_and_stack/install/upgrade/standalone.md new file mode 100644 index 0000000000..6aa65be81d --- /dev/null +++ b/content/operate/oss_and_stack/install/upgrade/standalone.md @@ -0,0 +1,78 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: Upgrade a standalone instance of Redis Community Edition or Redis Stack to Redis 8 +linkTitle: Standalone (single node) +title: Upgrade a Redis instance to Redis 8 +weight: 20 +--- +{{< note >}} +The supported upgrade paths are: + +- Redis Community Edition 7.x (with or without modules) to Redis Community Edition 8 +- Redis Stack 7.2 or 7.4 to Redis Community Edition 8 +{{< /note >}} + +{{< note >}} +It's essential to practice upgrading Redis in a controlled environment before upgrading it in a production environment. +Docker is an excellent tool to use for this purpose. +{{< /note >}} + +Follow these instructions to upgrade a single-node Redis server. This guide assumes you have installed Redis using one of the supported methods listed [here]({{< relref "/operate/oss_and_stack/install/archive" >}}). + +### Save your current data + +Before upgrading, create a snapshot of your current dataset using the following command: + +```bash +redis-cli SAVE +``` + +This creates or updates an `RDB` file, for example `dump.rdb`, in your Redis data directory. If you use AOF persistence, the files will be named `appendonly.aof.*` and they will be written in the `appendonlydir` directory inside the data directory. These directory and file names are the default. Use the names defined in your `redis.conf` file if different from the defaults. + +Use the following command to identify where your data directory is located: + +```bash +redis-cli CONFIG GET dir +``` + +Make a copy of these files before proceeding: + +```bash +cp -r /path/to/redis-data-dir/ /path/to/backup/ +``` + +### Upgrade Redis + +Follow these steps to upgrade Redis. + +1. Stop the current version of Redis CE or Redis Stack server. +1. Install the new version of Redis CE. Follow the installation steps that correspond to your [installation method]({{< relref "/operate/oss_and_stack/install/install-stack" >}}). Only upgrade after you've saved and backed up your data. +1. Start Redis if it didn't start automatically. + +### Restore from saved files (if needed) + +If Redis fails to start properly or if data is missing after the upgrade, restore from your backup. + +1. Stop the Redis server. +2. Copy the backup file back into the the Redis data directory: + ```bash + cp -r /path/to/backup/ /path/to/redis-data-dir/ + ``` +3. Start Redis again and verify data is restored: + ```bash + redis-cli INFO persistence + ``` + +### Verify the upgrade + +Use the following command to confirm you're running Redis 8: + +```bash +redis-cli INFO server | grep redis_version +``` + +You should also verify that your data is accessible and that your clients can connect successfully. From 335413feec42dc4f186f3680bf132259c6f3df64 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 16 Apr 2025 06:51:05 -0700 Subject: [PATCH 2/2] 2nd commit of upgrade docs --- .../oss_and_stack/install/upgrade/cluster.md | 14 ++++++++------ .../oss_and_stack/install/upgrade/standalone.md | 11 +++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/content/operate/oss_and_stack/install/upgrade/cluster.md b/content/operate/oss_and_stack/install/upgrade/cluster.md index b1f30b5169..547ed3716f 100644 --- a/content/operate/oss_and_stack/install/upgrade/cluster.md +++ b/content/operate/oss_and_stack/install/upgrade/cluster.md @@ -12,7 +12,6 @@ weight: 30 {{< note >}} The supported upgrade paths are: - - Redis Community Edition 7.x (with or without modules) to Redis Community Edition 8 - Redis Stack 7.2 or 7.4 to Redis Community Edition 8 {{< /note >}} @@ -34,7 +33,7 @@ redis-cli -p SAVE Repeat for every node in your cluster, both masters and replicas. -This creates or updates an `RDB` file, for example `dump.rdb`, in the node's Redis data directory. If you use AOF persistence, the files will be named `appendonly.aof.*` and they will be written in the `appendonlydir` directory inside the data directory. These directory and file names are the default. Use the names defined in your `redis.conf` file if different from the defaults. +This creates or updates an `RDB` file, for example `dump.rdb`, in the node's Redis data directory. If you use AOF persistence, the files will be named `appendonly.aof.*` and they will be written in the `appendonlydir` directory inside the data directory. The AOF-related directory and file names are the defaults. Use the names defined in your `redis.conf` file if different from the defaults. Use the following command on each node to identify where your data directories are located: @@ -46,12 +45,15 @@ Make a copy of the files contained in each of those directories before proceedin ### Upgrade Redis nodes -Upgrade each node one at a time starting with the replicas. -Follow the installation steps that correspond to your [installation method]({{< relref "/operate/oss_and_stack/install/install-stack" >}}). Only upgrade after you've saved and backed up your data. +Upgrade each node one at a time, starting with the replicas, using these steps: + +1. Stop the current version of Redis CE or Redis Stack server. +1. Follow the installation steps that correspond to your [Redis distribution]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) to install Redis 8. +1. Start Redis 8 if it didn't start automatically. -### Restore from saved files (if needed) +### Restore from saved files (if necessary) -If necessary, restore the saved files to their original location on each node. Then restart Redis on each node. +If necessary, restore the saved files to their original locations on each node. Then restart Redis on each node. ### Verify the upgrade diff --git a/content/operate/oss_and_stack/install/upgrade/standalone.md b/content/operate/oss_and_stack/install/upgrade/standalone.md index 6aa65be81d..9a40b72583 100644 --- a/content/operate/oss_and_stack/install/upgrade/standalone.md +++ b/content/operate/oss_and_stack/install/upgrade/standalone.md @@ -6,12 +6,11 @@ categories: - oss description: Upgrade a standalone instance of Redis Community Edition or Redis Stack to Redis 8 linkTitle: Standalone (single node) -title: Upgrade a Redis instance to Redis 8 +title: Upgrade a standalone Redis instance to Redis 8 weight: 20 --- {{< note >}} The supported upgrade paths are: - - Redis Community Edition 7.x (with or without modules) to Redis Community Edition 8 - Redis Stack 7.2 or 7.4 to Redis Community Edition 8 {{< /note >}} @@ -31,7 +30,7 @@ Before upgrading, create a snapshot of your current dataset using the following redis-cli SAVE ``` -This creates or updates an `RDB` file, for example `dump.rdb`, in your Redis data directory. If you use AOF persistence, the files will be named `appendonly.aof.*` and they will be written in the `appendonlydir` directory inside the data directory. These directory and file names are the default. Use the names defined in your `redis.conf` file if different from the defaults. +This creates or updates an `RDB` file, for example `dump.rdb`, in your Redis data directory. If you use AOF persistence, the files will be named `appendonly.aof.*` and they will be written in the `appendonlydir` directory inside the data directory. The AOF-related directory and file names are the defaults. Use the names defined in your `redis.conf` file if different from the defaults. Use the following command to identify where your data directory is located: @@ -50,10 +49,10 @@ cp -r /path/to/redis-data-dir/ /path/to/backup/ Follow these steps to upgrade Redis. 1. Stop the current version of Redis CE or Redis Stack server. -1. Install the new version of Redis CE. Follow the installation steps that correspond to your [installation method]({{< relref "/operate/oss_and_stack/install/install-stack" >}}). Only upgrade after you've saved and backed up your data. -1. Start Redis if it didn't start automatically. +1. Follow the installation steps that correspond to your [Redis distribution]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) to install Redis 8. +1. Start Redis 8 if it didn't start automatically. -### Restore from saved files (if needed) +### Restore from saved files (if necessary) If Redis fails to start properly or if data is missing after the upgrade, restore from your backup.