Tuesday, 27 October 2015

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error

Just in case you encounter the error and some important data cannot be discarded on the running redis instance (someone changed permissions for the rdb file or its directory incorrectly, or running out of disk space), you can always redirect the rdb file to be written somewhere else.
Using redis-cli, you can do something like this:
CONFIG SET dir /tmp/some/directory/other/than/var
CONFIG SET dbfilename temp.rdb
After this, you might want to execute a BGSAVE command to make sure that the data will be written to the rdb file. Make sure that when you execute INFObgsave_in_progress is already 0(either the operation is successful or there is an error encountered). After that, you can now start backing up the generated rdb file somewhere safe.

If above method doesn't work, try this
config set stop-writes-on-bgsave-error no

2 comments: