Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 知乎专栏 | 视频教程 | About

41.2. (error) MISCONF Redis is configured to save RDB snapshots

(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.


# redis-cli> config set stop-writes-on-bgsave-error no
OK> set name neo
OK> get name



CONFIG GET dbfilename

config set stop-writes-on-bgsave-error yes
CONFIG SET dir /tmp
CONFIG SET dbfilename temp.rdb


# redis-cli> CONFIG GET dir
1) "dir"
2) "/"> CONFIG GET dbfilename
1) "dbfilename"
2) "dump.rdb"> config set stop-writes-on-bgsave-error yes
OK> CONFIG SET dir /tmp
OK> set test aaaa
OK> get test

如果确认是 dir 权限问题,我们就通过修改redis.conf 中得dir配置解决。