使用redis-migrate-tool的时候,有可能抛出以下错误

[2019-10-18 04:05:49.267] rmt_redis.c:6446 ERROR: Can't handle RDB format version 839003080
[2019-10-18 04:05:49.267] rmt_redis.c:6715 ERROR: Rdb file for node[127.0.0.1:7002@17002] parsed failed

原因

redis-migrate-tool迁移工具最高支持到rdb7版本,而你使用的redis生成rdb版本已经超过了7,例如,你是用的redis5.0

解决方式:

1.降低redis版本

2.修改redis-migrate-tool源码后重新编译

修改 rmt_redis.c 文件,将7改为10或更高的数

/* ========================== Redis RDB ============================ */
/* The current RDB version. When the format changes in a way that is no longer* backward compatible this number gets incremented. */
#define REDIS_RDB_VERSION 7   ###修改这行,将7改为10

注意

你需要保证你的redis中没有用到redis的高级特性。高级特性可以参考如下地址:

https://github.com/sripathikrishnan/redis-rdb-tools/blob/master/docs/RDB_Version_History.textile

为了防止地址发生变更,我将目前为止的列到下面

Redis RDB Version History

This document tracks the changes made to the dump file format over time.

Redis dump file is 100% backwards compatible. An older dump file format will always work with a newer version of Redis.

Version 9 - redis 5.0

The following additions have been made :

  1. New Streams data type
  2. The RDB can contain LRU or LFU of the keys
  3. The RDB can contain Module AUX fields

Version 8 - redis 4.0

The following additions have been made :

  1. New Modules data types
  2. Sorted sets store binary double values instead of strings

Version 7 - redis 3.2

The following additions have been made :

  1. New QuickList encoding
  2. New AUX fields with metadata
  3. New DBSIZE opcode

Version 6 - redis 2.8

In previous versions, ziplists used a variable length encoding scheme for integers.
Integers were stored in 16, 32 or 64 bits. In this version, this variable length
encoding system has been extended.

The following additions have been made :

  1. Integers 0 through 12, both inclusive, are now encoded as part of the entry header
  2. Numbers between -128 and 127, both inclusive, are stored in 1 byte
  3. Numbers between -2^23 and 2^23 -1, both inclusive, are stored in 3 bytes

Issue ID : https://github.com/antirez/redis/issues/469

To migrate to version 5 :

  1. In redis.conf, set list-max-ziplist-entries to 0
  2. Restart Redis Server, and issue the SAVE command
  3. Edit the dump.rdb file, and change the rdb version in the header to REDIS0005

Version 5 - redis 2.4

This version introduced an 8 byte checksum (CRC-32) at the end of the file. If checksum is disabled in redis.conf,
the last 8 bytes will be zeroes.

Issue ID : https://github.com/antirez/redis/issues/366

To migrate to version 4 -

  1. Delete the last 8 bytes of the file (i.e. after the byte 0xFF)
  2. Change the rdb version in the header to REDIS0004

Version 4

This version introduced a new encoding for hashmaps - “Hashmaps encoded as Zip Lists”. This version also deprecates
the Zipmap encoding that was used in previous versions.

“Hashmaps encoded as ziplists” has encoding type = 13. The value is parsed like a ziplist, and adjacent entries
in the list are considered key=value pairs in the hashmap.

Issue ID : https://github.com/antirez/redis/pull/285

To migrate to version 3 -

  1. In redis.conf, set hash-max-ziplist-entries to 0
  2. Restart Redis Server, and issue the SAVE command
  3. Edit the dump.rdb file, and change the rdb version in the header to REDIS0003

Version 3

This version introduced key expiry with millisecond precision.

Earlier versions stored key expiry in the format 0xFD <4 byte timestamp>. In version 3, key expiry is stored as
0xFC <8 byte timestamp>. Here, 0xFD and 0xFC are the opcodes to indicate key expiry in seconds and milliseconds respectively.

Issue ID : https://github.com/antirez/redis/issues/169

To migrate to version 2 -

  1. If you don’t use key expiry, simply change the version in the header to REDIS0002
  2. If you use key expiry, you can still migrate, but there will be some loss in expiry precision. Also, the migration is a bit involved.
  3. For each key=value pair in the dump file, you will have to convert 0xFC <8 byte timestamp> to 0xFD <4 byte timestamp>.
  4. After converting the timestamps, change the version in the header to REDIS0002

Version 2

This version introduced special encoding for small hashmaps, lists and sets.

Specifically, it introduced the following encoding types -

REDIS_RDB_TYPE_HASH_ZIPMAP = 9
REDIS_RDB_TYPE_LIST_ZIPLIST = 10
REDIS_RDB_TYPE_SET_INTSET = 11
REDIS_RDB_TYPE_ZSET_ZIPLIST = 12

Commit : https://github.com/antirez/redis/commit/6b52ad87c05ca2162a2d21f1f5b5329bf52a7678

