SWAPDB

Since 1.1.0Keys

Syntax

SWAPDB db1 db2
  • Flags: write
  • ACL categories: @dangerous, @server, @slow, @write
  • Arity: 3

Swaps the contents of two databases in one step, keys and expiries together. Clients connected to either see the other's keys from then on.

Reply

  • OK.

Examples

> SWAPDB 0 1
OK