{
  "schema_version": 2,
  "id": "operate/rs/references/cli-utilities/crdb-cli/crdb/upgrade",
  "title": "crdb-cli crdb upgrade",
  "url": "https://redis.io/docs/latest/operate/rs/references/cli-utilities/crdb-cli/crdb/upgrade/",
  "summary": "Upgrades an Active-Active database.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-10-05T17:53:21+03:00",
  "page_type": "content",
  "content_hash": "faac22f71fef0ee888bb0e4aa3f66ab7db8a65cbb3aac9c421dc5632e7cfccc5",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Upgrades the Redis version and modules of an Active-Active database.\n\n[code example]\n\nBefore you run this command, upgrade Redis Software to version 8.0.18 or later on each participating cluster in the Active-Active database and complete the other [upgrade prerequisites](https://redis.io/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active#upgrade-prerequisites). For the full procedure, see [Upgrade an Active-Active database](https://redis.io/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active)."
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Value | Description |\n|-----------|-------|-------------|\n| crdb-guid \\<guid\\> | string | GUID of the Active-Active database (required) |\n| redis-version \\<version\\> | string | Upgrades the database to the specified Redis version instead of the latest version bundled with Redis Software |\n| preserve-roles | | Preserves the shards' primary and replica roles. Requires an extra failover. |\n| parallel-shards-upgrade \\<number\\> | integer or `all` | Maximum number of shards to upgrade in parallel (default: all) |\n| keep-crdt-protocol-version | | Keeps the current CRDB protocol version. See [CRDB protocol version guidelines](https://redis.io/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active#crdb-protocol-version-guidelines). |\n| keep-crdt-featureset-version | | Keeps the current CRDB feature set version. See [Feature set version guidelines](https://redis.io/docs/latest/operate/rs/installing-upgrading/upgrading/upgrade-active-active#feature-set-version-guidelines). |\n| discard-data | | Discards data in a non-replicated, non-persistent database |\n| force-discard | | Discards data even if the database is replicated or persistent |\n| force-restart | | Restarts the shards even if the version doesn't change |\n| no-wait | | Does not wait for the task to complete |"
    },
    {
      "id": "returns",
      "title": "Returns",
      "role": "returns",
      "text": "Returns the task ID of the task that is upgrading the database.\n\nIf `--no-wait` is specified, the command exits. Otherwise, it waits for the upgrade to finish and returns `finished`. To check the status of a task started with `--no-wait`, use [`crdb-cli task status`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/crdb-cli/task/status)."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "The following example upgrades an Active-Active database to the default Redis version and preserves the shards' roles:\n\n[code example]\n\nThe following example upgrades an Active-Active database to a specific Redis version:\n\n[code example]"
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "sh",
      "code": "crdb-cli crdb upgrade --crdb-guid <guid>\n         [--redis-version <version>]\n         [--preserve-roles]\n         [--parallel-shards-upgrade <number>]\n         [--keep-crdt-protocol-version]\n         [--keep-crdt-featureset-version]\n         [--discard-data]\n         [--force-discard]\n         [--force-restart]\n         [--no-wait]",
      "section_id": "overview"
    },
    {
      "id": "examples-ex0",
      "language": "sh",
      "code": "$ crdb-cli crdb upgrade --crdb-guid <crdb-guid> --preserve-roles\nTask <task-id> created\n  ---> CRDB GUID Assigned: crdb:<crdb-guid>\n  ---> Status changed: queued -> started\n  ---> Status changed: started -> finished",
      "section_id": "examples"
    },
    {
      "id": "examples-ex1",
      "language": "sh",
      "code": "$ crdb-cli crdb upgrade --crdb-guid <crdb-guid> --redis-version <version> --preserve-roles\nTask <task-id> created\n  ---> CRDB GUID Assigned: crdb:<crdb-guid>\n  ---> Status changed: queued -> started\n  ---> Status changed: started -> finished",
      "section_id": "examples"
    }
  ]
}
