How do I move a redis database from one server to another?

前端 未结 12 1094
耶瑟儿~
耶瑟儿~ 2020-12-12 09:27

I currently have a live redis server running on a cloud instance and I want to migrate this redis server to a new cloud instance and use that instance as my new redis server

12条回答
  •  感情败类
    2020-12-12 10:05

    The simple way I found to export / Backup Redis data (create dump file ) is to start up a server via command line with slaveof flag and create live replica as follow (assuming the source Redis is 1.2.3.4 on port 6379):

    /usr/bin/redis-server --port 6399 --dbfilename backup_of_master.rdb --slaveof 1.2.3.4 6379
    

提交回复
热议问题