How to download logical backups in Supabase with physical backups enabled?

Last edited: 2/3/2025

If you're unable to download backups due to physical backups being enabled, you can use the PostgreSQL utility pg_dumpall as an alternative. This tool offers more flexibility and control for creating backups.

You can use the command below to backup your database: pg_dumpall -h your-db-host.supabase.co -U postgres > backup.sql

Or alternatively, you can create a backup of your Supabase database and store it in your repository by running the following script: https://github.com/mansueli/Supa-Backup

To retrieve your database connection details from the dashboard:

  1. Go to your Dashboard.
  2. Select your Project.
  3. Navigate to: https://supabase.com/dashboard/project/_?showConnect=true.
  4. Or click the "Connect" icon in the dashboard.
  5. There, you’ll see the connection strings that we have available.
image

Additionally, please, refer to our documentation on Database Backups.