DigitalOcean's managed PostgreSQL clusters are backed up daily and support point-in-time restore within a limited retention window. Restoring always creates a new cluster inside DigitalOcean, and you can't download those backups. For a copy you control, and one that outlives the retention window and the cluster itself, use pg_dump.
Step 1: Find the connection details
In the control panel open Databases → your cluster → Overview → Connection details. Pick Public network and note:
- Host: like
db-postgresql-nyc3-12345-do-user-678-0.b.db.ondigitalocean.com - Port: 25060, not 5432. This catches almost everyone.
- User:
doadmin(or a user you created) - Database:
defaultdbunless you created another - SSL mode:
require
DigitalOcean also offers a connection pool on port 25061. Don't use it for backups: pools in transaction mode don't work with pg_dump.
Step 2: Add your PC to trusted sources
If the cluster has Trusted sources set (it should), only listed droplets, apps and IP addresses can connect. Under Network Access (or Settings → Trusted sources), add your machine's public IP. New rules can take a minute to apply. Timeouts usually mean this step is missing.
Step 3: Back it up
$env:PGSSLMODE = 'require'
& 'C:\Program Files\PostgreSQL\18\bin\pg_dump.exe' `
-h db-postgresql-nyc3-12345-do-user-678-0.b.db.ondigitalocean.com -p 25060 -U doadmin `
-F c -f "D:\Backups\defaultdb-$(Get-Date -Format yyyyMMdd-HHmm).dump" defaultdbUse client tools at least as new as the cluster's PostgreSQL version (on the cluster's Overview page). require encrypts the connection. For certificate verification, download the cluster's CA certificate from the same panel and use PGSSLMODE=verify-full with PGSSLROOTCERT pointing at the file.
Step 4: Schedule it
Plug these values into the script from the main Windows guide:
$Database = 'defaultdb'
$PgHost = 'db-postgresql-nyc3-12345-do-user-678-0.b.db.ondigitalocean.com'
$Port = 25060
$User = 'doadmin'
$env:PGSSLMODE = 'require'with this pgpass.conf line (note the port):
db-postgresql-nyc3-12345-do-user-678-0.b.db.ondigitalocean.com:25060:defaultdb:doadmin:YOUR_PASSWORDThe script generator fills all of this in for you.
Restoring
Into a local database:
& "$bin\createdb.exe" -h localhost -U postgres defaultdb_copy
& "$bin\pg_restore.exe" -h localhost -U postgres -d defaultdb_copy --no-owner --no-privileges D:\Backups\defaultdb-20261014-0200.dumpBack into a DigitalOcean cluster, use the same command with the cluster's host, port 25060 and PGSSLMODE=require. --no-owner makes doadmin (or whoever restores) own the objects. See restoring a .dump file on Windows.
How PostgresBackup handles DigitalOcean
In PostgresBackup, add the cluster with port 25060 and SslMode=Require. Pasting the postgresql://…?sslmode=require URI from the control panel also works. Then create a nightly job. The background service runs it from boot, applies your retention rules, and logs each run, so you can see a failed backup (for example, after your IP changed) in Backup History.