window環(huán)境redis通過AOF恢復數(shù)據(jù)的方法
更新時間:2020年11月24日 11:03:47 作者:qq_30366755
這篇文章主要介紹了window環(huán)境redis通過AOF恢復數(shù)據(jù)的方法,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
首先要啟動AOF持久化配置,在redis.windows-server.conf配置文件中做出如下更改
................ appendonly yes # The name of the append only file (default: "appendonly.aof") appendfilename "appendonly.aof" ..................................... # appendfsync always appendfsync everysec # appendfsync no ...................
.測試
加入不小心清空了數(shù)據(jù):
打開appendonly.aof 文件,將flushall命令刪除掉,并將這個文件放到redis根目錄下:
根目錄下輸入命令啟動redis服務器,要使用如下命令啟動,不然配置文件不會生效:
redis-server.exe redis.windows.conf
通過命令keys *,即可查看恢復的數(shù)據(jù)
到此這篇關于window環(huán)境redis通過AOF恢復數(shù)據(jù)的方法的文章就介紹到這了,更多相關redis通過AOF恢復數(shù)據(jù)內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Redis報錯:Could not create server TCP 
這篇文章主要介紹了Redis報錯:Could not create server TCP listening socket 127.0.0.1:6379: bind:解決方法,是安裝與啟動Redis過程中比較常見的問題,需要的朋友可以參考下2023-06-06