[英]How to use pg_restore on Windows Command Line?
I have downloaded a PG database backup from my Heroku App, it's in my repository folder as latest.dump 我已经从我的Heroku App下载了PG数据库备份,该备份在我的存储库文件夹中为last.dump。
I have installed postgres locally, but I can't use pg_restore on the windows command line, I need to run this command: pg_restore --verbose --clean --no-acl --no-owner -j 2 -h localhost -d DBNAME latest.dump
我已经在本地安装了postgres,但是我无法在Windows命令行上使用pg_restore,我需要运行以下命令:
pg_restore --verbose --clean --no-acl --no-owner -j 2 -h localhost -d DBNAME latest.dump
But the command is not found! 但是找不到命令!
Since you're on windows, you probably just don't have pg_restore on your path. 由于您在Windows上,因此路径上可能没有pg_restore。 You can find pg_restore in the bin of your postgresql installation eg c:\\program files\\PostgreSQL\\9.5\\bin.
您可以在PostgreSQL安装的bin中找到pg_restore,例如c:\\ program files \\ PostgreSQL \\ 9.5 \\ bin。
You can navigate to the correct location or simply add the location to your path so you won't need to navigate always. 您可以导航到正确的位置,也可以将位置添加到路径中,这样就不必始终导航。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.