简体   繁体   中英

Redis data lost after server restart

如果单次写入( save 1 1 ),我已将Redis配置为使用RDB持久性方法每秒保存一次数据,但是在重启后仍然看到键值为nil。

Well I found that the Redis I used to start was with the command: redis-server &

This command is used to start every time with new key in database, so the data stored in snapshot and AOF files was ignored.

I changed the configuration to start the redis server with the correct path to database files and started the server with following command and its working fine now: /etc/init.d/redis_port start

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM