如何将 dump.rdb 文件加载到 redis 中?

Ale*_*lex 8 linux unix redis

我有一个 dump.rdb 文件,它与 redis.config 位于同一目录中。

当我开始我的服务器时:

redis-server ./redis.config
Run Code Online (Sandbox Code Playgroud)

它不会加载该 1 GB 文件中的数据。

我如何加载这些数据?

qua*_*nta 9

编辑您的配置文件以将dir选项设置为当前工作目录:

# 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 /current/working/directory
Run Code Online (Sandbox Code Playgroud)