I used pgadmin4 to create a dump file in plain sql.
I am trying to use this file to populate a test database on another postgresql
host. I can find the file previously created. It appears correct:
[root@vhost01 ~ (master)]# file
/var/db/pgadmin4/storage/admin_harte-lyne.ca/redmine_backup_locate.sql
/var/db/pgadmin4/storage/admin_harte-lyne.ca/redmine_backup_locate.sql: ASCII
text, with very long lines
[root@vhost01 ~ (master)]# more
/var/db/pgadmin4/storage/admin_harte-lyne.ca/redmine_backup_locate.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.17
-- Dumped by pg_dump version 12.5
-- Started on 2021-02-19 14:32:31 EST
SET statement_timeout = 0;
SET lock_timeout = 0;
. . .
The target database exists on the target host. However, when I try to run the
restore function in pgadmin4 I get this error:
/usr/local/bin/pg_restore --host "pgsql-dbms.internal.hamilton.harte-lyne.ca"
--port "5432" --username "postgres" --no-password --role "postgres" --dbname
"hll_redmine_copy" --verbose
"/var/db/pgadmin4/storage/admin_harte-lyne.ca/redmine_backup_locate.sql
pg_restore: error: input file appears to be a text format dump. Please use psql
Is there no way to restore from an sql file from within pgadmin4?
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:[email protected]
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3