Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 redis.conf 中启用了 'appendonly' 值,但 Redis 仍然无法在磁盘上保存数据。每当数据库中发生变化时,我都想保存数据。即使我杀死了 Redis 服务器,我也不会丢失数据。请给我一些建议。
我有同样的问题,问题是当你“config set appendonly yes”时它只会改变正在运行的实例。当您启动 rdis-server.exe 时,它会启动一个新实例,因为没有指定配置文件。要解决这个问题显然是使用
CMD:“C:\Program Files\Redis\redis-server.exe conf/redis.conf”
确保您也以管理员模式运行 cmd 。
现在您可以编辑 redis.conf 中的设置,该设置将在开始时加载。