I am trying to upload a postgres database backup file to my hosting server. But I am getting these errors. No idea what is wrong with this file.
Asked
Active
Viewed 2,517 times
1

Laurenz Albe
- 209,280
- 17
- 206
- 263

Pashupati Sah
- 426
- 5
- 9
-
Please describe what exactly you did to get that error. – Laurenz Albe Mar 24 '21 at 10:35
-
I created a backup file which is a .sql file. And then I executed that file inside phppgadmin on my hosting server. – Pashupati Sah Mar 24 '21 at 10:41
-
i think you can get idea from this [click here](https://stackoverflow.com/a/11391586/8928037) – Kaumadie Kariyawasam Mar 24 '21 at 10:44
2 Answers
2
I got my the answer. Just backup in plain format rather than custom. Thanks for your effort.

Pashupati Sah
- 426
- 5
- 9
0
You need to use a .sql file when uploading the database to your new stack. By default, Heroku gives you a .dump file. What worked for me was copying the database to my local development pg db using the .dump file and then using that to generate a .sql file which I pushed to my new app.
or
adapted to support the latest official dokku postgres plugin, pg_restore -O latest.dump | dokku postgres:connect <db_name>

Kaumadie Kariyawasam
- 1,232
- 3
- 17
- 35
-
-
`pg_restore -O latest.dump | dokku postgres:connect
` can you use this command to postgres plugin? – Kaumadie Kariyawasam Mar 24 '21 at 10:41 -
I am new to postgres using it on browser. This command for dokku did not work for me. – Pashupati Sah Mar 24 '21 at 10:54