Docs › Commands › KeysSWAPDBSince 1.1.0KeysSyntaxSWAPDB db1 db2Flags: writeACL categories: @dangerous, @server, @slow, @writeArity: 3Swaps 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 Related commandsSORT_ROTOUCHSORTTTLSCANTYPERESTOREUNLINKRENAMENXRENAME