我是Redis的新手,我試圖刪除Ram上的一個鍵,但它已經存在於磁盤上的啞文件中。重新啓動服務器後,Ram上的密鑰已存在。請幫幫我。如何在RAM和磁盤之間同步數據?如何刪除磁盤上的Redis密鑰?
回答
取決於您的配置文件,您可以修改您redis config file
,如
appendonly yes
appendfsync always
# appendfsync everysec
# append
希望幫助。
appendonly yes
appendfsync always
# appendfsync everysec
# append
做到像上面所說Javy肯定是要去幫助,這使AOF和RAM確保數據同步到磁盤上的每一秒。 另一種方法是發出一個BGSAVE命令來立即產生一個新的dump.rdb文件。我認爲你應該修改自動轉儲執行的頻率。這是在redis.conf中。查看項目保存。
想我最好的後段相對爲你:
################################ SNAPSHOTTING ################################
#
# Save the DB on disk:
#
# save <seconds> <changes>
#
# Will save the DB if both the given number of seconds and the given
# number of write operations against the DB occurred.
#
# In the example below the behaviour will be to save:
# after 900 sec (15 min) if at least 1 key changed
# after 300 sec (5 min) if at least 10 keys changed
# after 60 sec if at least 10000 keys changed
#
# Note: you can disable saving completely by commenting out all "save" lines.
#
# It is also possible to remove all the previously configured save
# points by adding a save directive with a single empty string argument
# like in the following example:
#
# save ""
如果您DONOT知道如何更改配置文件,按照指定的順序鍵入以下命令:
config set appendonly yes
config set appendonly everysec
config rewrite
如果有什麼不清楚的地方,請隨時回覆。
我只是配置如你建議的,但它不工作。請幫助我,下面是我的配置文件。它有什麼不對嗎? [鏈接文件配置](http://www.mediafire.com/view/k03ckybn2yvb6j2/redis.windows.conf) – Ducthien
你的conf文件是可以的,但你可能會改變「appendfsync總是 」到「appendfsync everysec」到使您的Redis運行得更快。 –
我認爲問題可能在於如何重新啓動您的Redis服務器。你能告訴我你用來重新啓動你的redis的確切命令嗎? –
- 1. 在redis中,我如何刪除密鑰?
- 2. 春季Redis刪除不刪除密鑰
- 3. Redis不刪除會話密鑰
- 4. Redis:如何刪除所有超過3個月的密鑰
- 5. 在redis實例上刪除密鑰的終端快捷方式
- 6. 如何刪除HSTORE密鑰?
- 7. Node_redis - 如何刪除密鑰?
- 8. 從redis刪除鍵/值 - 幻影密鑰沒有刪除
- 9. redis如何過期密鑰?
- 10. QFileSystemModel和QFileSystemWatcher從磁盤上刪除
- 11. 何時刪除Azure網站中的Redis密鑰?
- 12. Azure刪除孤立磁盤
- 13. 將只有一部分Redis密鑰保存到磁盤的最佳方法
- 14. 如何刪除遠程磁盤上的ACL
- 15. 如何刪除本地磁盤上的Clear-Case視圖
- 16. 如何刪除emberjs中的密鑰?
- 17. Redis磁盤大小巧合?
- 18. 刪除母密鑰
- 19. 爲什麼刪除密鑰空間數據並未通過磁盤的快照文件刪除?
- 20. 無法從Redis中的HASH中刪除密鑰
- 21. Redis在BGSAVE後立即刪除我的所有密鑰
- 22. 如何從散列中刪除密鑰?
- 23. 如何從HashMap中刪除密鑰?
- 24. 如何在Devexpress XPO上刪除舊密鑰後創建雙重密鑰?
- 25. Redis服務器從dump.rdb加載後刪除所有密鑰
- 26. 在到期時間後,redis密鑰沒有被刪除
- 27. github如何刪除我的mac上舊的ssh密鑰?
- 28. 如何在Redis HyperLogLog中清除密鑰的值
- 29. 如何在redis中清除密鑰的值
- 30. 如何刪除PK列/密鑰上的ROWGUID指定
請幫助我,我不知道爲什麼它不工作。 這裏是我的配置文件 - redis.windows-service.conf(http://www.mediafire.com/view/89o0ff9df8bb0bb/redis.windows-service.conf) 和redis.windows.conf(http:// www .mediafire.com/view/3rhdxkdo9i1l6l8/redis.windows%282%29.conf) – Ducthien