COPY

Copies a key's value to a destination key.

Keys & expiration · Example verified

Syntax covered here

COPY source destination

The case copies an existing string to an unused destination without database or replacement options.

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
> COPY sample copied
1