Skip to content

Heroku sql

Setup

Add heroku git remote

heroku git:remote -a app_name

Connect to the file system

  • read-only access to your repo on the Heroku container
heroku run bash

Connect to DB

heroku pg:psql --app app-name

Connect to DB via Heroku VM

heroku run 'psql $DATABASE_URL' --app app-name
pg_dump -d `heroku config:get DATABASE_URL -a forma-1130-staging`t --no-owner --no-acl -Fc -f f.dump

Last update: 2023-04-24