Skip to content

Instantly share code, notes, and snippets.

@LordXyTh
LordXyTh / gist:cf754b86926b3926e9079f6530d3355d
Created January 25, 2023 18:22 — forked from dirkgroenen/gist:07c3e8e4bc7e08bc3232ae0bdd6a0ba5
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production