Skip to content

Restarting DB After CONFIG SET and redis.conf mismatch can wipe out your DB and its slaves #972

Open

Description

@xonder

Just wanted to point out a tricky edge case you might hit that will clean your DB dry if your redis.conf doesn't match the settings you sent to the instance through config set.

Sure, it's a config error, but its rather devastating impact might warrant a disclaimer or some sort of checking mechanism.

Here are the steps to reproduce it:

-Launch your DB with AOF and dump writing enabled.
-Turn off the use of AOF using config set
-Your server reboots
-Redis restarts, loads the redis.conf file (which you forgot to update not to use AOF);
-Redis loads up the AOF as it was at the time you sent the config set
-Redis will at that point rewrite your dump file with that old data
-Propagates to ALL the slaves
-Sadness

Activity

  1. ncandio commented on Jan 28, 2016

    @ncandio

    Hi
    I'm a newbie Redis user and I'm still moving the first steps on the codebase: would be nice to have an update on this issue; I just tried to reproduce the issue, turning off the appendonly field during an huge insertion of data and seems all works fine (no server reboot, aof and dump first enabled, so on) . What is the Redis version in use for reproducing this bug? I'm actually making some tests using the unstable branch.

  2. xonder commented on Jan 29, 2016

    @xonder
    Author

    I believe that a couple versions ago, setting configs over config set
    started propagating to the config file automatically.

    On Thu, Jan 28, 2016 at 5:07 AM, Nico Liberato Candio <
    [email protected]> wrote:

    Hi
    I'm a newbie Redis user and I'm still moving the first steps on the
    codebase: would be nice to have an update on this issue; I just tried to
    reproduce the issue, turning off the appendonly field during an huge
    insertion of data and seems all works fine (no server reboot, aof and dump
    first enabled, so on) . What is the Redis version in use for reproducing
    this bug? I'm actually making some tests using the unstable branch.

    —
    Reply to this email directly or view it on GitHub
    https://github.com/antirez/redis/issues/972#issuecomment-176175265.

  3. added a commit that references this issue on Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions