{
  "id": "upgrade",
  "title": "rladmin upgrade",
  "url": "https://redis.io/docs/latest/operate/rs/8.0/references/cli-utilities/rladmin/upgrade/",
  "summary": "Upgrades a database's Redis version and modules.",
  "content": "\n## `upgrade db`\n\nSchedules a restart of the primary and replica processes of a database and then upgrades the database to the latest version of Redis.\n\nFor more information, see [Upgrade an existing Redis Software Deployment](https://redis.io/docs/latest/operate/rs/installing-upgrading/upgrading).\n\n```sh\nrladmin upgrade db { db:\u003cid\u003e | \u003cname\u003e }\n                [ preserve_roles ]\n                [ keep_redis_version ]\n                [ discard_data ]\n                [ force_discard ]\n                [ parallel_shards_upgrade ]\n                [ keep_crdt_protocol_version ]\n                [ redis_version \u003cversion\u003e ]\n                [ force ]\n                [ and module module_name \u003cmodule name\u003e version \u003cversion\u003e module_args \u003carguments string\u003e ]\n```\n\nAs of v6.2.4, the default behavior for `upgrade db` has changed.  It is now controlled by a new parameter that sets the default upgrade policy used to create new databases and to upgrade ones already in the cluster.  To learn more, see [`tune cluster default_redis_version`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/tune#tune-cluster).\n\nAs of Redis Software version 7.8.2, `upgrade db` will always upgrade modules.\n\n### Parameters\n\n| Parameters                 | Type/Value               | Description                                                                                                            |\n|----------------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------|\n| db                         | db:\\\u003cid\\\u003e \u003cbr /\u003ename     | Database to upgrade                                                                                                    |\n| and module | [upgrade module](#upgrade-module) command | Clause that allows the upgrade of a database and a specified Redis module in a single step with only one restart (can be specified multiple times). Deprecated as of Redis Software v7.8.2.  |\n| discard_data               |                          | Indicates that data will not be saved after the upgrade                                                                |\n| force                      |                          | Forces upgrade and skips warnings and confirmations                                                                    |\n| force_discard              |                          | Forces `discard_data` if replication or persistence is enabled                                                   |\n| keep_crdt_protocol_version |                          | Keeps the current CRDT protocol version                                                                                |\n| keep_redis_version       |                          | Upgrades to a new patch release, not to the latest major.minor version. Deprecated as of Redis Software v7.8.2. To upgrade modules without upgrading the Redis database version, set `redis_version` to the current Redis database version instead. |\n| parallel_shards_upgrade    | integer \u003cbr /\u003e'all'        | Maximum number of shards to upgrade all at once                                                                        |\n| preserve_roles             |                          | Performs an additional failover to guarantee the shards' roles are preserved                                             |\n| redis_version              | Redis version            | Upgrades the database to the specified version instead of the latest version                                               |\n\n### Returns\n\nReturns `Done` if the upgrade completed. Otherwise, it returns an error.\n\n### Example\n\n```sh\n$ rladmin upgrade db db:5\nMonitoring e39c8e87-75f9-4891-8c86-78cf151b720b\nactive - SMUpgradeBDB init\nactive - SMUpgradeBDB check_slaves\n.active - SMUpgradeBDB prepare\nactive - SMUpgradeBDB stop_forwarding\noactive - SMUpgradeBDB start_wd\nactive - SMUpgradeBDB wait_for_version\n.completed - SMUpgradeBDB\nDone\n```\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-07-23T12:05:56-05:00"
}
