# The filename where to dump the DB
dbfilename dump.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 /var/lib/redis
4 回答
您可以在redis.conf文件(启动服务器)上设置文件位置,查看服务器配置:
找到当前保存文件的位置,这取决于你如何启动服务器 - 你有redis-server文件 - 我想你可以用
ps -e aux | grep redis
或ps -e | grep redis
找到它为了更有帮助...如何查找或设置redis保存dump.rdb文件的位置(ubuntu服务器):首先找到你redis.conf文件:在你的终端运行中:
我找到了我的redis.conf文件:
如果您的位置相同,请使用以下命令打开文件:
寻找:
根据您的“dbfilename”和“dir”的设置,这是您找到redis dump.rdb文件的位置 .
Update :要查看您的redis配置,请运行:
在我的(默认,Ubuntu)设置上,db文件位于
正如Christoffer指出的那样,您可以从命令行客户端看到所有设置
一个衬里获取目录和转储文件名