diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-21 10:28:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:16:53 +0000 |
commit | 06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch) | |
tree | e82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/slaveof.md | |
parent | Initial commit. (diff) | |
download | iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip |
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/slaveof.md')
-rw-r--r-- | iredis/data/commands/slaveof.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/iredis/data/commands/slaveof.md b/iredis/data/commands/slaveof.md new file mode 100644 index 0000000..1250d43 --- /dev/null +++ b/iredis/data/commands/slaveof.md @@ -0,0 +1,25 @@ +**A note about the word slave used in this man page and command name**: Starting +with Redis 5 this command: starting with Redis version 5, if not for backward +compatibility, the Redis project no longer uses the word slave. Please use the +new command `REPLICAOF`. The command `SLAVEOF` will continue to work for +backward compatibility. + +The `SLAVEOF` command can change the replication settings of a replica on the +fly. If a Redis server is already acting as replica, the command `SLAVEOF` NO +ONE will turn off the replication, turning the Redis server into a MASTER. In +the proper form `SLAVEOF` 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, `SLAVEOF` hostname port will +stop the replication against the old server and start the synchronization +against the new one, discarding the old dataset. + +The form `SLAVEOF` 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 |