Your code is already safe in GitHub. This guide wires your shared Supabase Postgres — every SaaS, client, and user record — to offsite, encrypted, versioned backups on Backblaze B2.
Three layers. GitHub and Bunny already cover two of them. B2 closes the critical gap — the database.
B2 Cloud Storage → Buckets → Create a Bucket.
| Field | Set to | Why |
|---|---|---|
| Bucket Name | boom-media-backups | Globally unique; if taken, add a suffix |
| Files are | Private | Never public for backups |
| Default Encryption | Enable (SSE-B2) | Free at-rest encryption |
| Object Lock | Optional — enable for ransomware immunity | Makes backups immutable; harder to undo, so optional for v1 |
s3.us-west-004.backblazeb2.com) and Region (e.g. us-west-004) — both needed for wiring. Region is irrelevant to backup performance; take the default.Application Keys → Add a New Application Key. Scope it to just this bucket — least privilege.
| Field | Set to |
|---|---|
| Key Name | coolify-backup |
| Allow access to Bucket(s) | boom-media-backups only |
| Type of Access | Read and Write |
| File prefix / duration | Leave blank |
applicationKey is shown ONCE. Copy both keyID and applicationKey straight into your password manager. Never paste them into chat, code, or git.Which path depends on how your Supabase Postgres runs on boom-hosting (24.199.95.101). If unsure, check whether Postgres appears as a managed Database resource in Coolify or as part of a compose/service stack.
Use Coolify's built-in scheduled S3 backup. In the DB resource → Backups → add S3 destination:
# S3 destination fields Endpoint: https://s3.us-west-004.backblazeb2.com Region: us-west-004 Bucket: boom-media-backups Access Key: <keyID> Secret Key: <applicationKey> Schedule: 0 * * * * # hourly
Coolify runs the dump and the upload. Done.
pg_dump cronAdd rclone to ship each dump to B2:
# one-time: configure rclone remote rclone config # type: b2 → keyID + appKey # in your hourly backup script, after pg_dump: rclone copy /backups/pg-$(date +%F-%H).sql.gz \ b2:boom-media-backups/postgres/
Keeps your existing dump; rclone handles offsite copy.
Without retention, hourly dumps pile up forever. Set a Lifecycle Rule on the bucket (Backblaze → bucket → Lifecycle Settings) or configure it in Coolify's backup retention.
| Keep | For | Purpose |
|---|---|---|
| Hourly dumps | 48 hours | Recover from a recent mistake |
| Daily dumps | 14 days | Catch issues found days later |
| Weekly dumps | 8 weeks | Longer-horizon safety net |
SaaS/Coolify/BACKUPS.md.A backup you've never restored is a hope, not a backup. Do this once now, and once a quarter.
# 1. Pull the latest dump back down rclone copy b2:boom-media-backups/postgres/<latest>.sql.gz ./restore-test/ # 2. Restore into a throwaway scratch database gunzip -c restore-test/<latest>.sql.gz | psql "postgres://.../scratch_db" # 3. Spot-check: row counts, a known record, recent data present # 4. Drop the scratch db. You now KNOW restores work.
(Ticks save in your browser.)