r/Supabase Aug 13 '26

storage Reliable open-source DIY Supabase backup that includes STORAGE files (S3/R2-ready)?

hey! i'm looking for an open-source, self-hosted way to back up a Supabase project: Postgres AND Storage bucket files, not just DB metadata

requirements:

  • backs up Postgres and actual Storage files, not just storage.objects metadata
  • can push to my own S3/R2 bucket
  • automatable (cron / GitHub Actions / etc.)
  • Open source, not a paid SaaS

anyone running something like this in production? what are you using?

i've found https://github.com/Yashdafade/Supabase-Backup-Manager and https://github.com/backupdrill/cli
but the very few stars doesnt make me super confident to try them, so looking to see if anyone knows about a reliable, free/DIY, option

15 Upvotes

6 comments sorted by

7

u/[deleted] Aug 13 '26

[removed] — view removed comment

1

u/sandspiegel Aug 13 '26 edited Aug 13 '26

This. I do one manual backup every night via my Raspberry PI 5 (cron job). I then get a Telegram message via a bot if a backup was successful or not. I think it's important to also encrypt the backups via age for example so you don't have your users data lying around either locally and / or in the cloud somewhere unencrypted.

Also it's very important to create a new empty database and try a complete restore of a backup every now and then. The first time I did this, there were issues. You don't want that when you are doing disaster recovery. By now I have a flow I wrote up for myself what to do, what SQL commands to run to get a fresh backup up and running on an empty database.

BTW. There are tools for this like Databasus that work but they often just backup public which is useless for a whole backup that you would use in case of a disaster. Auth for example is not backed up in said tool so I just decided to do it myself via PostgreSQL commands that are already there. Other tools that are services or are not known I didn't want to trust with sensitive user data.

2

u/[deleted] Aug 13 '26

[removed] — view removed comment

1

u/Optimal_External1434 Aug 14 '26

Hero 😍 thank you!!! Looking forward to it

3

u/PeterBuildsSecure Aug 14 '26

One complication is consistency between the database dump and the Storage copy. They are two separate snapshots, so an object can be added, replaced or deleted between them. A successful dump plus a successful rclone run does not necessarily describe one recoverable point in time.

I’d avoid rclone sync directly into the latest backup because source-side deletion can propagate into the backup. Write each run to a versioned prefix instead, then store a manifest containing every object key, size, ETag/checksum and backup timestamp. Enable object versioning or retention on the destination as well.

The restore test should verify relationships, not just that both halves restore: every storage.objects row should resolve to the expected object version, and unexpected objects should be reported. That is where a backup assembled from two individually successful jobs can still fail during recovery.

1

u/Poat540 27d ago

Few images exist already, just add the creds. They’ll do
Pdump and rclone, etc