【发布时间】:2017-04-12 18:58:26
【问题描述】:
我正在关注this 文档以尝试将我的 Heroku 数据库拉到我的本地主机。我已经成功运行了heroku pg:backups:capture 和heroku pg:backups:download,并在我的文件结构中看到了latest.dump 文件。
但是,当我尝试运行 pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump 时,出现以下错误:
pg_restore: connecting to database for restore
pg_restore: [archiver (db)] connection to database "mydb" failed: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
谁能帮我弄清楚如何解决这个问题?
【问题讨论】:
标签: ruby-on-rails postgresql heroku