The most common PostgreSQL backup setup on Windows is no product at all: a .bat or PowerShell script that runs pg_dump, scheduled with Task Scheduler. It's free, transparent and entirely under your control. We publish the full guide and a script generator because it's a perfectly good choice. Here's an honest look at what it involves.
What "properly" takes
A one-line pg_dump in a task works on day one. Running safely for a year usually needs all of this:
- Client tools at least as new as every server you back up, and updated when providers upgrade.
- A password file in a location the task's account can read, ASCII-encoded, with locked-down permissions.
- A script that names files with timestamps, uses
-wso it never hangs on a prompt, deletes partial files when pg_dump fails, and exits non-zero on failure. - Retention that only deletes after a successful backup, only touches its own files, and keeps more than the last few days.
- A task that runs when nobody is signed in and catches up after the PC was asleep.
- A log, and the habit of reading it.
- Restore tests every so often.
None of it is hard. It's a couple of hours to set up and some attention afterwards. The real risk with scripts isn't the first setup. It's the silent failure six months later: an expired password, a provider upgrade, a full disk, a changed IP allow-list. The task keeps "running" and nobody looks.
Side by side
| Script + Task Scheduler | PostgresBackup | |
|---|---|---|
| Price | Free | Free for clones, restores, manual backups; scheduled backups $9.99 once (launch price; $24 from January 1) after 14 days |
| Setup time | 1–3 hours done properly | A few minutes |
| Client tools | Install and update yourself | Included (pg_dump 18); a newer local install is used automatically |
| Password storage | pgpass.conf you create and secure | Saved per server, readable only by you, Admins and the service |
| Retention | You write it | Last N + hourly/daily/weekly/monthly/yearly per job |
| Seeing failures | Log file and Task Scheduler's last result | Backup History and a searchable Activity Log |
| Restores | pg_restore by hand | A few clicks, into a new or existing database |
| Clone to another server | Two commands | One step |
| Flexibility | Anything you can script | What the app offers |
| Backup files | Standard pg_dump | Standard pg_dump custom format |
When the script is the right answer
- You're comfortable with PowerShell and Task Scheduler, and you'll actually check the log.
- You need something the app doesn't do: uploading every backup to S3 as it's made (the app copies the weekly, monthly and yearly ones), encryption, custom pre/post commands, or running on a Windows Server Core box with no desktop.
- You have one database that rarely changes.
When the app is worth it
- You'd rather not own a script, or you're setting this up for someone who won't maintain one.
- You back up several databases on different hosts, each with its own quirks.
- You want restores and clones to be routine rather than an exercise in remembering flags.
- Your time is worth more than $9.99 once (launch price; $24 from January 1).
You don't have to choose forever: PostgresBackup writes the same pg_dump files your script would, and its free features (clone, restore, manual backups) work alongside a script you already have.