Redis重启数据丢失

在Linux安装了新的redis[2.8.24],使用redis-cli shutdown关闭redis.然后重启redis服务,redis中数据丢失。

原因可能是dump.rdb路径导致的,默认配置如下:

# The working directory.

#

# The DB will be written inside this directory, with the filename specified

# above using the 'dbfilename' configuration directive.

#

# The Append Only File will also be created inside this directory.

#

# Note that you must specify a directory here, not a file name.

dir  ./

将路径配置成绝对路径,例如:

dir /data/redis

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容