All posts
How-toMay 30, 2026·7 min read·Supakeep Team

How to restore a Supabase project from a SQL backup

A step-by-step walkthrough of restoring a `.sql.gz` backup into a new or existing Supabase project.

How to restore a Supabase project from a SQL backup

What you'll need

  • A backup file (for Supakeep users, this is a .sql.gz file in your Google Drive).
  • The connection string for the Supabase project you want to restore into.
  • psql installed locally.

1. Decompress the backup

gunzip db_2026-07-16.sql.gz

You'll end up with a plain .sql file containing schema and data.

2. (Recommended) Restore into a fresh project

For safety, create a new Supabase project and restore there first. You never want to test a restore against production.

3. Run the restore

psql "postgresql://postgres:PASSWORD@HOST:5432/postgres" -f db_2026-07-16.sql

Depending on your database size, this can take anywhere from a few seconds to a few minutes.

4. Verify

  • Row counts on your key tables.
  • A few known records that should exist.
  • RLS policies and functions.

If everything looks good, you can confidently repeat the process against production during an incident.

Automate your Supabase backups today

Set it once in 20 seconds. Backups run on schedule straight to your own Google Drive.

Start free backup

Keep reading