redis 写入报错 1)报错内容 Exception in thread "main" redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled.
众所周知,redis是内存数据库,它把数据存储在内存中,这样在加快读取速度的同时也对数据安全性产生了新的问题,即当redis所在服务器发生宕机后,redis数据库里的所有数据将会全部丢失. 为了解决这个问题,redis提供了持久化功能——RDB和AOF.通俗的讲就是将内存中的数据写入硬盘中. 一.持久化之全量写入:RDB [redis@]$ more /usr/local/redis/conf/redis.conf save save save dbfilename "dump.rdb"
# Redis configuration file example # Note on units: when memory size is needed, it is possible to specify # it in the usual form of 1k 5GB 4M and so forth: # 内存大小的配置,下面是内存大小配置的转换方式 # # 1k => 1000 bytes # 1kb => 1024 bytes # 1m => 1000000 bytes #
# Redis configuration file example # Note on units: when memory size is needed, it is possible to specify# it in the usual form of 1k 5GB 4M and so forth:# 内存大小的配置,下面是内存大小配置的转换方式## 1k => 1000 bytes# 1kb => 1024 bytes# 1m => 1000000 bytes# 1mb =&g