Describe the bug Using Redis 6.2.2, dump.rdb is still produced when save is a empty string ""
redis-cli --no-auth-warning -u redis://admin:<password>@10.25.97.216:6379 config get save
1) "save"
2) ""
ssh 10.25.97.216 "du -h redisCluster6379/dump.rdb"
32K redisCluster6379/dump.rdb
To reproduce
- start redis server with configuration
save "" - write data to the redis server
- see there is a dump.rdb in the working directory of redis server
Expected behavior dump.rdb should not be there in the working directory.
Additional information
Comment From: sundb
Did you execute SAVE command? You can use INFO Commandstat command to check it.
Comment From: jgaoIXL
INFO Commandstat
I checked and there wasn't a save executed, so dump.rdb is not supposed to be there if in redis.conf, save is configured to be "" in 6.2.2, is that correct?
Comment From: jgaoIXL
@sundb I see this issue being resolved but this was never released, correct?
Comment From: sundb
@jgaoIXL Not really, AFAIK, I haven't seen any similar issues before this.
save "" just means that redis will not automatically save, when you manually execute the "SAVE" command, the dump file will still be generated.
Comment From: oranagra
another way an rdb file can be generated is during replication (both master and replica).
unless the rdb-del-sync-files config is set.
could that be the reason in your case?
Comment From: jgaoIXL
another way an rdb file can be generated is during replication (both master and replica). unless the
rdb-del-sync-filesconfig is set. could that be the reason in your case?
Yes, that is exaclty what happened, thanks for the reply and if we enable rdb-del-sync-files how soon will the dump.rdb be removed?
Comment From: oranagra
it will not remove old ones, just avoid creating new ones (or actually delete them as soon as it's done using them).
the other alternative to completely avoid having these files is use diskless replication (repl-diskless-sync and repl-diskless-load)
Comment From: jgaoIXL
it will not remove old ones, just avoid creating new ones (or actually delete them as soon as it's done using them). the other alternative to completely avoid having these files is use diskless replication (
repl-diskless-syncandrepl-diskless-load)
Got it, I think rdb-del-sync-files is good enough, thank you!