How do I delete everything in Redis?
With redis-cli: FLUSHDB – Deletes all keys from the connection’s current database. FLUSHALL – Deletes all keys from all databases. For example, in your shell: redis-cli flushall
With redis-cli: FLUSHDB – Deletes all keys from the connection’s current database. FLUSHALL – Deletes all keys from all databases. For example, in your shell: redis-cli flushall
Using redis-cli, you can stop it trying to save the snapshot: config set stop-writes-on-bgsave-error no This is a quick workaround, but if you care about the data you are using it for, you should check to make sure why bgsave failed in first place.
You don’t want to use multiple databases in a single redis instance. As you noted, multiple instances lets you take advantage of multiple cores. If you use database selection you will have to refactor when upgrading. Monitoring and managing multiple instances is not difficult nor painful. Indeed, you would get far better metrics on each … Read more
Execute in bash: redis-cli KEYS “prefix:*” | xargs redis-cli DEL UPDATE Ok, i understood. What about this way: store current additional incremental prefix and add it to all your keys. For example: You have values like this: prefix_prefix_actuall = 2 prefix:2:1 = 4 prefix:2:2 = 10 When you need to purge data, you change prefix_actuall … Read more