As you read it, the problem is simple as that. I figured out the solution myself so I'm posting this question for our fellows out there struggling with heroku postgres. Describing my problem: I have the same PostgreSQL version on my local machine and Heroku app.
- push and pull: the cli run until it came to the
pg_restore: processing data for table "public.posts"
pg_restore: error: unrecognized data block type (0) while searching archive
! pg_restore errored with 1
I tried to work around for the push problem with
pg_dumpmy local db and then useheroku pg:backups:restore <backup file url> -a my-appas Heroku instructed in their blog. I did 99% the same with the instructions from Heroku themselves, only with 1 small change that I didn't have my output dump file named file.dump as they did. Actually there's no file extension at all, in order for thepg:backups:restoreto work.Another problem was actually getting my local db synced with heroku, manually of course, the
pulldidn't work out as mentioned in #1. So I made a backup of my heroku app database withpg:backups:captureand download it withpg:backups:download. Things could work out but it was the credentials stopped me to restore my local db with that backup file.