I have a requirement to dynamically turn on appendonly setting after redis replayed all the data from backup file dump.rdb. So is there any redis-cli cmd to know that redis has loaded all the data from dump.rdb snapshot?#
When Redis is loading RDB files, it refuses most commands, e.g. PING
. So you can send a PING
command, i.e. redis-cli ping
, to Redis. If it returns PONG, Redis has already loaded all data. If Redis is still loading, it returns an error reply.