FUNCTION-RESTORE(3valkey)
โจ FUNCTION-RESTORE โจ
okay bestie, welcome to FUNCTION-RESTORE(3valkey) ๐ this is a page from the Valkey Command Manual and it's about putting your whole function library situation back from a payload. yes. we're doing this. ๐ซถ
๐ NAME
function-restore โ restores all libraries from a payload. that's it. that's the job. ๐
๐ SYNOPSIS
FUNCTION RESTORE serialized-value [FLUSH | APPEND | REPLACE]
๐ธ DESCRIPTION
Restore libraries from the serialized payload. bringing your little library babies back home ๐ โจ
You can use the optional policy argument to provide a policy for handling existing libraries. The following policies are allowed:
APPENDโ appends the restored libraries to the existing libraries and aborts on collision. This is the default policy. (so if you don't say anything, this is what you get, and if there's a name clash it just gives up ๐ญ)FLUSHโ deletes all existing libraries before restoring the payload. scorched earth, no survivors, clean slate ๐๐ฅ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. (so like. it'll swap out libraries with the same name but it is NOT out here saving you from function-level clashes, ok? be aware.)
For more information please refer to valkey-functions-intro(7) Introduction to Valkey Functions. iykyk ๐
๐ฌ REPLY
valkey-protocol(7) Simple string reply: OK.
just OK. simple. clean. iconic. โจ
โก COMPLEXITY
O(N) where N is the number of functions on the payload
so like, the more functions you packed in there, the more work it is. math is math ๐งฎ
๐ ACL CATEGORIES
@scripting @slow @write
๐ฐ๏ธ HISTORY
- Available since:
7.0.0
๐ SEE ALSO
eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-stats(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)
and that's the whole page bestie!! ๐โจ๐๐ฆ๐ธ๐ ๐ซถ
this lil manual page is from Valkey 9.0.0, dated 2025-10-21, and it's the FUNCTION-RESTORE(3valkey) page. go forth and restore your libraries, you absolute main character ๐๐โญ
๐ฆ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 ยท CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 ยท CC-BY-SA-4.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms