Redis – Server Slaveof Command

  • Post author:
  • Post category:Redis
  • Post comments:2 Comments

Redis SLAVEOF command can change the replication settings of a slave on the fly. If a Redis server is already acting as a slave, 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 slave of another server listening at the specified hostname and port. If a server is already a slave 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.

Return Value

Simple string reply.

Syntax

Following is the basic syntax of Redis SLAVEOF command.

redis 127.0.0.1:6379> SLAVEOF host port

This Post Has 2 Comments

Leave a Reply