DEV Community

Robert Rees
Robert Rees

Posted on

Migrating databases from Heroku to Render

One of the more interesting aspects of Heroku ending its free service is that there is no simple way to enter your credit card and simple switch your data over to a paid plan. You have to migrate from the free to the paid servers.

On that basis it makes sense to look at what the alternatives are before deciding to make a decision.

Render has had a lot of positive comments for picking up the mantle of Heroku's promise of developer friendly PaaS and making good the deficits. It's Postgres service does allow you to move between the trial and paid for database service for example just by entering payment details.

It also allows you to host multiple databases in the same instance which is what I want for a lot of my hobby apps as they don't really have a lot of data.

The service exposes a standard database URL and so far I have been able to use standard Postgres tools for everything I've wanted to do with the database. You can even just cut and paste a string to connect with pgcli.

The documentation for migrating from Render to Heroku is excellent and worked just as advertised.

Having imported the databases I then detached the Heroku instances and replaced the DATABASE_URL environment variable with the new URL from Render, restarted my dynos and every application I had worked perfectly.

The only issue I had was in my local setup where I needed to use the pg_restore from a matching version which I needed to specify the exact /usr/lib/postgresql/<version>/bin path.

Overall a great migration experience and I can't really fault it. I wish I had made the change sooner.

Top comments (1)

anurag profile image
Anurag Goel

Welcome to Render!