Supabase runs automatic daily backups on its paid plans, but projects on the free plan get none. If a migration goes wrong or someone deletes the wrong rows, there's nothing to roll back to. Free projects are also paused after a period of inactivity. And even on paid plans, Supabase's backups live inside Supabase. A copy on your own disk is the one that survives a deleted project or a locked account.
Underneath, a Supabase project is an ordinary PostgreSQL database, so pg_dump backs it up like any other. Two details trip people up: which connection string to use, and what to expect when restoring.
Step 1: Use the session pooler connection string
In the Supabase dashboard, click Connect at the top of your project. You'll see three ways in:
| Connection | Host and port | Works with pg_dump? |
|---|---|---|
| Direct connection | db.<project-ref>.supabase.co:5432 | Only over IPv6 (or with the paid IPv4 add-on) |
| Transaction pooler | aws-0-<region>.pooler.supabase.com:6543 | No. Transaction mode breaks pg_dump |
| Session pooler | aws-0-<region>.pooler.supabase.com:5432 | Yes, over IPv4: use this one |
Many home and office networks don't have working IPv6, so the direct address fails with a confusing "could not translate host name" or a timeout. The session pooler works everywhere. Its username includes your project reference, for example postgres.abcdefghijklmnop. Copy the whole session pooler string and replace [YOUR-PASSWORD] with your database password (Project Settings → Database, where you can also reset it).
Step 2: Check your pg_dump version
Supabase runs PostgreSQL 15 or 17 depending on when the project was created (Project Settings → Infrastructure shows it). pg_dump must be the same major version or newer. PostgreSQL 18's tools work for both. If you see server version mismatch, install newer client tools.
Step 3: Take a backup
Supabase requires SSL, so set it before running pg_dump. In PowerShell:
$env:PGSSLMODE = 'require'
& 'C:\Program Files\PostgreSQL\18\bin\pg_dump.exe' `
-h aws-0-eu-central-1.pooler.supabase.com -p 5432 -U postgres.abcdefghijklmnop `
-F c -f "D:\Backups\supabase-$(Get-Date -Format yyyyMMdd-HHmm).dump" postgresYour data lives in the database called postgres. The dump includes your public schema and also Supabase's own schemas: auth (your users), storage (file metadata, not the files themselves) and a few internal ones. That's what you want in a backup: if you ever need your users' accounts back, they're in auth.
Step 4: Run it every night
Put the command in the backup script from the main Windows guide, with these settings, and schedule it with Task Scheduler:
$Database = 'postgres'
$PgHost = 'aws-0-eu-central-1.pooler.supabase.com'
$Port = 5432
$User = 'postgres.abcdefghijklmnop'
$env:PGSSLMODE = 'require'The matching line in pgpass.conf is:
aws-0-eu-central-1.pooler.supabase.com:5432:postgres:postgres.abcdefghijklmnop:YOUR_PASSWORDThe script generator builds the script, password file and scheduled task with these values filled in.
Restoring: two different situations
Restoring into a plain PostgreSQL database (on your PC, a server, Docker) to inspect data or recover rows is straightforward. Create an empty database and restore with ownership and permissions stripped, because Supabase's roles (authenticated, service_role, supabase_admin and so on) don't exist there:
& "$bin\createdb.exe" -h localhost -U postgres supabase_copy
& "$bin\pg_restore.exe" -h localhost -U postgres -d supabase_copy --no-owner --no-privileges D:\Backups\supabase-20261014-0200.dumpYou'll see some warnings about Supabase-specific extensions and schemas. Your tables and data in public come through.
Restoring back into a Supabase project is fussier, because the target project already has its own auth and storage schemas and you don't have superuser rights. To get a few tables or rows back, restore your dump locally as above and copy the data across. To rebuild a whole project, follow Supabase's own backup and restore with the CLI guide. It dumps roles, schema and data separately with supabase db dump and restores them with psql. Keep both kinds of backup if a full rebuild matters to you.
How PostgresBackup handles Supabase
Add your project as a server in PostgresBackup and it checks the details for you. If you paste the direct db.….supabase.co address it tells you to use the session pooler, and if you pick port 6543 it tells you that's the transaction pooler. It comes with pg_dump 18, so the version is never a problem. It backs up nightly from a background service that starts with Windows, and keeps daily, weekly and monthly copies. You can restore any of them into a local database for inspection in a few clicks.
Common questions
Will backups wake up a paused free project?
No. A paused project refuses connections, so the backup fails until you restore the project in the dashboard. Projects that are used regularly (including by a nightly backup connection) are far less likely to be paused in the first place.
How big will the backup be?
Usually much smaller than the "database size" in the dashboard, which includes indexes and internal overhead. The custom format is compressed.