简体   繁体   English

恢复 sql 转储到远程 postgres 机器

[英]restore sql dump into remote postgres machine

How can i dump the.sql file into remote postgres machine!我如何将 .sql 文件转储到远程 postgres 机器中!

Will the pg_restore will work for it to dump sql file. pg_restore 是否会转储 sql 文件。 Please help请帮忙

Code: pg_restore -h 192.168.0.190 -p 5432 -d postgre -U postgres C:/home/mydump.sql代码: pg_restore -h 192.168.0.190 -p 5432 -d postgre -U postgres C:/home/mydump.sql

This worked for me这对我有用

psql -h 192.168.0.190 -U postgres -p 5432 -d postgre < mydump.sql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM