{
  "schema_version": 2,
  "id": "commands/function-dump",
  "title": "FUNCTION DUMP",
  "url": "https://redis.io/docs/latest/commands/function-dump/",
  "summary": "Dumps all libraries into a serialized binary payload.",
  "since": "7.0.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": "105534925c98410b053d6e0e3244bfb707c355c5cde2377e5b8f1a4622bcb5f2",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Return the serialized payload of loaded libraries.\nYou can restore the serialized payload later with the [`FUNCTION RESTORE`](https://redis.io/docs/latest/commands/function-restore) command.\n\nFor more information please refer to [Introduction to Redis Functions](https://redis.io/docs/latest/develop/programmability/functions-intro)."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "The following example shows how to dump loaded libraries using `FUNCTION DUMP` and then it calls [`FUNCTION FLUSH`](https://redis.io/docs/latest/commands/function-flush) deletes all the libraries.\nThen, it restores the original libraries from the serialized payload with [`FUNCTION RESTORE`](https://redis.io/docs/latest/commands/function-restore).\n\n[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\n[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized payload\n\n**RESP3:**\n\n[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized payload"
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "redis> FUNCTION LOAD \"#!lua name=mylib \\n redis.register_function('myfunc', function(keys, args) return args[1] end)\"\n\"mylib\"\nredis> FUNCTION DUMP\n\"\\xf5\\xc3@X@]\\x1f#!lua name=mylib \\n redis.registe\\rr_function('my@\\x0b\\x02', @\\x06`\\x12\\nkeys, args) 6\\x03turn`\\x0c\\a[1] end)\\x0c\\x00\\xba\\x98\\xc2\\xa2\\x13\\x0e$\\a\"\nredis> FUNCTION FLUSH\nOK\nredis> FUNCTION RESTORE \"\\xf5\\xc3@X@]\\x1f#!lua name=mylib \\n redis.registe\\rr_function('my@\\x0b\\x02', @\\x06`\\x12\\nkeys, args) 6\\x03turn`\\x0c\\a[1] end)\\x0c\\x00\\xba\\x98\\xc2\\xa2\\x13\\x0e$\\a\"\nOK\nredis> FUNCTION LIST\n1) 1) \"library_name\"\n   2) \"mylib\"\n   3) \"engine\"\n   4) \"LUA\"\n   5) \"functions\"\n   6) 1) 1) \"name\"\n         2) \"myfunc\"\n         3) \"description\"\n         4) (nil)\n         5) \"flags\"\n         6) (empty array)",
      "section_id": "examples"
    }
  ]
}
