DUMP

Since 1.1.0Keys

Syntax

DUMP key
  • Flags: readonly
  • ACL categories: @generic, @keyspace, @read, @slow
  • Arity: 2

Serializes the value at key into a payload that RESTORE turns back into the value.

The payload is in KiviDB's own snapshot format, with a 2-byte version and a CRC64 checksum at the end, as Redis does. It restores into KiviDB, not into Redis. Time series and vector sets, which Redis has no type for, dump and restore between KiviDB servers.

Reply

  • The payload, as a bulk string.
  • nil if the key does not exist.

Examples

> SET src hello
OK
> DUMP src
"\x01\x05\x00\x00\x00hello\n\x00..."