--service-stop or stopping windows service doesnt save #442
Description
Hi, I installed redis as a windows service. I am trying to figure out how I can gracefully shutdown the windows service so that the keys are persisted. I noticed that when I issue a SHUTDOWN command on redis-cli, the key I set 1 min ago were persisted, and the logs indicated so.
[1064] 07 Apr 20:08:52.021 # User requested shutdown...
[1064] 07 Apr 20:08:52.021 * Saving the final snapshot before exiting.
[1064] 07 Apr 20:08:52.031 * DB saved on disk
[1064] 07 Apr 20:08:52.031 # Redis is now ready to exit, bye bye...
However if I stop the windows service through the GUI (services.msc) or with redis-server --service-stop, redis stop abruptly. When i restart the redis service, the key I set 1 min ago wasn't there as expected.
Is there a way we can manage this (other than maybe using aof)? I do not want to lose the persistency from an unmanaged server restart.
This is on a windows server 2012 machine.