RedisDesktopManager
RedisDesktopManager copied to clipboard
"Import keys from RDB file" is not working on MacOS
Describe the bug this feature is not working on the MacOS version of the app. I am using MacOS Monterey version 12.4 and tried all available MacOS versions of the RESP app from https://resp.app/subscriptions/downloads and I am getting the same issue for all of them - I am not able to select the RDB file for "Path to RDB file" in the "Bulk Operations Manager" window because when I am clicking on the "Select File" button - the MacOS file dialog is showing under the "Bulk Operations Manager" window and I am not able to switch focus to the MacOS file dialog anyhow (even if I move the top window to the side, I can't click on anything in the MacOS file dialog.
https://github.com/uglide/RedisDesktopManager/pull/4595#issuecomment-1239802177 To Reproduce Steps to reproduce the behavior:
- Connect to the redis server
- Select DB
- Click on "Bulk Operations" icon
- Click on "Import keys from RDB file" icon
- Click on "Select File" button
- See the error - not able to focus on the MacOS file dialog
Expected behavior Import from RDB file is working
Screenshots

Environment (please complete the following information):
- OS & version: MacOS Monterey version 12.4
- Redis-Server version: 5.0.14
Additional context
Hello @umax-imagination-media
Thanks for the bug report. This regression issue was fixed and is available in resp-intel-2022.4.44.dmg and resp-arm64-2022.4.58.dmg. Downloads are available on https://resp.app/subscriptions/downloads
good morning @uglide! Thank you for the fast feedback and fix! I have confirmed that there is no issue with selecting the RDB file in the new version, but unfortunately, import is not working, it is showing the message "Success Bulk Operation Finished" but no keys imported to any DB

Could you try to press "Show Matched keys" to determine if the underlying rdbtools package can recognize the RDB file. Also, please provide a screenshot of the "Log" drawer:

Sure, there is "Cannot get the list of affected keys" message

@u-maxx Could you also share the output in the Log drawer? Instructions on how to open in in my previous message
Sure, sorry, I pasted the wrong second screenshot.

I am connecting to the Redis server via ssh tunnel because the Redis server is running inside the docker container.
`Connection: redis-server doesn't support AUTH command or ismisconfigured. Trying to proceed without password. (Error:ERR wrong number of arguments for 'auth' command)`
Formatters: Return value of PyObject call is NULL: Traceback (most recent call last):
File "qrc:/python//rdb/__init__.py", line 56, in rdb_list_keys process_command(callback, path_to_rdb, db, File "qrc:/python//rdb/__init__.py", line 35, in process_command parser = rdbtools.RdbParser(callback=callback, filters=filters, ignore_values=scan_keys) TypeError: __init__() got an unexpected keyword argument 'ignore_values'
@u-maxx Thanks. It's a packaging bug. Please try resp-arm64-2022.4.59.dmg build. Thanks!
@uglide thank you for the fastest bugfixes and great support! The previous bugs are fixed, but for some reason it is importing only ~7300 keys (I have made few tests and this value is changing from 7299-7301) from the 29770 keys which are shown in the "Matched keys:" area:
As you can see the loading message is showing "Processed: 29565" message, but it is loading for a few minutes w/o progress (I have tested a few times). If I click on the main window - the import window disappears and then if I click on "Reload Keys in Database" icon for db0 - it is showing 7299 keys

The RDB file which I am trying to import is 31,6 MB and should have 29770 keys (according to the info from Matched keys)
Here are the logs:

Would be great to import the full RDB file.
I have tried to wait for more than 1h w/o clicking anywhere during the import loading animation, but as result, it was still loading, and after clicking on the main window - it was showing the same result as in my previous comment - only 7299 keys were imported.
@u-maxx Please try build resp-arm64-2022.5.62.dmg from the website. Thanks!
Hello @uglide! Thank you for the update, unfortunately, I am not able to find the resp-arm64-2022.5.62.dmg build on the website, the latest available is "macOS Apple Silicon — 2022.4.59"
Could you please check if the links on the website are correct?
Oh, sorry, I see the "macOS Apple Silicon — 2022.5.62" on the "Preview Builds" tab. Checking.
@u-maxx yes, it's on the preview builds tab
I have tried to import the same RDB file and got the following error:
As a result the same amount of keys were imported - 7301 of 29770 keys from RDB file (according to the info from Matched keys)
@u-maxx Where your rdb file comes from? Is it produced by Redis v5?
It is from Redis server v=6.2.0
redis-server -v Redis server v=6.2.0 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=bb6d0fd02006ff98
@u-maxx you need to upgrade your local redis to v6 first
Ok, thank you for the help! I will give it a try, it is set to v6 in the config files for my docker setup but looks like because of a bug in that docker tool (warden) it has used Redis v5.
RESP.app uses a modified version of https://github.com/sripathikrishnan/redis-rdb-tools which has limited RDB support (only standard types are supported). For your use case, it should work fine if redis versions are the same. If your rdb file contains keys created by redis modules then you need to filter them out with regex like sess_.+
I am still getting the same error and number of keys imported even on Redis v6.2.7,
Do you think this error is caused by the data inside my RDB file?
I can't use the regex for RDB file since it is not a regular text file. Do you know any way to ignore some keys during export from Redis server to RDB file?
The error message during import is Cannot execute command ERR unknown command ef81c109dacbceb8e94b, with args beginning with:
@u-maxx There is a field for that in the RESP.app import dialog:

You just need to update default regex there.
@u-maxx It might be a good idea to just replace rdb file in local redis if it's just in a local container.
There is only 1 key matching the text from the error message, and if I use the regex feature which you have mentioned - this key is imported w/o issues. So I am not sure what is causing the error then on the full RDB file.
I know about the possibility to manually replacing the RDB file, and tried that but Redis server was overwriting my file, so I started trying to use your tool for RDB import.
@uglide thank you a lot for the help! I was able to find out why I was not able to import all the keys from RDB dump - the reason was that the data which were stored in the RDB is the sessions, which have expiration date, so during the import Redis was ignoring the info which has expired 🤯