input file appears to be a text format dump. Please use psql

前端 未结 7 1120
星月不相逢
星月不相逢 2020-12-04 09:33

I take backup using

pg_dump db_production > postgres_db.dump

and then I copy it to localhost using scp.

Now when I import on my

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 09:56

    For me when i try to restore from remote host i used

    psql -U username -p 5432 -h 10.10.10.1 -d database < db.dump
    

    worked fine. And if not remote just following command worked.

    psql -d database < db.dump
    

提交回复
热议问题