How can I stop redis-server?
A cleaner, more reliable way is to go into redis-cli and then type shutdown
In redis-cli, type help @server
and you will see this near the bottom of the list:
SHUTDOWN - summary: Synchronously save the dataset to disk and then shut down the server since: 0.07
And if you have a redis-server instance running in a terminal, you'll see this:
User requested shutdown...[6716] 02 Aug 15:48:44 * Saving the final RDB snapshot before exiting.[6716] 02 Aug 15:48:44 * DB saved on disk[6716] 02 Aug 15:48:44 # Redis is now ready to exit, bye bye...