[英]Restore Postgres database schema from *.sql file via pgAdmin?
I have several *.sql dump files that I would like to restore to a newly created database 'spatial_db'. 我有几个* .sql转储文件,我想还原到新创建的数据库'spatial_db'。 I know that I can restore them via command line:
我知道我可以通过命令行恢复它们:
psql -U username -h 127.0.0.1 -d spatial_db -f path/to/dump/file.sql
Is there a way to restore the *.sql file(s) via pgAdmin as with *.backup files? 有没有办法像* .backup文件一样通过pgAdmin恢复* .sql文件?
spatial_db
. spatial_db
。 Menu->Plugins->PSQL Console
Menu->Plugins->PSQL Console
\\i /path/to/file.sql
\\i /path/to/file.sql
Also if it is a small file you can open it in editor and execute the sql statements. 另外,如果它是一个小文件,则可以在编辑器中将其打开并执行sql语句。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.