Restore a recovery point
Roll back the current project, recover into a separate empty Supabase project, or bring back rows from one table.
A verified recovery point can replace the state of its connected project or populate a separate empty Supabase project. When you only need rows from one table, you can take that table from a downloaded recovery point instead.
Before any restore
- Choose a verified recovery point and review its component badges and recovery report.
- Pause application writes. Requests may fail while database and Storage state are changing.
- Confirm that the target Supabase project runs a Postgres major version the same as, or newer than, the backup, and one that is supported.
Roll back the current project
A fresh safety backup of the current state is created and verified first. Only then is the selected database restored in one transaction and Storage reconciled to the selected snapshot.
- Pause application writes and open the verified recovery point.
- Choose Restore whole project, then Current project.
- A temporary read-write login is requested from Supabase for this restore.
- Acknowledge the write pause and type the displayed project reference.
- Keep writes paused until the restore result and recovery report are available.
Restore to a new project
Use a separate, empty Supabase project when you want isolation from the damaged source or need to prepare a controlled cutover. The database and Auth, Storage files and bucket settings, and Edge Function bundles with deploy metadata are restored through their appropriate database or API paths.
- Create an empty Supabase project in the desired region and a supported Postgres version.
- Choose New project in the restore dialog and provide the requested temporary target access.
- After the automated restore, follow the recovery report for secrets, API keys, DNS and external services.
- Validate the application before directing production traffic to the new project.
After the restore
- Review restored row counts and component results. Any verifiable mismatch fails the restore.
- Reconfigure secret values and target-project API keys listed in the report.
- Run an application-level smoke test before resuming writes or switching traffic.
Restore one table
Take the table from a downloaded recovery point and copy the rows you need back yourself. Which rows to bring back depends on what changed since the backup, so you make that decision. Rows in your other tables stay as they are.
- Download the recovery point from Backup history and extract it. The database is in database.dump.
- Install pg_restore and psql for the Postgres major version your project runs. A newer pg_restore can write settings an older server does not accept.
- Copy the Session pooler connection string from Connect in your Supabase project and set it as DATABASE_URL.
1. Take the table out of the backup
Replace orders with your table name. This writes the rows of that one table to a file and connects to nothing.
pg_restore --data-only --schema=public --table=orders --file=orders.sql database.dump2. Load the rows into a separate table
Create an empty copy of the table in a schema of its own and point the file at it. The copy has the same columns but no keys, triggers or policies, so loading it leaves public.orders unchanged. Supabase does not expose a new schema through the Data API, so your app cannot reach these rows.
psql "$DATABASE_URL" -c "create schema recovery; create table recovery.orders (like public.orders);"
sed 's/^COPY public\.orders /COPY recovery.orders /' orders.sql > orders-recovery.sql
psql "$DATABASE_URL" -v ON_ERROR_STOP=1 -f orders-recovery.sql3. Copy back the rows you need
Compare recovery.orders with public.orders and choose the rows you want back. Then copy them in one transaction from psql or the SQL editor, and check the result before you commit.
begin;
insert into public.orders (id, customer_id, total, note)
overriding system value
select id, customer_id, total, note
from recovery.orders
where customer_id = 1
on conflict (id) do nothing;
-- check the result, then:
commit;- List the columns and leave out generated columns. Postgres computes those again.
- Keep overriding system value only when the table has a column defined as generated always as identity.
- on conflict do nothing keeps rows that exist in both tables as they are now. To put back the old values of changed rows, use on conflict (id) do update instead.
4. Remove the copy
psql "$DATABASE_URL" -c "drop schema recovery cascade;"The download, orders.sql and orders-recovery.sql contain your data. Delete them when you are done.