38

I installed PostgreSQL because I need to restore a large .backup file I received for upload to another platform (it's 38 million rows which was apparently too large for the person to export any other way). When I try to "restore" in pgAdmin 4 I get the message:

Please configure the PostgreSQL Binary Path in the Preferences dialog.

Is this just the path to the PostgreSQL folder? I can't find documentation on this on the PostgreSQL site. All I can find is:

Use the fields in the Binary paths node to specify paths to the PostgreSQL binary utilities and EnterpriseDB Postgres Advanced Server binary utilities.

Is there an easier way to restore the database other than through pgAdmin?

Paul White
  • 94,921
  • 30
  • 437
  • 687
randodatauser
  • 381
  • 1
  • 3
  • 3

3 Answers3

54

Configure pgAdmin->Paths->Binary paths and set "PostgreSQL Binary Path" as shown in the screenshot. Depending on your OS and installation details, the binaries may be located elsewhere. Try

`which psql`

from the command line on linux/Unix systems.

A Windows example: PostgreSQL Binary Path: "C:\Program Files\PostgreSQL\9.6\bin" enter image description here

András Váczi
  • 31,778
  • 13
  • 102
  • 151
Maks K.
  • 641
  • 4
  • 2
35
  1. Select "Servers" item.
  2. Select "Configure PgAdmin"

    Select Servers item

  3. Enter to local path Postgresql "bin" folder.

    Enter the path to "pg bin" folder


  • On OSX the path is /Applications/Postgres.app/Contents/Versions/latest/bin
  • On Mac OSX Sierra the path was /Library/PostgreSQL/9.6/bin - I believe this is the default location from the EnterpriseDB installer for 9.6 that automatically installs PgAdmin 4.
  • On Linux the path is /usr/bin

    enter image description here

Paul White
  • 94,921
  • 30
  • 437
  • 687
Percy Rojas
  • 451
  • 3
  • 2
2

Community wiki answer:

Just use pg_restore. That's all PgAdmin is doing behind the scenes.