Heroku
Platform to deploy applications.
Services
Heroku Data services
Heroku offers multiple managed data services:
- Heroku Postgres
- Heroku key-value store
- Apache Kafka on Heroku
PostgreSQL DB
Logging into DB
To log in to the PostgreSQL DB
In your Heroku App: Resources tab > Click on Heroku Postgres under Add-on services
In the new tab that opens (Heroku Data/Datastores) — open the Credentials tab.
-
Via Heroku CLI Copy the command under Heroku CLI.
It should look like:
heroku pg:psql data-store-name --app app-name
- Paste it in your terminal > login when browser opens up
- You'll now be in a psql session connected to your DB.
-
Via a DB client
You'll get all the credentials needed in the current (credentials) tab you're in.
Pulling the data on your machine
To create a snapshot / pull data from heroku postgres to your local, copy the Heroku CLI command in the Credentials tab, and replace psql
with pull
.