migrate database from Heroku

I’ve successfully deployed my Rails app on App Platform, and now I’m needing to import my database from Heroku. I tried to install heroku CLI on the console, but the sudo command does not exists:

$ sudo snap --install --classic heroku
bash: sudo: command not found

how can I import my database from Heroku to the app platform?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey @soporteAnemone,

Unless you use a Dockerfile, apps do not get root access. Regardless, I would recommend performing the migration locally on your computer:

  1. Follow the Heroku instructions on downloading a backup of your database
  2. Then, grab the connection details to your database from the App Platform control panel. Browse to your app, click the Settings tab, and then click the database component.
  3. Import the database export to your database.

Hi there,

I believe that you should not run your database inside a web service on the App platform itself as the containers are recreated on each deployment and no data is persisted.

You would need to use a Managed database instead, you can follow the steps on how to do that here:

Regards, Bobby