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
- Go to postgresql.org/download/windows and follow the link to the installer by EDB.
- Download the latest version for Windows x86-64 and run it.
- On Select Components, untick PostgreSQL Server, pgAdmin 4 and Stack Builder. Leave only Command Line Tools ticked.
- 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:
& 'C:\Program Files\PostgreSQL\18\bin\pg_dump.exe' --versionOption 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:
- Download
postgresql-<version>-windows-x64-binaries.zip. - Extract it, for example to
C:\Tools\pgsql. - Use
C:\Tools\pgsql\bin\pg_dump.exe(andpg_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.