How to save only one database in Redis?

后端 未结 1 1252
故里飘歌
故里飘歌 2021-01-22 06:35

I\'m new to Redis and I have an issue related to backup.

For now, I have one instance running on a windows server. Inside this instance, I have currently one \"job\" tha

1条回答
  •  迷失自我
    2021-01-22 06:42

    You CANNOT achieve that. With a single Redis instance, you can either save all databases, or save none of them.

    In your case, you should create two Redis instances: one of which does no backup, while the other saves its databases to disk. Since you only have one server, you should bind these two instances to different ports.

    Redis has very small memory footprint. Two instance DO NOT have performance penalty.

    0 讨论(0)
提交回复
热议问题