Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
Example: heroku pgbackups:url a712 --remote production
>>> "https://s3.amazonaws.com/hkpgbackups/app11111118@heroku.com/a712.dump?AWSAccessKeyId=XXXXXXXXXXXXXX&Expires=1367876175&Signature=XXXXXXX%EEEEEEEYWWWWWWW%3D"
Command: curl "http://[url]" > production.dump
Example: curl "https://s3.amazonaws.com/hkpgbackups/app11111118@heroku.com/a712.dump?AWSAccessKeyId=XXXXXXXXXXXXXX&Expires=1367876175&Signature=XXXXXXX%EEEEEEEYWWWWWWW%3D" > production.dump
Command: pg_restore --verbose --clean --no-acl --no-owner -h localhost -d [db_name] production.dump
@SidMorad So I had got an error:
pg_restore: [archiver] unsupported version (1.12) in file header
when I tried to run the PG Restorer locally.Found out my Postgres Heroku vs. Local versions were off. Anyone running into the same error / issue, here is the fix:
First check your versions, verify they are off, and that's your problem:
Returned 10.2 for me locally, so next I checked Heroku:
It returned 10.3, so I simply upgraded my Local Postgres using Homebrew:
Then running
pg_restore
again afterwards worked fine for me!