redis-rdb-tools
redis-rdb-tools copied to clipboard
Invalid RDB version number 9 while extracting redis dump
Hi Krishnan,
We are trying to extract the redis dump through your tool "redis-rdb-tools" but we are getting the below error while executing "rdb --command json /home/gstjdgusr/Redis_rdb_Tool/bk20200207-120000-6-GstMasterDb-1_of_2-16-1-2048.rdb > GstMasterDb_DC1_01.txt" under path "/home/gstjdgusr/Redis_rdb_Tool/redis-rdb-tools-master".
Kindly help us to resolve the same.
Traceback (most recent call last):
File "/usr/bin/rdb", line 9, in
Regards, Alok
@alokch18 it looks like maybe you're using an old version of redis-rdb-tools. rdb version 9 (Redis 5.0) is supported long ago.
Hi Oranagra,
I downloaded a package from the site itself for which I'm getting the same error. Can you please share the link to download the latest package.
@alokch18 this is the latest release: https://github.com/sripathikrishnan/redis-rdb-tools/archive/rdbtools-0.1.14.tar.gz
@oranagra , Thanks for the link for latest release but I'm getting the same error as before when I used the latest package. It seems that it is using the old tool only even though I have moved the previous tool in different directory altogether. Also, kindly let us know if we need to install the tool post copying , unzipping and after doing tar -xvf "tool_name".
[gstjdgusr@TRNJDGD1 Redis_rdb_Tool]$ rdb --command json /home/gstjdgusr/Redis_rdb_Tool/bk20200207-120000-6-GstMasterDb-1_of_2-16-1-2048.rdb > GstMasterDb_DC1_02.txt
Traceback (most recent call last):
File "/usr/bin/rdb", line 9, in
@alokch18 yes, you need to install the tool, the rdb command you run isn't executed from the current directory.. do which rdb and you'll see.
maybe you just need to pip install --upgrade rdbtools?
bottom line, you'll need to either find out how you installed it and upgrade it. or if you want, you can run it from source using something like this:
env PYTHONPATH=`pwd` python rdbtools/cli/rdb.py --command json file.rdb
@oranagra When I tried to install using command "pip install --upgrade rdbtools", I got the below mentioned response.
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fc6b43ce910>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/rdbtools/ Requirement already up-to-date: rdbtools in /usr/lib/python2.7/site-packages/rdbtools-0.1.11-py2.7.egg (0.1.11) Requirement already satisfied, skipping upgrade: redis in /usr/lib/python2.7/site-packages/redis-2.7.3-py2.7.egg (from rdbtools) (2.7.3)
However, when I retried the conversion, I got the same error as mentioned before, i.e., Invalid RDB version number 9'.
@alokch18 i don't know what's wrong with your pip. when i try to install rdbtools i get the right version, which is 0.1.14 (see https://pypi.org/project/rdbtools/)
I ran into this issue myself, and I discovered PyPI doesn't have an up-to-date rdbtools available for Python 2.
Python3 and pip3 work just fine.
pip3 install --upgrade rdbtools # should take care of this issue.