How to ‘pg_dump’ with Jetbrains Datagrip on macOS

Jeannot MullerJeannot Muller
1 min read

If you are using Datagrip from Jetbrains to manage your Postgres database, you might have bumped into difficulties in how to dump (or how to restore) a Postgres SQL dump.

The menus are showing the “commands” but without the binaries, you can’t “run” those. I can’t remember how to install the binaries on a new machine and then I’m searching the net for information, only to usually read articles of frustrated users. On macOS, it is quite easy. All you need to do is to install “libpq”, which can be done via homebrew.

After you have installed homebrew, just run the following command in a terminal window:

brew install libpq

Now you will find different Postgres tools (like pg_dump) in the following folder:

/usr/local/opt/libpq/bin

Those links are sym-linked to another location but never mind that DataGrip will show you the “real” path. Once done, you can run a pg_dump within DataGrip from jetbrains.com on macOS.

0
Subscribe to my newsletter

Read articles from Jeannot Muller directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jeannot Muller
Jeannot Muller

Founder and Managing Director at TECcompanion GmbH