Redis dump.rdb appendonly.aof 文件路径修改

来源:互联网 发布:界面编程 编辑:程序博客网 时间:2024/05/19 02:45
# 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  ./

-------------------------

这里默认是启动后的相对路径也就是你的redis在哪里启动,dump.rdb 文件或者appendonly.aof
文件就会产生在启动所在的目录;

这也就是有些人重启后key值消失的原因,那是因为又产生了其他ump.rdb 文件或者appendonly.aof

这里建议改成绝对路径

dir /usr/local/redis/data/


原创粉丝点击