From 06cba6ccd165ca8b224797e37fccb9e63f026d77 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 21 Mar 2020 11:28:17 +0100 Subject: Adding upstream version 1.9.1. Signed-off-by: Daniel Baumann --- iredis/data/commands/replicaof.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 iredis/data/commands/replicaof.md (limited to 'iredis/data/commands/replicaof.md') diff --git a/iredis/data/commands/replicaof.md b/iredis/data/commands/replicaof.md new file mode 100644 index 0000000..c8c839c --- /dev/null +++ b/iredis/data/commands/replicaof.md @@ -0,0 +1,21 @@ +The `REPLICAOF` command can change the replication settings of a replica on the +fly. + +If a Redis server is already acting as replica, the command `REPLICAOF` NO ONE +will turn off the replication, turning the Redis server into a MASTER. In the +proper form `REPLICAOF` hostname port will make the server a replica of another +server listening at the specified hostname and port. + +If a server is already a replica of some master, `REPLICAOF` hostname port will +stop the replication against the old server and start the synchronization +against the new one, discarding the old dataset. + +The form `REPLICAOF` NO ONE will stop replication, turning the server into a +MASTER, but will not discard the replication. So, if the old master stops +working, it is possible to turn the replica into a master and set the +application to use this new master in read/write. Later when the other Redis +server is fixed, it can be reconfigured to work as a replica. + +@return + +@simple-string-reply -- cgit v1.2.3