Latest web development tutorials

Redis Dump command

Redis key (key)

Redis DUMP command sequence of a given key, and return the serialized value.

grammar

redis DUMP command basic syntax is as follows:

redis 127.0.0.1:6379> DUMP KEY_NAME

Available versions

> = 2.6.0

return value

If the key does not exist, it returns nil. Otherwise, the return value after serialization.

Examples

First, we create a key and set the value in redis.

redis> SET greeting "hello, dumping world!"
OK

Now use DUMP sequence of keys.

redis> DUMP greeting
"\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde"

redis> DUMP not-exists-key
(nil)

Redis key (key)