How to disable persistence with redis? Ask Question

How to disable persistence with redis? Ask Question

I was wondering how to disable presistence in redis. There is mention of the possibility of doing this here: http://redis.io/topics/persistence. I mean it in the exact same sense as described there. Any help would be very much appreciated!

ベストアンサー1

To disable all data persistence in Redis do the following in the redis.conf file:

  1. Disable AOF by setting the appendonly configuration directive to no (it is the default value). like this:

    appendonly no
    
  2. Disable RDB snapshotting by commenting all of the save configuration directives (there are 3 that are defined by default) and explicitly disabling saving:

    #save 900 1
    #save 300 10
    #save 60 10000
    save ""
    

After change, make sure you restart Redis to apply them.

Alternatively, you can use the CONFIG SET command to apply these changes during runtime (just make sure you also do a CONFIG REWRITE to persist the changes).

注: Redis のバージョンによっては、レプリケーション関連のタスクのために Redis がディスクにアクセスできないようにするその他の調整があります。

おすすめ記事