How to install only the PostgreSQL command-line tools on Windows

You don't need a PostgreSQL server on your PC to back one up. Two ways to get just pg_dump, pg_restore and psql.

Updated October 14, 2026 · 2 min read

Short on time? PostgresBackup does everything on this page from a Windows app: scheduled pg_dump backups, retention and one-click restores. Download it free.

To back up a PostgreSQL database you need its client tools: pg_dump (backups), pg_restore (restores of custom-format dumps) and psql (the command-line client, also used to restore plain .sql dumps). You don't need a PostgreSQL server on your PC, and you don't want one running just for that.

Which version? The newest. Client tools work with servers of the same or older versions, so the latest release backs up everything from PostgreSQL 9.2 onward. An old version will fail on newer servers with a server version mismatch.

Option 1: The official installer, tools only

  1. Go to postgresql.org/download/windows and follow the link to the installer by EDB.
  2. Download the latest version for Windows x86-64 and run it.
  3. On Select Components, untick PostgreSQL Server, pgAdmin 4 and Stack Builder. Leave only Command Line Tools ticked.
  4. Finish the installer. No service is created and no port is opened.

The tools land in C:\Program Files\PostgreSQL\<version>\bin. The installer doesn't add that folder to PATH, so either call the tools by full path (best in scripts) or add the folder to PATH: System Properties → Advanced → Environment Variables → Path → New.

Check it worked, in a new PowerShell window:

PowerShell
& 'C:\Program Files\PostgreSQL\18\bin\pg_dump.exe' --version

Option 2: The binaries zip, no installer

EDB also publishes a plain zip of the Windows binaries (linked from the same download page, "zip archive of the binaries"). It's useful when you can't run installers or want the tools in a folder of your choosing:

  1. Download postgresql-<version>-windows-x64-binaries.zip.
  2. Extract it, for example to C:\Tools\pgsql.
  3. Use C:\Tools\pgsql\bin\pg_dump.exe (and pg_restore.exe, psql.exe) from there.

The zip contains the whole server and pgAdmin too. You can delete everything except bin, and inside bin the tools need their DLLs (libpq.dll, the OpenSSL, zstd, lz4, iconv and intl libraries), so keep the folder together rather than copying single .exe files out.

If you already have a PostgreSQL server installed

A full PostgreSQL install includes the command-line tools in its bin folder. If that server is older than the database you want to back up, install newer tools alongside it (option 1 with only Command Line Tools ticked). Both versions can live side by side. Then make sure you run the new one: see which pg_dump am I running?.

Next: make the first backup

With the tools in place, the complete guide to automatic PostgreSQL backups on Windows takes you from a first manual pg_dump to a scheduled, logged backup.

How PostgresBackup handles the tools

PostgresBackup includes the PostgreSQL 18 client tools, so there's nothing else to install. If your PC has a newer PostgreSQL installed, it uses that one instead, always taking pg_dump, pg_restore and psql from the same folder so their versions and DLLs match.

The shortcut

Rather not maintain a backup script?

PostgresBackup is a Windows app that does all of this for you, with nothing to script and nothing to remember.

  • Scheduled pg_dump backups from a background service that starts with Windows
  • Keep the last N files plus hourly, daily, weekly, monthly and yearly copies
  • Restore any backup, or clone a database to another server, in a few clicks
  • PostgreSQL client tools included; standard .dump files, no lock-in
  • No account, no subscription, nothing leaves your machine

Clones, restores and manual backups are free. Scheduled backups are free for 14 days, then $9.99 once (launch price; $24 from January 1).