FUNCTION-RESTORE(3valkey)

๐Ÿ“ฆ
version 9.0.6 ยท 2 versions
, in fedora 44

โœจ 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