Redis also supports master-slave backup to avoid single points of failure. Individuals in charge from the backup experiment, because the number of machines is limited, generally very few machines do support.
This article will describe how to achieve a master-slave backup of Redis on a single computer.
Multiple Redis instances are deployed on the same machine, in order to avoid conflicts, each instance needs to use a different port number. Very easy. When you start Redis, specify a different port number, or specify the port number in the configuration file. My experiment is the port number specified in the configuration file:
Then, at startup, specify the configuration file to start:
./redis-server./redis.conf
Can also be started in other ways, in detail to see the help of Redis-server:
./redis-server-h
In order to implement the master-slave backup, configure in the configuration file:
After starting the master separately from the Redis instance, Redis will proactively synchronize itself.
References: 1, redis official website: http://redis.io/topics/replication
Single-Machine deployment Redis master-slave backup