{
  "schema_version": 2,
  "id": "operate/rs/references/cli-utilities/rladmin/failover",
  "title": "rladmin failover",
  "url": "https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/failover/",
  "summary": "Fail over primary shards of a database to their replicas.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-24T10:14:21+01:00",
  "page_type": "content",
  "content_hash": "1a9bf31e0f589e08f9beffc439b5bd28e015a8e4c14dd41277fa698e8bc9ed7b",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Fails over one or more primary (also known as master) shards of a database and promotes their respective replicas to primary shards.\n\n[code example]"
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Type/Value                     | Description                                                                                   |\n|-----------|--------------------------------|-----------------------------------------------------------------------------------------------|\n| db        | db:\\<id\\><br /> name           | Fail over shards for the specified database                                                   |\n| shard     | one or more primary shard IDs  | Primary shard or shards to fail over                                                          |\n| immediate |                                | Perform failover without verifying the replica shards are in full sync with the master shards |"
    },
    {
      "id": "returns",
      "title": "Returns",
      "role": "returns",
      "text": "Returns `Finished successfully` if the failover completed. Otherwise, it returns an error.\n\nUse [`rladmin status shards`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/status#status-shards) to verify that the failover completed."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": " sh",
      "code": "rladmin failover\n        [db { db:<id> | <name> }]\n        shard <id1 ... idN>\n        [immediate]",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": " sh",
      "code": "$ rladmin status shards\nSHARDS:\nDB:ID  NAME        ID         NODE     ROLE     SLOTS     USED_MEMORY    STATUS\ndb:5   tr01        redis:12   node:1   slave    0-16383   3.02MB         OK     \ndb:5   tr01        redis:13   node:2   master   0-16383   3.09MB         OK     \n$ rladmin failover shard 13\nExecuting shard fail-over: OOO.\nFinished successfully\n$ rladmin status shards\nSHARDS:\nDB:ID  NAME        ID         NODE     ROLE     SLOTS     USED_MEMORY    STATUS\ndb:5   tr01        redis:12   node:1   master   0-16383   3.12MB         OK     \ndb:5   tr01        redis:13   node:2   slave    0-16383   2.99MB         OK",
      "section_id": "example"
    }
  ]
}
