Skip to main content

Snapshot your entire Supabase project — schema, data, functions, templates, storage, secrets, auth, realtime, vault, branches, and more

Project description

version python license modules

supadump

One command. Your entire Supabase project. On disk.

Schema · Data · Edge Functions · Email Templates · Storage · Secrets ·
Auth Providers · Roles & Grants · Realtime · Vault · Branches ·
Service Versions · Network & SSL · Metadata · Manifest


Why supadump?

Supabase has no built-in backup. You can pg_dump the database, but that leaves functions, storage, auth config, templates, secrets, and a dozen other critical pieces stranded in the cloud. If your project goes down, gets corrupted, or you just need to migrate — you're stitching together half a dozen tools, scripts, and API calls.

supadump changes that. It's a single Python script that talks to the Supabase Management API and your local Supabase CLI to snapshot every layer of your project.

Think of it as mysqldump, but for all of Supabase.


What it saves

# Module What you get Flag
1 Database Schema 117 tables, 648 functions, 88 triggers, 203 RLS policies, 32 cron jobs, indexes, extensions, enums, views, publications, event triggers, foreign wrappers --db
2 Table Data All rows via pg_dump --data-only --data
3 Edge Functions Raw TypeScript source of every function --functions
4 Email Templates HTML templates, subject overrides, SMTP config --templates
5 Storage Bucket metadata, folders, and every uploaded file --storage
6 Secrets & Keys Anon key, service role key, JWT secret --secrets
7 Auth Providers OAuth client IDs/secrets, rate limits, hooks, MFA config --auth-providers
8 Roles & Grants DB roles, table/function grants, default privileges --roles-grants
9 Realtime Publication tables --realtime
10 Vault Secrets Secret names & metadata (values redacted) --vault
11 Auth Schema auth.*, storage.*, realtime.* table structures --auth-schema
12 Service Versions Postgres, GoTrue, PostgREST, Realtime, Storage API, Edge Runtime --service-versions
13 Project Metadata Name, org, region, status --metadata
14 Network & SSL IP restrictions, SSL enforcement --network-ssl
15 Branches Preview branch list --branches
16 Manifest SHA256 checksums of every dumped file --manifest

Quick start

# Install the Supabase CLI (https://supabase.com/docs/guides/cli)
# Link your project
supabase login
supabase link --project-ref your-ref

# Dump everything
supadump

# Dump specific pieces
supadump --db                          # schema only
supadump --functions --templates       # edge functions + email templates
supadump --all --output ./backup       # full snapshot to custom dir

# Verify remote vs local
supadump --verify

Why you need this

You deploy to production. You have RLS policies, edge functions, email templates, and a dozen auth providers configured through the dashboard. If you lose access, how long would it take to reconstruct every piece?

You migrate between projects. You're moving from free tier to pro, or from one org to another. You need schema and functions and auth config and storage — all at once, atomically.

You want version control for your infra. Dump to ./backup, commit to git, and pin every layer of your project to a point in time. git diff your Supabase config.

You sleep better at night. One script. One command. Everything on disk.


Usage

supadump                               # snapshot everything
supadump --db                           # schema only (no data)
supadump --data                         # user data only (rows)
supadump --storage                      # bucket files only
supadump --functions                    # edge functions only
supadump --templates                    # email templates only
supadump --secrets                      # API keys & secrets
supadump --auth-providers               # OAuth configs
supadump --roles-grants                 # DB roles & grants
supadump --realtime                     # realtime publication
supadump --vault                        # vault secrets meta
supadump --metadata                     # project info
supadump --network-ssl                  # network + SSL
supadump --branches                     # preview branches
supadump --auth-schema                  # auth/storage/realtime table structures
supadump --service-versions             # GoTrue/PostgREST/etc versions
supadump --db --data                    # schema + data only
supadump --all --output ./backup        # full snapshot
supadump --verify                       # compare remote vs local
supadump --manifest                     # checksums only

Requirements

  • Python 3.9+
  • Supabase CLI (supabase) — linked to your project via supabase link
  • Supabase access token with manage_projects scope (set via SUPABASE_ACCESS_TOKEN or supabase login)
  • Docker (optional) — required only for --data (table rows) and --storage (file downloads). Metadata-only operations work without it.

Security

  • Vault secret values are never saved — only names and metadata
  • Secrets are written to .env files — store them offline, encrypt them, never commit them
  • The script passes your access token via environment variable, never on the command line
  • Review the manifest (--manifest) to verify file integrity after dumping

Architecture

supadump
├── ──db            →  supabase/migrations/schema.sql
├── ──data          →  supabase/migrations/data.sql        (Docker)
├── ──functions     →  supabase/functions/{name}/index.ts
├── ──templates     →  supabase/templates/{name}.html
├── ──storage       →  supabase/.temp/storage/             (Docker)
├── ──secrets       →  supabase/secrets/secrets.env
├── ──auth-providers → supabase/secrets/auth_providers.json
├── ──roles-grants  →  supabase/migrations/roles_grants.sql
├── ──realtime      →  supabase/migrations/realtime_tables.sql
├── ──vault         →  supabase/secrets/vault_secrets.json
├── ──metadata      →  supabase/secrets/project_metadata.json
├── ──network-ssl   →  supabase/secrets/network_*.json
├── ──branches      →  supabase/secrets/branches.json
├── ──auth-schema   →  supabase/migrations/auth_schema.sql
├── ──service-versions → supabase/secrets/service_versions.json
├── ──verify        →  comparison table (stdout)
└── ──manifest      →  supabase/manifest.json

Trending Topics

backup and disaster recovery cloud data migration business continuity infrastructure backup database replication SaaS data protection project snapshot cloud infrastructure management data portability vendor lock-in prevention disaster recovery planning cyber resilience multi-cloud strategy database schema export edge function backup Supabase backup PostgreSQL dump infrastructure as code cloud migration tools data sovereignty


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supadump-1.0.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

supadump-1.0.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file supadump-1.0.0.tar.gz.

File metadata

  • Download URL: supadump-1.0.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for supadump-1.0.0.tar.gz
Algorithm Hash digest
SHA256 acf222a9a79a5339b212ccc935a4dea9a02c268aae084b8f4b7b9db4667b92cd
MD5 adf24f787b2870cdfb04b9aeee21bc8e
BLAKE2b-256 1cb7418331093f682921035614085acc0714b04f87ef6aab700629c78f527f55

See more details on using hashes here.

File details

Details for the file supadump-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: supadump-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for supadump-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e613069ceb30f166f12da4787b7a45bcf611688b5d94b0bfb0a28d1b43fb2589
MD5 a80bb1e60a040692a0db5ddee941cd0b
BLAKE2b-256 b877f12726d6126af7b56ac9b4c5ac260a1daeb59fc27f03d3fec44df984e3cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page