pg_restore: [archiver] input file appears to be a text format dump. Please use psql.
Bug report
C:\Program Files\PostgreSQL\10\bin\pg_restore.exe --verbose --host=127.0.0.1 --port=5432 --username=postgres --dbname=db_1
Restore started at Mon Aug 13 13:36:02 SGT 2018
pg_restore: [archiver] input file appears to be a text format dump. Please use psql.
Restore finished at Mon Aug 13 13:36:03 SGT 2018
The pipe has been ended
Process exit code: 1
OS: Windows DBeaver version: 5.1.5
in window Restore Settings, i select Format: Plain
pg_restore can't import plain SQL files. Its a job for psql. Also it is possible to run SQL dump as script in DBeaver.
why does dbeaver allow a SQL export that it cannot import it if that is just a matter of using psql instead of pg_restore ? Sounds like an easy fix to me !
+1 to this.
any news?
found this confusing as well - the dialog is structured in a way that it seems perfectly fine:

Still having this issue nowadays.
Doing it on the terminal worked for me

xmark is the name of the database, the text after < is the location of the dump.
I ran into the same issue here. The problem is that Export with "Plain" format exports it in plain SQL script format however Import with the "Plain" format tried to load the sql script using pg_restore which does not support importing of plain sql file format and hence we see the error "input file appears to be a text format dump. Please use psql".
In order to restore the "Plain" format export, one needs to use the Tools --> Execute Script option and point to the exported SQL file.
Definitely confusing that DBeaver "Plain" export cannot be loaded using the "Plain" Import setting. It should internally be using "psql" when trying to Import using Plain format.
Which then begs the question, what does "Plain" import even do, if it's not for importing "Plain" sql dumps?
Still an issue ~4.5yrs later… ffs at least make the UI consistent with the (lack of) functionality!
Focus and chatGPT and AI but such a simple problem is forgotten.
Same on MacOS version (23.0.3.202304240630).
i think dbeaver should support at least choose between pg_restore or psql if the file type cannot automatically detected
Release 24.0.2.202404071654 (April 8 2024) with same problem. No news?
Still encountering the same problem nowaday. Thank this threads
@serge-rider any thought on this? I confirm it's a bit frustrating since it takes time to figure it out.
EDIT:
To make it working either choose tar format when doing the backup, but I noticed a few relationship errors during the import. Or use custom and suffix the backup name with something like .db. pg_restore knows how to manage both.
After years, still facing the same issue
Please let us use psql instead of pg_restore.
@serge-rider any thought on this? I confirm it's a bit frustrating since it takes time to figure it out.
EDIT: To make it working either choose
tarformat when doing the backup, but I noticed a few relationship errors during the import. Or usecustomand suffix the backup name with something like.db.pg_restoreknows how to manage both.
Thanks, I used custom prefix and saved my db as .db then the restore worked
Use Tools>"Script Execution" and select the dump file: