REPLICAOF

Since 1.1.0Server

Syntax

REPLICAOF host port | NO ONE
  • Flags: admin
  • ACL categories: @admin, @dangerous, @server, @slow
  • Arity: 3

Makes the server a replica of the master at host port, or, with NO ONE, a master. It is refused in cluster mode, where CLUSTER REPLICATE does it.

KiviDB does not chain replicas: give a replica's address, and the link does not come up, ROLE says connect, and the log says this server is a replica, and KiviDB does not chain replicas. Replicate every replica from the master. A master made a replica disconnects the replicas it had. Before 1.2, a replica accepted replicas of its own, sent them its data once and not the writes after, while their ROLE said connected.

Examples

> REPLICAOF NO ONE
OK