Getting a Redis RDB Dump Out of Heroku

Craig Younkins
1 min readFeb 8, 2024

--

Heroku claims you cannot download a Redis RDB dump, but this appears to be a lie. Their answer misdirects to forking the instance, which as far as I can tell, does not solve any problem that a user has that requires downloading the RDB.

You CAN get an RDB dump using redis-cli!

First, get your credentials from the web interface. Navigate to the add-on -> Settings -> View Credentials

OR using the CLI: heroku redis:credentials -a cardsphere

Then run redis-cli with the --rdb flag. Documentation

redis-cli -h <hostname> -p <port> -a <password> --tls --insecure --rdb dump.rdb

Note that the lowest add-on tier appears to not use TLS, so you may need to drop the --tls --insecure flags.

When you do this, it appears to trigger a SAVE internally, as indicated by updated LASTSAVE.

You can then use the RDB to restore the state to a new instance. With ElastiCache, follow directions for Seeding a new self-designed cluster with an externally created backup.

Good luck!

--

--

Craig Younkins
Craig Younkins

Written by Craig Younkins

Hacker, entrepreneur, and quantified self nerd. cyounkins at gmail.

No responses yet