Redis completes data migration through master-slave replication

Time:2021-2-22

Redis completes data migration through master-slave replication

Enter the new server and perform the slave configuration,slaveofCommand to configure the current redis host,infoCommand to view redis information. End of executionslaveofExecute after commandinfoCommand viewmaster_link_statusIf the value of isupIndicates that synchronization is complete. At this time, the role of redis is slave.

Execute after synchronizationslaveof no oneDisconnect the master and slave, and the redis role becomes the master.

$ redis-cli
127.0.0.1:6379 > slave of host IP host port
127.0.0.1:6379> info
127.0.0.1:6379> slaveof no one

Recommended Today

Third party calls wechat payment interface

Step one: preparation 1. Wechat payment interface can only be called if the developer qualification has been authenticated on wechat open platform, so the first thing is to authenticate. It’s very simple, but wechat will charge 300 yuan for audit 2. Set payment directory Login wechat payment merchant platform( pay.weixin.qq . com) — > Product […]