{
  "schema_version": 2,
  "id": "commands/function-restore",
  "title": "FUNCTION RESTORE",
  "url": "https://redis.io/docs/latest/commands/function-restore/",
  "summary": "Restores all libraries from a 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": "1c835308e1ba5a06da4b69e431650ed77e7720c97b06d95b43b06b18954b00f4",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Restore libraries from serialized payload.\n\nYou can use the optional [policy argument](#optional-arguments) to provide a policy for handling existing libraries.\n\n\nFor more information see [Introduction to Redis Functions](https://redis.io/docs/latest/develop/programmability/functions-intro)."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>serialized-value</code></summary>\n\nThe payload produced by [`FUNCTION DUMP`](https://redis.io/docs/latest/commands/function-dump).\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>FLUSH | APPEND | REPLACE</code></summary>\n\nPolicies for handling existing libraries:\n\n* `APPEND:` appends the restored libraries to the existing libraries and aborts on collision. \n  This is the default policy.\n* `FLUSH:` deletes all existing libraries before restoring the payload.\n* `REPLACE:` appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn't prevent function name collisions, only libraries.\n\n</details>"
    },
    {
      "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[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`."
    }
  ],
  "examples": []
}
