码迷,mamicode.com
首页 > 数据库 > 详细

redis还原dump.rdb

时间:2015-05-04 19:41:36      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

从其他机器拷贝了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.

  

redis还原dump.rdb

标签:

原文地址:http://www.cnblogs.com/jayzee/p/4476700.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!