Consider using SCAN instead of KEYS
Redis migrator is a golang based tool to migrate the database keys.
Brought to you by:
opstree-global
Originally created by: natenho
Have you considered to implement the migration using SCAN command? It is more suitable for production environment to avoid blocking the server for several seconds. Refer to https://redis.io/commands/scan/