问题
So i just found REDIS an in-memory Database, the problem is that if my server crashes or something goes wrong with the REDIS server all my data will be lost. Thats when i tried to find a way to backup the data, RDB was my choice so i tried to find a tutorial for it. I didnt find any, so how could you setup RDB backups for REDIS in Node.Js? I know how to setup the REDIS server and a client for it, and add and get data from the server. Thats not the problem. Oh, and how can you restore the database after a crash from the RDB file? Thats it, i hope i get a response soon :D
回答1:
This question is not Node.js related.
You can setup Redis to use persistence mode via their official documentation
来源:https://stackoverflow.com/questions/50404895/how-to-setup-a-redis-database-with-rdb-backup-every-5mins-in-node-js