To migrate to version 1 -

  1. In redis.conf, set the following properties to 0 hash-max-zipmap-entries, list-max-ziplist-entries, set-max-intset-entries, zset-max-ziplist-entries
  2. Restart Redis, and issue the SAVE command
  3. Edit the dump.rdb file, and change the rdb version in the header to REDIS0001

rmt_redis.c:6446 ERROR: Can't handle RDB format version redis-migrate-tool迁移工具报错相关推荐

  1. Communication error with Jack server , try ‘jack-diagnose‘ or see Jack server log 报错解决办法

    创作不易,请尊重原创,转载注明出处: https://blog.csdn.net/An_Times/article/details/121334749 Communication error with ...

  2. ERROR: Cannot uninstall ‘llvmlite‘. It is a distutils installed project. 此类报错的解决办法

    ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project. 此类报错的解决办法 报错的原因:这是一个distuti ...

  3. xx.xib: error: Illegal Configuration: Safe Area Layout Guide before iOS 9.0报错问题解决

    之前是用xcode8.3.3创建的工程最近升级到Xcode9.0 遇见了这个问题 在Xcode 9.0以上 新建xib文件会报错 xx.xib: error: Illegal Configuratio ...

  4. error while loading shared libraries: libopencv_core.so.3.4: cannot open 报错解决方法

    报错: build_release/tools/caffe: error while loading shared libraries: libopencv_core.so.3.4: cannot o ...

  5. redis集群搭建报错-(error) CLUSTERDOWN The cluster is down

    [README] 最近搭建一个redis集群,参考博文 (https://www.cnblogs.com/mafly/p/redis_cluster.html) 对集群配置后,master, slav ...

  6. [原]openstack-kilo--issue(十八) Error parsing template file: Template format version not found.

    在创建stack的时候出现的报错: ]# heat stack-create nems_demo -e AAA.yaml -f AAA.parameter.yaml Error parsing tem ...

  7. python pip下载本地依赖包,并在离线环境中安装,并解决报错ERROR: Could not find a version that satisfies the requirement报错

    文章目录 步骤1:导出依赖 步骤2:离线下载依赖包 步骤3:进入新环境使用python安装依赖 整体思路如下: 首先根据项目需要导出依赖包,由于本地的python环境中其实安装了很多乱七八糟的包,这些 ...

  8. 解决this._data.$$state...“Error: [vuex] do not mutate vuex store state outside mutation handlers.“ 报错

    今天遇到了这样一个报错: [Vue warn]: Error in callback for watcher "function () {return this._data.$$state; ...

  9. ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project. 此类报错的解决办法

    报错的原因:这是一个distutils安装的项目,因此我们无法准确确定属于该文件的文件,这只会导致部分卸载. 一般是你安装的版本是新版的,需要uninstall旧版的,但是由于直接使用pip unin ...

  10. Error: spawn node.cmd ENOENT node自启动工具supervisor cmd运行报错解决方法

    最近开始重新入坑node,发现了一个有意思的node自启动工具:supervisor. 但是,由于某些原因当我在使用这个工具一直报错. 网上找了很多方法,试过重装node,也试过修改node环境变量, ...

最新文章

  1. 学习笔记95—不要错过的科研神器
  2. asp下载防盗链代码
  3. SIT和UAT有什么区别?
  4. python中print用法
  5. MFC文档/视图结构体系及SDI回顾(2)
  6. BZOJ.4555.[HEOI2016TJOI2016]求和(NTT 斯特林数)
  7. 一个百亿级日志系统是怎么设计出来的?
  8. 如何给Blazor.Server加个API鉴权?
  9. nssl1446-小智的旅行【dp】
  10. apache.camel_Apache Camel 3.1 – XML路由的快速加载
  11. java多线程 Java核心技术 读书笔记
  12. UG12.0运动仿真分析基础到精通视频教程
  13. 什么是端口映射?如何设置端口映射?
  14. 联想拯救者y7000p电池怎么卸下来_联想拯救者R7000P怎么样 联想拯救者R7000P全面评测_笔记本_硬件教程...
  15. 【AcWing 327. 玉米田】状压dp
  16. 【序列建模】DIN深度兴趣网络
  17. C++之一些事一些情--变量值的溢出问题
  18. 网络基础笔记(四)不同网段通信
  19. 开挂集福:快速集齐支付宝五福最强攻略
  20. `Computer-Algorithm` 有向无环图DAG

热门文章

  1. 为什么建议每个开发人员都需要学Python?
  2. 深入浅出设计模式 ------ Abstract Factory(抽象工厂)
  3. 数学分析:函数的可积条件
  4. JavaScript高级程序设计(第三版)pdf版 下载
  5. 此计算机缺少vc2005_spl_with_atl_fix_redist解决问题
  6. Javacv录制视频
  7. vb mysql 实例教程_在VB.NET应用中使用MySQL的方法
  8. 8种排序算法(Java实现)
  9. 百度AI之身份证识别
  10. 胡寿松自动控制原理第七版勘误-152页