w3resource

Redis Server: SLAVEOF

SLAVEOF host port

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. 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.

Syntax:

SLAVEOF host port

Available since

1.0.0.

Return Value

Simple string reply

Return Value Type

String

Previous: SHUTDOWN
Next: SLOWLOG



Follow us on Facebook and Twitter for latest update.