Edit your config file to set the dir option to the current working directory:
# 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
We found we had to switch aof off beforehand otherwise redis creates a blank aof at boot and uses that instead of the rdb file. Once redis creates a populated aof then you can switch aof back on.
Edit your config file to set the
dir
option to the current working directory:Do as follow:
Restart the redis-server
Run
redis-cli BGREWRITEAOF
, to create a new appendonly file.Modify redis config
appendonly
toyes
and restart your redis-serverPlease see this
We found we had to switch aof off beforehand otherwise redis creates a blank aof at boot and uses that instead of the rdb file. Once redis creates a populated aof then you can switch aof back on.