postgresql - Can't restore a dump backup file for Postgres using pg_restore -
i generated dump backup file postgres 9.3.4 using this:
pg_dump table_name -u myusername -h localhost -o > backup.dump
now i'm trying backup old database using:
pg_restore -u myusername -n public -d table_name backup.dump
but keep getting error:
pg_restore: [archiver] input file appears text format dump. please use psql.
please note file not plain sql file since generated using pg_dump.
i used follwoing command:
psql perchwell -u myusername -f backup.dump -v on_error_stop=1
and start receiving following error:
set set set set set set psql:backup.dump:16: error: schema "propertydir" exists
the default output format of pg_dump plaintext sql script. use psql import or redump -fc
flag.
Comments
Post a Comment