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 INFO, bgsave_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
It works ..Thanks
ReplyDeleteThanks,it's saved my time.
ReplyDelete