gitmyhub

cli

TypeScript ★ 1 updated 1d ago

Open-source CLI to back up a Supabase project (Postgres + Storage) to your own S3/R2/B2 bucket. The DIY layer under backupdrill.com.

A command-line tool that backs up your Supabase database and files directly to your own S3-compatible storage, with checksums so you can verify the backup is complete and correct.

TypeScriptNode.jspg_dumpS3-compatible storagesetup: moderatecomplexity 3/5

Backupdrill is a command-line tool that backs up a Supabase project to an S3-compatible storage bucket you control. It captures both the Postgres database and Storage files together, and creates a manifest file with checksums so you can verify exactly what was backed up. The data streams directly from your machine to your bucket without passing through any intermediate server.

The tool exists because Supabase's built-in restore only recovers metadata about Storage files, not the actual files themselves. Supabase's paid plans also keep backups for only seven days and do not let you pull them into your own infrastructure. A database dump you have never actually restored is just a guess, and this tool aims to make backups verifiable.

To run it, you need Node.js 20 or higher and a version of pg_dump that matches or exceeds your Supabase Postgres version. You install the tool globally with npm or run it directly with npx. Configuration works through environment variables, a config file, or command-line flags, with flags taking the highest priority. You provide a database connection string from your Supabase dashboard, destination bucket credentials, and optionally Storage access keys if you want file backups included.

The tool also provides an estimate command that measures your database and Storage size and projects the monthly egress cost. Backing up pulls data out of Supabase, which counts against your egress allowance. For Pro plans, Supabase includes 250 GB per month, and overage costs about $0.09 per gigabyte. A 50 GB project backed up daily would cost roughly $112 per month in egress alone, so weekly schedules are recommended for larger projects.

The hosted service at backupdrill.com adds scheduling, restore drills that test whether your backup actually works, alerts, and reports. The CLI is the do-it-yourself layer underneath that service.

The full README is longer than what was shown.

Where it fits