{
  "schema_version": 2,
  "id": "commands/dump",
  "title": "DUMP",
  "url": "https://redis.io/docs/latest/commands/dump/",
  "summary": "Returns a serialized representation of the value stored at a key.",
  "since": "2.6.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:32+01:00",
  "page_type": "content",
  "content_hash": "ec05975ed936cc1ff8100fdb3288886fee84ccd3831457c81c3bd57e29a4cbfe",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Serialize the value stored at key in a Redis-specific format and return it to\nthe user.\nThe returned value can be synthesized back into a Redis key using the [`RESTORE`](https://redis.io/docs/latest/commands/restore)\ncommand.\n\nThe serialization format is opaque and non-standard, however it has a few\nsemantic characteristics:\n\n* It contains a 64-bit checksum that is used to make sure errors will be\n  detected.\n  The [`RESTORE`](https://redis.io/docs/latest/commands/restore) command makes sure to check the checksum before synthesizing a\n  key using the serialized value.\n* Values are encoded in the same format used by RDB.\n* An RDB version is encoded inside the serialized value, so that different Redis\n  versions with incompatible RDB formats will refuse to process the serialized\n  value.\n\nThe serialized value does NOT contain expire information.\nIn order to capture the time to live of the current value the [`PTTL`](https://redis.io/docs/latest/commands/pttl) command\nshould be used.\n\nIf `key` does not exist a nil bulk reply is returned."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key to serialize.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The serialized value of the key.\n* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the key does not exist.\n\n**RESP3:**\n\nOne of the following:\n* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized value of the key.\n* [Null reply](../../develop/reference/protocol-spec#nulls): the key does not exist."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "> SET mykey 10\nOK\n> DUMP mykey\n\"\\x00\\xc0\\n\\n\\x00n\\x9fWE\\x0e\\xaec\\xbb\"",
      "section_id": "examples"
    }
  ]
}
