Postgres backups, restore-tested · checked

Supabase pg_dump fails with "Network is unreachable" on GitHub Actions

Supabase's direct connection, db.<ref>.supabase.co, is IPv6 unless the project has the IPv4 add-on, and GitHub's hosted runners have no IPv6, so pg_dump fails with "Network is unreachable". Use the Session pooler string instead (Connect > Session pooler in the dashboard: port 5432 on *.pooler.supabase.com), which Supabase serves over IPv4 on every plan.

Direct connection
db.<ref>.supabase.co:5432. IPv6, or IPv4 with the paid add-on. Supabase recommends it for pg_dump where the network has IPv6.
Session pooler
postgres.<ref>@<region>.pooler.supabase.com:5432. IPv4 on every plan; one server connection per client, so pg_dump works.
Transaction pooler
Port 6543. Does not support prepared statements; do not use it for pg_dump.
GitHub-hosted runners
No IPv6 to the internet. Users have asked GitHub for it since 2020 (runner-images #668), and were still asking in September 2026.

The same error appears from any IPv4-only network, such as some home routers, Docker's default network and several hosting platforms. The fix is the same.

Every week, in your own GitHub Actions

$ npx --allow-remote=root https://agentwares.vercel.app/dl/restoreproof-0.1.0.tgz init

Writes .github/workflows/restoreproof.yml and .github/restoreproof/drill.mjs into your repository, then tells you which repository secret to add. Each run backs the database up, restores it into a throwaway PostgreSQL of the same version on the runner, compares the two, and fails the job when the backup would not restore. To test once from this machine: npx --allow-remote=root https://agentwares.vercel.app/dl/restoreproof-0.1.0.tgz check, with the URL in RESTOREPROOF_DATABASE_URL. Free and MIT licensed; nothing is sent to us.

restoreproof: the same test, every week

restoreproof backs the database up in your own GitHub Actions, restores the backup into a throwaway PostgreSQL of the same version on the runner, and fails the job when it would not restore. Each run checks:

A recorded run, and what else exists.

An email when a weekly restore test fails or does not run is not built.

It would email the people you name when a weekly test fails, when the backup shrinks, or when no test has run for eight days, from outside GitHub's scheduler. Today GitHub emails one person when a scheduled run fails, and nobody when it never runs: it can drop a scheduled run under load, and it turns off a public repository's schedules after 60 days without activity. Part of it runs today: agentcheck's free plan checks one URL every hour and emails you when the answer stops matching, so a check that expects "passing" from the workflow's status badge, on a public repository, tells you when a test fails, though not when one never runs. Watch the badge, free. If you would pay for the whole of it, say so with one click. The click is counted, and nothing else is sent or stored unless you then leave an email.

Sources

Related

restoreproof is a free tool from agentcheck, which runs scheduled checks of your endpoints and alerts you when an answer changes. Facts come from each provider's own pages, read on the day shown.