hn.today

Show HN: Free weekly backups for Supabase Free projects (pg_dump to R2)

github.com10 points0 comments
Screenshot of Show HN: Free weekly backups for Supabase Free projects (pg_dump to R2)

This project provides a minimal way to back up a Supabase Free-tier PostgreSQL database without paying for Supabase Pro, which costs $25 per month and includes automated backups. A GitHub Actions workflow runs weekly, uses pg_dump to export the database, and uploads the dump to a Cloudflare R2 bucket. Setup takes about ten minutes: create the bucket and an access token, add the required credentials as GitHub repository secrets, and configure the workflow. The instructions stress using a private repository, since GitHub may disable scheduled workflows in inactive public repositories.

The backup includes the full PostgreSQL database, including auth.users, but excludes Supabase Storage files, which are stored separately. Dumps are unencrypted and uploaded as-is, so access depends on keeping the R2 bucket private and protecting its credentials. Each run transfers the entire database, counting against Supabase’s 5 GB monthly free egress allowance: a 500 MB database backed up weekly uses about 2 GB per month, while daily backups would exceed the limit. The setup also depends on using Supabase’s session pooler on port 5432; the transaction pooler and direct database host are unsuitable for pg_dump in this environment. The free version deliberately omits validation, restore testing, alerts, and encryption; a paid version adds those safeguards and related tools.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Solid 2.0

Solid 2.0

Solid 2.0 is now stable, five years after version 1.0, with a smaller API and diagnostics designed for AI agents. Its reactive graph now handles asynchronous computations, while built-in server functions support RPC calls and persistent Server-Sent Events connections. (solidjs.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.