Heroku PG download & restore to local
hariselva | June 9, 2021, 2:54 a.m.

Capture: heroku pg:backups:capture

Download: heroku pg:backups:download

Restore: pg_restore --verbose --clean --no-acl --no-owner -h localhost -d postgres latest.dump

"C:\Program Files\PostgreSQL\15\bin\pg_restore.exe" --verbose --clean --no-acl --no-owner -h localhost -U postgres -d postgres latest.dump

"C:\Program Files\PostgreSQL\15\bin\psql.exe" -U postgres

DROP SCHEMA public cascade;

CREATE SCHEMA public;

\q