ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How To Set Up a Redis Slave

    IT Discussion
    nosql redis how to
    1
    1
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by scottalanmiller

      So you have a new Redis server installed and you want to make it a slave of another node. This is a very common Redis task but the Redis documentation is terrible, even for the easiest stuff. Once your new Redis server is up and running it is as easy as this (assuming that 10.10.10.2 is the IP address of the current Redis master and that it is listening on the default Redis port of 6379)....

      On the "to be" slave

      redis-cli slaveof 10.10.10.2 6379
      

      And that is it. The system should slave itself to the selected master and begin syncing up immediately. You can view the status of this process with...

      redis-cli info
      

      Specifically you can see if the role has taken:

      redis-cli info | grep role
      

      This should be "role:slave" if it was successful. And now let's see if it successfully could see the master:

      redis-cli info | grep master_link_status
      
      1 Reply Last reply Reply Quote 2
      • 1 / 1
      • First post
        Last post