REPLICAOF

Since 1.1.0ServerKnown issue

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.

Known issue

A replica accepts replicas of its own, but sends them only its first snapshot and nothing after, while their ROLE says connected: replicate every replica from the master. Filed as kividb#144, fixed in 1.2.

Examples

> REPLICAOF NO ONE
OK