Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

FUNCTION DUMP

Last updated
FUNCTION DUMP
Group
Scripting and functions
Complexity
O(N) where N is the number of libraries
Arity
2 (exactly, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

FUNCTION DUMP returns all loaded libraries as one binary payload. Pass it to FUNCTION RESTORE, on this server or another HotKV server, to load the same libraries there. The payload holds the source code of each library, so restoring it compiles them again. With no libraries loaded, the payload is an empty string.

Case RESP2 RESP3
Always Bulk string: the payload Bulk string
127.0.0.1:6379> FUNCTION LOAD "#!lua name=util\nredis.register_function('echo', function(keys, args) return args[1] end)"
"util"
127.0.0.1:6379> FUNCTION DUMP
"#!lua name=util\nredis.register_function('echo', function(keys, args) return args[1] end)\x00"

The payload format is HotKV’s own. A payload from Redis or Valkey cannot be restored on HotKV and the other way round; to move libraries between them, load the source code with FUNCTION LOAD (you can get it from FUNCTION LIST WITHCODE).

FUNCTION RESTORE, FUNCTION LIST