4

I have an app hosted on Heroku and I am trying to migrate from Heroku Redis to Redis Cloud.

According to this documentation, I can easily migrate the data from my current Heroku Redis to a new Redis Cloud by using --fork flag.

https://devcenter.heroku.com/articles/rediscloud#migrating-from-an-existing-redis-server-to-redis-cloud

However, when I ran the command, it did create a new Redis Cloud instance but the instance doesn't have the data from my Heroku Redis instance.

This is the command that I used to create the instance

heroku addons:create rediscloud:100 --fork=`heroku config:get REDIS_URL -a app-name` -a app-name

Is the --fork flag only works for databases ?

Rudy Lee
  • 438
  • 5
  • 18

2 Answers2

0

Correct, fork will make a copy of the application, it's addons and data contained in Heroku Postgres.

John Beynon
  • 37,398
  • 8
  • 88
  • 97
  • yep, but I don't want to fork the whole app. I just want to create a new addon ( in this case, `Redis Cloud` ) and fork/migrate the data from `Heroku Redis` – Rudy Lee Jul 20 '17 at 00:43
0

I've had the same experience when trying to migrate from Heroku Redis to Redis Cloud: my 'forked' database was empty.

I contacted Redis Labs Support and they said:

We currently do not support the --fork option to migrate data from Heroku Redis to Redis Cloud ... [but] you can directly import your data into your Redis Cloud database by following the steps in this document.

I followed the steps under "Import from a Redis server" using my Heroku Redis host, port and password and was able to populate a Redis Cloud db from an older Heroku Redis instance that was using Redis 5.0.

BUT I could not get the process to work for a more recent Heroku Redis instance on v6.2!

I contacted Redis Labs Support again and this time they said:

Import from Redis can accept only Open Source Redis URLs and not an Heroku (cloud) database. You must export your data to AWS S3, Azure, or Google Cloud storage and then import it to the Redis Enterprise cloud.

In the end, I managed to copy (Dump and Restore) the contents of my v6.2 Heroku Redis to Redis Cloud using nicStuff's redis-migrate gist (a slightly modified version)...

BUT I've only managed to get this working from a Heroku Redis Mini plan. Other plans (Premium-0, etc) require TLS and I'm not sure if it's possible to connect to these using redis-cli...

Karl Bishop
  • 391
  • 1
  • 14