天蓬老师2017-04-21 11:20:29
The redis service has a replication function. You can execute the SLAVEOF command or set the slaveof option to let one server replicate another server, commonly known as "master-slave synchronization" (the replication logic of redis version 2.8 and versions lower than 2.8 is different, so you need to Note), therefore, data migration is divided into the following steps:
redis replication function customer reference: link description
In addition, the redis instance running on the external network must set up master-slave and turn on the persistence option (redis has two persistence strategies: RDB and AOF) to prevent single points of failure
PHP中文网2017-04-21 11:20:29
1. Back up the current redis, there will be a dump.rdb file
2. Copy the file to the redis directory of another server
3. Restart redis and it will be OK