Thanks! Some of that is already in there: - **Storage files:** the backup records a sha256 for every file in `manifest.json`, and the drill downloads a random sample of up to 100 and checks them against it. `--verify-all-files` checks every file. - **Foreign keys:** they're added after the data loads, and Postgres checks every existing row when it adds one, so a broken reference fails the drill. The exception is a foreign key into `auth.users`. The sandbox has no Supabase auth tables, so the drill reports it as skipped, and `restore --dry-run` checks it against the real target and tells you how many rows have nothing to point at. - **RLS:** policies are restored, including ones `TO authenticated` / `anon`, but the drill connects as a superuser and doesn't test what they allow. In the sandbox `auth.uid()` is a stub that returns null, so per-user policies can't be checked there yet. - **Sequences:** not checked yet. Comparing each sequence with the max of its column is a good one to add. For now you can do it with `--check-cmd`, which gets the restored copy's connection string in `BACKUPDRILL_SANDBOX_URL`.
+1 to Gary. Stopping all traffic and letting the IO burst budget refill (or moving to Pro/Micro) is the fix. On the data-loss worry, a few things that might help: - **An exhausted IO budget or a restart doesn't delete data.** The instance is throttled, not wiped. Just avoid reset, pause/restore, or deleting the project while you wait. - **The Firebase migration is the likely trigger.** Bulk imports are very IO-heavy and can burn through Nano's daily burst budget quickly. If any import or sync script is still running, stop it first, or the budget won't recover. - **Your source data is still in Firebase**, so in the worst case you can re-run the migration. Keep that export until Supabase is stable. - **Back up as soon as it's healthy.** Free plan backups can't be downloaded, so once it's back, run `pg_dump` with the session pooler string from the Connect dialog: `pg_dump "<session-pooler-url>" -Fc -f starfish.dump` That covers your tables plus the `auth` users. If you re-run the import later, do it in smaller batches spread over time so you stay inside the burst budget. (Disclosure: I build [BackupDrill](https://backupdrill.com), which schedules Supabase backups and runs restore tests. A nightly `pg_dump` cron works too.)
Sorry you're dealing with this. A crash/recovery loop on Nano is usually a resource problem, and the first priority is getting a copy of your data out. **1. Find out why Postgres keeps restarting** "Repeated recovery events" means Postgres is crashing and replaying WAL on every start. On Nano (0.5 GB RAM, small burst IO) the usual causes are: - **Out of memory**: check Logs → Postgres for `terminated by signal 9` or `server process ... was terminated`. - **Disk full**: look for `No space left on device` / `could not write`. Free projects have 1 GB of disk. The 500 MB database-size quota triggers read-only mode, but WAL and temp files can still fill the disk. - **Disk IO budget exhausted**: check Observability → Database Health. Once the daily burst budget is used up, Nano falls back to baseline IO (~250 IOPS). Then health checks and Supavisor connections time out, which matches what you're seeing. **2. Cut the load while it recovers** Your read-only fallback is a good call. Also pause anything that still hits the DB: Vercel crons, background workers, client retries. From Vercel, connect through the Supavisor **transaction** pooler (port 6543) with a small pool size, not the direct connection. Serverless functions opening new connections on every request can knock a Nano instance over again right after a restart. **3. Take your own backup as soon as it's reachable** Free plan projects don't have downloadable backups, so there may be no "latest backup" you can restore yourself. The next time it's healthy, even briefly, dump everything right away. Use the **session pooler** string from the Connect dialog (the direct host is IPv6-only): ```bash pg_dump "<session-pooler-connection-string>" -Fc -f jobhub_$(date +%F).dump ``` This includes the `auth` and `storage` schemas (users and Storage *metadata*). The files inside Storage buckets are not in the dump and need to be downloaded separately. **4. Open a support ticket** GitHub Discussions isn't a support channel. File a ticket at https://supabase.help with your project ref and the log lines above. Only Supabase can inspect the instance, the underlying volume, and any internal snapshots. Until then, don't pause, reset, or restore the project. If the logs point to OOM or IO, upgrading to Pro with a larger compute size is the most direct fix. It requires a restart, so take the dump first. Pro also gives you daily backups from then on. --- Longer term, the hardest part of an incident like this is having no backup you control. Keep at least one off-platform copy and actually test restoring it. A nightly `pg_dump` cron to S3/R2 is enough. Disclosure: I build [BackupDrill](https://backupdrill.com), which automates this for Supabase with scheduled backups plus restore drills that prove the backups actually work. Happy to help with any of the steps above either way.
Can't answer the managed-role boundary, that one needs someone from Supabase. On Q5 though, a few things that bite when you rehearse against a restored copy in plain Postgres: - Any table or function with a column/parameter default of auth.uid() fails to create. pg_restore logs it and keeps going, so the restore looks fine and the table is just missing. Create anon, authenticated and service_role plus stub auth.uid()/role()/email()/jwt() in the target first. Don't create auth.users. - For ACL work, don't pass -x/--no-privileges when dumping, and make sure the roles exist before the restore or the GRANTs error out. - `supabase db dump` has no data by default, so add a separate --data-only dump. Then snapshot grants from information_schema.role_table_grants (and pg_class.relacl / pg_proc.proacl) before the migration, after it, and after the reverse migration, and diff them. Also compare row counts per table against the source. Plain Postgres won't reproduce Supabase's managed roles, so this proves your app objects and grants round-trip, not the provider side.
Can't help with the account mapping itself, only Supabase can fix that. But while you wait: the project is still running, so if you have the database connection string anywhere (.env, Prisma/Drizzle config, a server secret), take a dump now so you're not depending on getting dashboard access back. `pg_dump "postgresql://..." -Fc -n public -f journey.dump` Use a pg_dump version at least as new as your project's Postgres. Also heads up if you go the CLI route: `supabase db dump` gives you schema only unless you add `--data-only`, which catches a lot of people. That dump won't have your Storage files, only the storage.objects rows. The actual uploads need the Storage S3 keys (Storage → Settings) plus something like rclone, so that one has to wait until you're back in the dashboard.
The accepted answer is still the right blueprint. A few additions for people landing here from search in 2026 — these are the things that bit people later in this thread, plus what I'd add after running this setup in production: **1. The rclone signature errors reported above (@igorlanko, @Schotsl).** Versions after 1.67.0 (reports in this thread start at 1.68.0) had trouble against Supabase's S3 endpoint, while pinning an older release like 1.62 (as @lautaroPH suggested) worked. If you'd rather not pin rclone, the plain AWS CLI/SDK talks to the endpoint fine — that's what I ended up using: ```bash aws s3 sync s3://<your-bucket> ./storage-backup/<your-bucket> \ --endpoint-url "https://<project-ref>.storage.supabase.co/storage/v1/s3" \ --region <project-region> ``` Credentials come from Dashboard → **Storage → Settings → S3 Access Keys**. Note these keys bypass RLS — treat them like a service-role key and keep them out of client code. **2. Match your `pg_dump` major version to the server.** Supabase currently runs Postgres 15–17 depending on when your project was created. A `pg_dump` older than the server's major version can fail (or silently mis-handle newer features). Check with `pg_dump --version` vs. `select version();`. On macOS, `brew install libpq` gets you a current one; on Debian/Ubuntu use the PGDG apt repo for `postgresql-client-17`. **3. Use the Session Pooler connection string** (Project Settings → Database → Connection string → Session pooler), not the direct `db.<ref>` host — the pooler is IPv4-reachable, which matters from CI runners and most home networks. The default `postgres` user owns your tables, so the dump passes RLS; a least-privilege dump role is mostly not viable on Supabase because `pg_dump` errors on any RLS-enabled table the role can't bypass, and `bypassrls` can't be granted without superuser. **4. A backup you've never restored is a guess.** The cheapest verification is restoring into a throwaway Postgres and spot-checking row counts: ```bash docker run --rm -d --name restore-test -e POSTGRES_PASSWORD=test -p 5433:5432 postgres:17 pg_restore --clean --if-exists --no-owner \ --dbname "postgresql://postgres:test@localhost:5433/postgres" dump.pgcustom psql "postgresql://postgres:test@localhost:5433/postgres" \ -c "select relname, n_live_tup from pg_stat_user_tables order by 2 desc limit 10;" docker rm -f restore-test ``` If your schema uses extensions (e.g. `vector`), install them in the container before restoring, or the restore fails. **5. Budget for egress.** Every dump + file download counts as uncached egress on your Supabase bill ($0.09/GB past your plan's allowance; the Free plan's 5 GB/month allowance is enforced through a fair-use flow — notice, then a grace period, then restrictions, never a charge — so recurring large backups aren't viable on Free). Weekly is usually the sane default once your data is tens of GB. Full disclosure: I'm the author of an open-source CLI that grew out of exactly the problems in this thread. `npx backupdrill backup` streams the dump — and, pointed at your project's Storage S3 keys, the Storage files too — to your own S3/R2 bucket with a SHA-256 manifest, and `backupdrill drill` does step 4 automatically (throwaway Docker Postgres, extension pre-install, file checksums): https://github.com/backupdrill/cli (MIT). It dumps the schemas you point it at (`public` by default); for the `auth` schema specifics, the accepted answer's per-schema `pg_dump` approach is still what I'd follow. Longer write-ups of the manual approach: https://backupdrill.com/guides/supabase-backup and, for the restore-verification step, https://backupdrill.com/guides/test-supabase-backup-restore
@gonpeche asked this in February and it's still open — and since this thread still ranks for the question, here's where things stand in 2026: unchanged. Supabase's automated backups cover the **database only**. Storage files are not in any backup you can restore. Worse, if you *do* restore a database backup, the `storage.objects` metadata rows come back and point at files the restore did not bring back, so your app looks intact until someone opens an upload. What you can do today with standard tools: **1. Turn on the S3 protocol for your project's Storage.** Dashboard → **Storage → Settings → S3 Access Keys** → enable the S3 connection and generate an access key pair. The endpoint and region are shown on the same page. (These keys bypass RLS — keep them server-side only.) **2. Sync every bucket to storage you own** — e.g. Cloudflare R2, Backblaze B2, or your own S3 — with rclone: ```ini # ~/.config/rclone/rclone.conf [supabase] type = s3 provider = Other access_key_id = <SUPABASE_S3_ACCESS_KEY_ID> secret_access_key = <SUPABASE_S3_SECRET> endpoint = https://<project-ref>.storage.supabase.co/storage/v1/s3 region = <project-region> [r2] type = s3 provider = Cloudflare access_key_id = <R2_ACCESS_KEY_ID> secret_access_key = <R2_SECRET> endpoint = https://<account-id>.r2.cloudflarestorage.com ``` ```bash rclone sync supabase:<bucket> r2:my-backups/storage/<bucket> --checksum ``` If rclone throws signature errors against the Supabase endpoint (some versions did — see discussion #22200), the AWS CLI is a reliable fallback: ```bash aws s3 sync s3://<bucket> ./storage-backup/<bucket> \ --endpoint-url "https://<project-ref>.storage.supabase.co/storage/v1/s3" \ --region <project-region> ``` **3. Schedule it, and dump the database in the same run** (cron or a GitHub Actions workflow), so the DB snapshot and the file snapshot describe the same moment — otherwise a restore gives you metadata rows and files that disagree with each other. **4. Mind egress.** Downloading your files counts as *uncached egress* on your Supabase bill: $0.09/GB beyond your plan's allowance (Free: 5 GB/month, enforced through a fair-use flow of notice → grace period → restrictions, so recurring large backups aren't viable there; Pro: 250 GB included). For big buckets, weekly beats daily. I ended up building an open-source CLI for exactly this — disclosure: I'm the author. `npx backupdrill backup` captures the Postgres dump and (given your project's Storage S3 keys) the Storage files together into your own bucket with a SHA-256 manifest, and `backupdrill drill` restores the snapshot into a throwaway Docker Postgres and checksums the files to prove the backup actually restores: https://github.com/backupdrill/cli (MIT, comes with a GitHub Actions template for scheduling). Step-by-step version of the manual approach above: https://backupdrill.com/guides/supabase-storage-backup