Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy my local db to heroku?

I'm working on a simple Rails (activeRecord based) application, and i'm testing in locally.

Now it's time to move online, but... do i need to insert all the records again in the app's db? I hope not!

Do you know a if is it possible to make a copy of my entire local db and import it in heroku?

Thanks!

like image 383
Abramodj Avatar asked Apr 25 '11 17:04

Abramodj


People also ask

Can heroku store database?

Heroku provides three managed data services to all customers: Heroku Postgres. Heroku Redis.


1 Answers

erm, using the Heroku CLI

heroku db:push

job done, built into Heroku - will magically transpose your local DB whether it be sqlite, mysql, postgres to Heroku's shared postgresql db.

like image 80
John Beynon Avatar answered Nov 08 '22 21:11

John Beynon