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

前端 未结 12 1043
耶瑟儿~
耶瑟儿~ 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

    Save a snapshot of the database into a dump.rdb by either running BGSAVE or SAVE from the command line. This will create a file named dump.rdb in the same folder as your redis server. See a list of all server commands.

    Copy this dump.rdb to the other redis server you want to migrate to. When redis starts up, it looks for this file to initialize the database from.

提交回复
热议问题