in case you are working on a linux machine, also recheck the file and folder permissions of the database.
The db and the path to it can be obtained via:
in redis-cli
:
CONFIG GET dir
CONFIG GET dbfilename
and in the commandline ls -l
. The permissions for the directory should be 755, and those for the file should be 644. Also, normally redis-server executes as the user redis
, therefore its also nice to give the user redis
the ownership of the folder by executing sudo chown -R redis:redis /path/to/rdb/folder
. This has been elaborated in the answer here.