How to wipe Heroku Redis?

后端 未结 2 1877
Happy的楠姐
Happy的楠姐 2020-12-22 19:51

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?

相关标签:
2条回答
  • 2020-12-22 20:41

    You can install the heroku-redis-cli plugin

    Installation

    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

    Usage

    • 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

    0 讨论(0)
  • 2020-12-22 20:51

    You can do this with redis-cli.

    RedisToGo gives you a url in the form:

    redis://redistogo:d20739cffb0c0a6fff719acc2728c236@catfish.redistogo.com:9402
    

    So this command will empty your db:

    redis-cli -h catfish.redistogo.com -p 9402 -a d20739cffb0c0a6fff719acc2728c236 flushall
    
    0 讨论(0)
提交回复
热议问题