redis还原dump.rdb
从其他机器拷贝了redis的备份数据dump.rdb后,先停止redis服务,然后将新的dump.rdb覆盖掉旧的,再启动redis服务即可,参考stackoverflow的答案如下:
There is nothing specific to do. Just install the redis server on the new machine, and edit the configuration file. You just need to change the following parameters to point to the location of the dump file you have just copied. # The filename where to dump the DB dbfilename mydump.rdb # The working directory. # # The DB will be written inside this directory, with the filename specified # above using the ‘dbfilename‘ configuration directive. # # Also the Append Only File will be created inside this directory. # # Note that you must specify a directory here, not a file name. dir /data/mydirectory/ Finally, the redis server can be started in the normal way.
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。