{
  "schema_version": 2,
  "id": "operate/oss_and_stack/install/upgrade/standalone",
  "title": "Upgrade a standalone Redis instance to Redis 8",
  "url": "https://redis.io/docs/latest/operate/oss_and_stack/install/upgrade/standalone/",
  "summary": "Upgrade a standalone instance of Redis Open Source or Redis Stack to Redis 8",
  "tags": [
    "docs",
    "operate",
    "stack",
    "oss"
  ],
  "last_updated": "2026-09-21T15:59:08+01:00",
  "page_type": "content",
  "content_hash": "f45e65dec3a400d344843b5aca5344d5ef31766ba984dd9e45282008014b9ca3",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "> [!NOTE]\n> The supported upgrade paths are:\n> - Redis Open Source 7.x (with or without modules) to Redis 8 in Redis Open Source\n> - Redis Stack 7.2 or 7.4 to Redis 8 in Redis Open Source\n\n> [!NOTE]\n> It's essential to practice upgrading Redis in a controlled environment before upgrading it in a production environment.\n> Docker is an excellent tool to use for this purpose.\n\nFollow these instructions to upgrade a single-node Redis server. This guide assumes you have installed Redis using one of the supported methods listed [here](https://redis.io/docs/latest/operate/oss_and_stack/install/archive)."
    },
    {
      "id": "save-your-current-data",
      "title": "Save your current data",
      "role": "content",
      "text": "Before upgrading, create a snapshot of your current dataset using the following command:\n\n[code example]\n\nThis 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.\n\nUse the following command to identify where your data directory is located:\n\n[code example]\n\nMake a copy of these files before proceeding:\n\n[code example]"
    },
    {
      "id": "upgrade-redis",
      "title": "Upgrade Redis",
      "role": "content",
      "text": "Follow these steps to upgrade Redis.\n\n1. Stop the current version of Redis Open Source or Redis Stack server.\n1. Follow the installation steps that correspond to your [Redis distribution](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack) to install Redis 8.\n1. Start Redis 8 if it didn't start automatically."
    },
    {
      "id": "restore-from-saved-files-if-necessary",
      "title": "Restore from saved files (if necessary)",
      "role": "content",
      "text": "If Redis fails to start properly or if data is missing after the upgrade, restore from your backup.\n\n1. Stop the Redis server.\n2. Copy the backup file back into the the Redis data directory:\n   [code example]\n3. Start Redis again and verify data is restored:\n   [code example]"
    },
    {
      "id": "verify-the-upgrade",
      "title": "Verify the upgrade",
      "role": "content",
      "text": "Use the following command to confirm you're running Redis 8:\n\n[code example]\n\nYou should also verify that your data is accessible and that your clients can connect successfully."
    }
  ],
  "examples": [
    {
      "id": "save-your-current-data-ex0",
      "language": "bash",
      "code": "redis-cli SAVE",
      "section_id": "save-your-current-data"
    },
    {
      "id": "save-your-current-data-ex1",
      "language": "bash",
      "code": "redis-cli CONFIG GET dir",
      "section_id": "save-your-current-data"
    },
    {
      "id": "save-your-current-data-ex2",
      "language": "bash",
      "code": "cp -r /path/to/redis-data-dir/ /path/to/backup/",
      "section_id": "save-your-current-data"
    },
    {
      "id": "restore-from-saved-files-if-necessary-ex0",
      "language": "bash",
      "code": "cp -r /path/to/backup/ /path/to/redis-data-dir/",
      "section_id": "restore-from-saved-files-if-necessary"
    },
    {
      "id": "restore-from-saved-files-if-necessary-ex1",
      "language": "bash",
      "code": "redis-cli INFO persistence",
      "section_id": "restore-from-saved-files-if-necessary"
    },
    {
      "id": "verify-the-upgrade-ex0",
      "language": "bash",
      "code": "redis-cli INFO server | grep redis_version",
      "section_id": "verify-the-upgrade"
    }
  ]
}
