Complete the command to check the role of the Redis instance.
redis-cli [1]The INFO replication command shows the role of the Redis instance (master or slave) and replication info.
Complete the command to promote a slave to master by making it writable.
redis-cli [1]The command SLAVEOF no one promotes the slave to master by stopping replication.
Fix the error in the command to make the current master a slave of the new master at 192.168.1.10 port 6379.
redis-cli [1] 192.168.1.10 6379
The correct command to make a Redis instance a slave is SLAVEOF followed by the master IP and port.
Fill both blanks to check the replication offset and connected slaves count.
redis-cli [1] | grep [2]
The INFO replication command shows replication stats, and connected_slaves filters the count of connected slaves.
Fill all three blanks to reset the old master as a slave of the new master at 10.0.0.5 port 6380 and make it read-only.
redis-cli [1] 10.0.0.5 [2] && redis-cli [3] slave-read-only yes
First, use SLAVEOF 10.0.0.5 6380 to make the old master a slave. Then use CONFIG SET slave-read-only yes to make it read-only.