Redis migration error

crisog
PRO

3 months ago

I tried using this tool
https://github.com/railwayapp-templates/redis-migrator

But it fails with this error

redis-migrator  | [ OK ] Successfully saved dump to /data/redis_dump.rdb
redis-migrator  | [ OK ] Dump file size: 507K
redis-migrator  | Traceback (most recent call last):
redis-migrator  |   File "/usr/local/bin/rdb", line 8, in 
redis-migrator  |     sys.exit(main())
redis-migrator  |   File "/usr/local/lib/python3.10/dist-packages/rdbtools/cli/rdb.py", line 106, in main
redis-migrator  |     parser.parse(options.dump_file[0])
redis-migrator  |   File "/usr/local/lib/python3.10/dist-packages/rdbtools/parser.py", line 394, in parse
redis-migrator  |     self.parse_fd(open(filename, "rb"))
redis-migrator  |   File "/usr/local/lib/python3.10/dist-packages/rdbtools/parser.py", line 399, in parse_fd
redis-migrator  |     self.verify_version(f.read(4))
redis-migrator  |   File "/usr/local/lib/python3.10/dist-packages/rdbtools/parser.py", line 963, in verify_version
redis-migrator  |     raise Exception('verify_version', 'Invalid RDB version number %d' % version)
redis-migrator  | Exception: ('verify_version', 'Invalid RDB version number 12')
redis-migrator  | An error occurred. Exiting...
redis-migrator exited with code 0

0 Replies

crisog
PRO

3 months ago

cdf7b02f-c823-4fae-965a-c72950cfaa1c


3 months ago

Hello,

You would want to use this template -


crisog
PRO

3 months ago

Thank you


crisog
PRO

3 months ago

I made the original repo work if anyone is interested
https://github.com/crisog/redis-migrator


3 months ago

happy to accept a pr but I think the current template is far more efficient in all ways


crisog
PRO

3 months ago

I just tried it and it failed unfortunately


crisog
PRO

3 months ago

Maybe because it had data, but with the script I can overwrite


3 months ago

can you provide the error? I've used the template to migrate a redis database with over a million keys


crisog
PRO

3 months ago

Sure thing


crisog
PRO

3 months ago


crisog
PRO

3 months ago

Keeps on a loop with Keyspace notifications not property configured. Expected notify-keyspace-events 'KEA' but was ''.


crisog
PRO

3 months ago

And then ultimately crashes


3 months ago

ah yeah, you need to set that value to KEA on the source database


crisog
PRO

3 months ago

Might be worth adding to the template instructions


3 months ago

yeah that's true, I have a guide that's internalized, I just need to update the overview


crisog
PRO

3 months ago

I just added the key lets see if it works


Redis migration error - Railway Help Station