COPY
Since 1.1.0Keys
Syntax
COPY source destination [DB destination-db] [REPLACE]Copies the value at source to destination, with its expiry. source is left as it is.
Options
| Option | Effect |
|---|---|
DB destination-db | Copy into another database. |
REPLACE | Replace destination if it exists. |
Reply
1if the value was copied.0ifsourcedoes not exist, ordestinationexists andREPLACEwas not given.
Examples
> SET src v EX 100
OK
> COPY src dst
(integer) 1
> TTL dst
(integer) 100
> COPY src dst
(integer) 0
> COPY src dst REPLACE
(integer) 1
> COPY src other DB 1
(integer) 1