Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Databases and Redis

DBeaver cannot run pg_restore: the utility is not found in the client home

ErrorError executing process

Short answer

DBeaver runs pg_restore from a local PostgreSQL client folder; it does not bundle one. The error means that folder is missing, wrong, or has no pg_restore. Install the client tools, then set the Local Client to the folder that contains bin, not to bin itself.

  • Applies to DBeaver 25.x, PostgreSQL client 17, Ubuntu 24.04, macOS with Homebrew
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Search the machine for the real pg_restore, so you know which folder DBeaver should use.

    # Linux / macOS
    find /usr /opt -name "pg_restore" 2>/dev/null
  2. 2Match what you see, then jump to its fix

    1. 1The search above returns nothingNo PostgreSQL client tools are installedFix
    2. 2The message shows a client home such as /usr/lib that does not hold the toolsThe Local Client points at the wrong folderFix
    3. 3brew install libpq worked but DBeaver finds nothing, and the tools are not on your PATHOn macOS the Homebrew client is keg-onlyFix

What does the error look like?

  • Error executing process
  • Utility 'pg_restore' not found in client home '/usr/lib' (/usr/lib)

Cause 1 of 3

No PostgreSQL client tools are installed

1Check

On Debian and Ubuntu the client binaries come in the postgresql-client package for each major version. A system with only a database driver or only libraries has no pg_restore.

apt list --installed 2>/dev/null | grep postgresql-client

2Fix

Install the client package for your server's major version (the Ubuntu page lists postgresql-client-NN as client libraries and binaries).

sudo apt install postgresql-client-17

3Verify

The binary now exists and runs.

/usr/lib/postgresql/17/bin/pg_restore --version

Confirmed by postgresql.org

Did this fix it?

Cause 2 of 3

The Local Client points at the wrong folder

1Check

DBeaver wants the installation folder that contains bin. Pointing at bin itself, at an executable, or at a parent such as /usr/lib fails.

ls /usr/lib/postgresql/17/bin | grep pg_restore

2Fix

In the connection, open Edit Connection (F4), then the Advanced section (PostgreSQL). Open the Local Client list, choose Browse, then Add Home and select the folder, for example /usr/lib/postgresql/17, not its bin subfolder.

# the folder to add is the one printed here, without /bin
dirname "$(dirname "$(find /usr -name pg_restore 2>/dev/null | head -n 1)")"

3Verify

Select the new home in the Local Client list, finish, and run the restore again.

# In DBeaver: right-click the database > Tools > Restore

Confirmed by github.com

Did this fix it?

Cause 3 of 3

On macOS the Homebrew client is keg-only

1Check

libpq is keg-only in Homebrew, so it is not linked into PATH, and DBeaver cannot guess its location.

brew --prefix libpq

2Fix

Add the folder printed by brew --prefix libpq as a Database Client Home in DBeaver.

brew install libpq

3Verify

Choose that home as the Local Client and run the restore again.

ls "$(brew --prefix libpq)/bin"

Confirmed by github.com

Did this fix it?

How do I stop it coming back?

  • Install client tools of the same major version as the server you restore into.
  • Set the Local Client once per connection, so each new connection does not fall back to a default folder.
  • Keep a note of the client home path in your team's setup guide.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.