summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/replicaof.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:19:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:20:07 +0000
commitdd874ab02db04853d4b5952712ab34693f9a93de (patch)
tree4b4e05d004da14862aa1680cf761476fa2b4a05c /iredis/data/commands/replicaof.md
parentReleasing debian version 1.12.1-1. (diff)
downloadiredis-dd874ab02db04853d4b5952712ab34693f9a93de.tar.xz
iredis-dd874ab02db04853d4b5952712ab34693f9a93de.zip
Merging upstream version 1.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/replicaof.md')
-rw-r--r--iredis/data/commands/replicaof.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/iredis/data/commands/replicaof.md b/iredis/data/commands/replicaof.md
index c8c839c..1c3ec93 100644
--- a/iredis/data/commands/replicaof.md
+++ b/iredis/data/commands/replicaof.md
@@ -1,21 +1,21 @@
-The `REPLICAOF` command can change the replication settings of a replica on the
-fly.
+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 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.
+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.
+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
+
+@examples
+
+```
+> REPLICAOF NO ONE
+"OK"
+
+> REPLICAOF 127.0.0.1 6799
+"OK"
+```