DUMP

Serializes a key's value for transfer to RESTORE.

Keys & expiration · Example verified

Syntax covered here

DUMP key

The case passes the captured payload to RESTORE under a new key and checks the recovered string with GET.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> SET sample value
"OK"
# connection: default
> DUMP sample
{"base64":"AAV2YWx1ZQsA6Cl8Szw1cuc=","bytes":17}
# Capture these exact bytes as payload.
# connection: default
> RESTORE restored 0 <captured:payload>
"OK"
# connection: default
> GET restored
"value"

A captured marker refers to raw bytes returned by an earlier request, not a literal string to type. Binary replies are displayed as Base64; the executable test passes the original bytes unchanged.