I have some information stored in my RedisToGo instance in Heroku and I want to wipe it so the Redis store is clean. Any idea how to do this?
Redis Commands There are two major commands to delete the keys present in Redis: FLUSHDB and FLUSHALL. We can use the Redis CLI to execute these commands. The FLUSHDB command deletes the keys in a database. And the FLUSHALL command deletes all keys in all databases.
Persistence. The hobby tier for Heroku Data for Redis doesn't persist instance data. If the instance must reboot or a failure occurs, the data on instance is lost.
Reliable and powerful Redis as a service. Starting at $0/mo.
To connect from an external system or client, retrieve the Redis connection string using either of the following methods: Running the heroku redis:credentials CLI command (for more information, see redis:credentials) Inspecting your app's config vars by running the command heroku config:get REDIS_URL -a example-app .
You can do this with redis-cli.
RedisToGo gives you a url in the form:
redis://redistogo:[email protected]:9402
So this command will empty your db:
redis-cli -h catfish.redistogo.com -p 9402 -a d20739cffb0c0a6fff719acc2728c236 flushall
You can install the heroku-redis-cli plugin
Requirements:
The heroku gem — gem install heroku
A local installation of redis (or at least the redis-cli utility) — apt-get install redis-server
To install:
heroku plugins:install https://github.com/rapportive-oss/heroku-redis-cli.git
heroku redis:info
— get run-time statistics from your redis.
heroku redis:monitor
— monitor commands being sent to your redis in real time.
heroku redis:cli
— execute custom commands against redis.
Then you could simply do:
$ heroku redis:cli $ flushall
Steps taken from readme file on the github repo: https://github.com/rapportive-oss/heroku-redis-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With