Skip to content
ReviveDB
Blog

Is a Supabase branch a backup?

By ReviveDB

No. A Supabase branch is a separate database for trying out changes before they reach production. It can hold a copy of your data, but it is not made, kept or restored like a backup.

A new branch

According to Supabase's branching documentation, a new branch starts without production data and without Storage files. Its schema is built from migrations: the ones in your repository for a branch from the GitHub integration, or the migration history of the base project for a branch made in the dashboard. Sample rows come from a seed file.

With the Point-in-Time Recovery add-on you can turn on Include data when creating a branch in the dashboard, or pass --with-data to supabase branches create. The branch then gets a copy of the production data at that moment.

Limits of a branch with data

  • The copy is from the moment you created the branch. Nothing refreshes it, and every test you run on the branch changes it.
  • Branches live in the same Supabase organization as production. If you lose access to the account or the organization is deleted, the branch is gone too.
  • Include data copies the database. Storage files stay behind.
  • Nothing tells you whether the copy is complete or loads.
  • Restoring from a branch is manual: you copy data from one project back into another yourself.
  • A branch with data runs at the compute size of the base project with a larger disk, and is billed that way.

Testing migrations

Branching is for testing a migration against realistic data before you run it on production. That makes a bad migration less likely, and you still need a copy to restore from when something else goes wrong.

An independent copy

Keep scheduled copies of the database, Auth users and Storage files outside the project, and test a restore now and then. Supabase backups and PITR explains what Supabase itself keeps, and the backup and restore checklist what an independent copy should contain.