heroku 如何在Windows命令行中使用pg_restore?

tmb3ates  于 2022-11-13  发布在  Windows
关注(0)|答案(1)|浏览(120)

我已经从Heroku应用程序下载了PG数据库备份,它在我的存储库文件夹中作为latest.dump
我已经在本地安装了postgres,但是我不能在Windows命令行上使用pg_restore,我需要运行以下命令:pg_restore --verbose --clean --no-acl --no-owner -j 2 -h localhost -d DBNAME latest.dump
但是命令没有找到!

0sgqnhkj

0sgqnhkj1#

因为你使用的是windows系统,所以你的路径上可能没有pg_restore,你可以在postgresql安装的bin文件夹中找到pg_restore,例如c:\program files\PostgreSQL\9. 5\bin。
您可以导航到正确的位置,或者只是将该位置添加到路径中,这样就不需要总是进行导航。

相关问题