Tools to analyze Redis databases

Hello,

Today I would like to explain a simple trick of how you can search and analyze any data stored in Redis and then export it in JSON format to filter better.

You can get the dump if you export data on the production node/server.rdb file from Redis root folder (CONFIG GET DIR), or if Persistance mode is not enabled (something ephemeral), you can extract data using the https://github.com/r043v/rdd tool.

RDB is a dump. You can call save to force an Rdb. It will be stored in the DB filename setting you have, or dump.rdb in the current working directory if that setting is missing.

More Info: http://redis.io/topics/persistence

Now that rdb dump is ready on your local computer or any other device/server, you can start by installing Redis-Commander.

What is Redis Commander?
Redis-Commander is a node.js web application used to view, edit, and manage a Redis Database.

More Info: http://joeferner.github.io/redis-commander/

Super simple to get going with NPM:

npm install -g redis-commander  

Start it with:

redis-commander  

Then point your browser to the local computer's address in the console. By default, access with browser at http://127.0.0.1:8081 address.

If you are using any Remote IDE environment like Gitpod (https://gitpod.io), you can get the address exposed when Redis-commander service starts.

Make sure you have Redis installed. I will not write about how to install the Redis server with cli tools but make sure it started on your local computer or remote device/server.

To check if Redis Commander works, load UI, and you must see it connected to your Redis server.
alt

If you wish to start the server with the Redis dump you exported from your server, yes, you can do it stop this one and start the server again with the following command:

/usr/bin/redis-server --port 6379 --dbfilename backup_of_master.rdb

** my redis-server is at /usr/bin path, but you can type whereis redis-server to see where it is installed.

You can start analyzing data. There is also a helper who can help you with certain commands. One of the best functionalities here is that we can now export data in JSON format and analyze values much better using sublime or any other popular editor or even Online using https://jsoneditoronline.org/classic/index.html#left=local.sugeve website. Neat!

2nd popular application to analyze data from Redis is https://resp.app/

Good luck, happy troubleshooting!