v2-3.jpg
异常:

1:C 19 Aug 2021 00:09:37.558 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 19 Aug 2021 00:09:37.558 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 19 Aug 2021 00:09:37.558 # Configuration loaded
1:M 19 Aug 2021 00:09:37.559 * monotonic clock: POSIX clock_gettime
1:M 19 Aug 2021 00:09:37.559 * Running mode=standalone, port=6379.
1:M 19 Aug 2021 00:09:37.559 # Server initialized
1:M 19 Aug 2021 00:09:37.560 * Reading RDB preamble from AOF file...
1:M 19 Aug 2021 00:09:37.560 * Loading RDB produced by version 6.2.1
1:M 19 Aug 2021 00:09:37.560 * RDB age 25547 seconds
1:M 19 Aug 2021 00:09:37.560 * RDB memory usage when created 1.83 Mb
1:M 19 Aug 2021 00:09:37.560 * RDB has an AOF tail
1:M 19 Aug 2021 00:09:37.562 * Reading the remaining AOF tail...
1:M 19 Aug 2021 00:09:37.626 # Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>

修复:

[root@sre test]# redis-check-aof --fix appendonly.aof 
0x               0: Expected prefix 'R', got: '*'
AOF analyzed: size=65682010, ok_up_to=0, diff=65682010
This will shrink the AOF from 65682010 bytes, with 65682010 bytes, to 0 bytes
Continue? [y/N]: y
Successfully truncated AOF

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code