2016-05-08 35 views
0

我已經下載從我的Heroku應用一個PG數據庫備份,它在我的庫文件夾中latest.dump如何在Windows命令行上使用pg_restore?

我已經在本地安裝的Postgres,但我不能在Windows命令行中使用pg_restore的,我需要運行此命令: pg_restore --verbose --clean --no-acl --no-owner -j 2 -h localhost -d DBNAME latest.dump

但是找不到命令!

回答

2

既然你在windows上,你可能只是沒有pg_restore在你的路徑上。 您可以在postgresql安裝的bin中找到pg_restore,例如c:\ program files \ PostgreSQL \ 9.5 \ bin。

您可以導航到正確的位置,或者只需將位置添加到路徑中,這樣就無需一直導航。