redis / ioredis

🚀 A robust, performance-focused, and full-featured Redis client for Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrate command with target redis server using TLS

marioanloru opened this issue · comments

Hi, I am migrating data from one redis serve to another one, both are configured to use TLS.
How do I execute MIGRATE command to work with TLS redis servers? The command only does accept a host, port and password as auth

What do you mean ? You just pass the items in the Redis connection.

  const config: RedisOptions = {
    port: Number(process.env.REDIS_PORT),
    host: process.env.REDIS_HOSTNAME,
    username: process.env.REDIS_USERNAME,
    keyPrefix: process.env.REDIS_KEY_PREFIX,
  };
  if (process.env.REDIS_TLS === 'true') {
    config.tls = {};
  }
  redis = new Redis(config);