Describe the bug

This command:

REDISCLI_AUTH='MYPWD' redis-cli -h MYHOST -p MYPORT --rdb /path/to/export.rdb

Produces this output:

sending REPLCONF capa eof
sending REPLCONF rdb-only 1
REPLCONF rdb-only error: ERR Unrecognized REPLCONF option: rdb-only
SYNC sent to master, writing 102251019 bytes to '/path/to/export.rdb'
Transfer finished with success.

What is this error? REPLCONF rdb-only error: ERR Unrecognized REPLCONF option: rdb-only

Is something to worry about or it can be ignored and the export works in any case?

Expected behavior: the command to export a Redis database should not raise errors or warnings.

Comment From: sundb

Please specify what version of redis-server and redis-cli you are using. I guess that you are using the new redis-cli to connect old version of redis-server(<6.x).

Comment From: collimarco

  • Redis server v6.0 (the default on Ubuntu 22.04LTS)
  • redis-cli v7.0 (the default on Debian bookworm, which we use for the Docker images)

Is it an issue if we use a redis-cli version greater than server version to take the rdb dump? Or is it safe to ignore that warning?

The problem is that we don't control directly the redis-cli version installed in Docker, since we need to rely on the official Ruby image:

FROM ruby:3.2.2
RUN apt-get update && apt-get install -y redis-tools
...

We can't change that FROM ruby:3.2.2. Is there any way to specify the redis-tools package version? For example for Postgresql we can specify the version like this: postgresql-client-14, but this doesn't seem the case with Redis package.

Comment From: sundb

@collimarco It's safe for you to ignore the warning. rdb-only is just to tell redis-server not to send incremental replication buffer to redis-cli.

Comment From: collimarco

@sundb Thanks for the clarification! So basically in my case, since the rdb-only option is ignored by server, redis-cli receives some extra data for replication that it just ignores in any case. Is that right?

And for the package redis-tools on Debian Bookworm is there any way to get redis-cli v6?

Comment From: sundb

@sundb Thanks for the clarification! So basically in my case, since the rdb-only option is ignored by server, redis-cli receives some extra data for replication that it just ignores in any case. Is that right?

Yes, you also can get more detail from #8303.

And for the package redis-tools on Debian Bookworm is there any way to get redis-cli v6?

Maybe you can find the old version of the deb package and install it manually.