redis文件损坏Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix

出现这个错误,就是你的文件损坏了,不要担心,跟我做:
首先备份appendonly.aof文件

修复文件:找到你的redis-check-aof文件位置,然后按提示执行修复:
$ /usr/local/bin/redis-check-aof --fix appendonly.aof
0x 220efe2: Expected prefix '*', got: '
AOF analyzed: size=35713024, ok_up_to=35712994, diff=30
This will shrink the AOF from 35713024 bytes, with 30 bytes, to 35712994 bytes
Continue? [y/N]: y
Successfully truncated AOF

京ICP备11047313号-19 彩虹岛电子书