Export a Supabase database: CSV, schema or backup?

By Anil Gautam · Published and reviewed September 20, 2026

Decide what you need to do with the export first. A CSV works well for sharing table or query results. If you need to reconstruct the database, you’ll need the appropriate dump or backup instead. The steps and checks are different.

Define the export before choosing the tool

Required outcomeExport to prepareCheck
Analyze selected rowsCSV from a queryColumns, filters and row count
Document structureSchema definitionsTables, constraints and dependencies
Rebuild a databaseLogical backup and restore procedureIsolated restore test
Recover uploaded filesA separate Storage-object copyActual objects, not just metadata

Export a deliberate query result

Supabase lists CSV export among its database tools. Check the query and its result in your editor before exporting. A desktop client’s export may also have a defined scope: verify whether you are saving the loaded result, selected rows or a separate full query.

Here is an illustrative query for a weekly extract. It assumes a table and columns you must adapt to your own schema:

SELECT id, title, created_at
FROM public.tasks
WHERE created_at >= TIMESTAMPTZ '2026-09-01 00:00:00+00'
  AND created_at < TIMESTAMPTZ '2026-09-08 00:00:00+00'
ORDER BY created_at, id;

Use explicit time boundaries and a tie-breaking ID. During exploration you can add a limit, but remove it only when you intend the full extract and your tool can handle it. A successful preview of 100 rows is not confirmation that an export contains every matching row.

Check the file before sharing it

Record the query, run time and exported row count. Compare with a count using the same predicate, allowing for writes that occurred between the two queries. If you require a consistent snapshot, use a transaction/tool that explicitly supports it.

Open a sample in a text viewer before trusting a spreadsheet’s interpretation. Check leading zeros, timestamps, Unicode and missing values. Treat fields beginning with spreadsheet formula characters carefully when opening untrusted data. Share only the columns needed for the analysis, and store the extract where its recipients are authorized to read it.

Use a logical dump for reconstruction

Supabase’s db dump reference documents separate schema, data and role options. A default dump is not an automatic all-purpose copy: review its exclusions and flags. Follow the current backup and restore procedure for the destination you intend to use.

Do not paste a privileged connection string into a shared command, issue or screenshot. Use your team’s approved secret handling and protect the generated files, which may contain sensitive records even if no password appears in the filename.

Prove that the export meets its purpose

For analysis, verify a few known rows and totals. For migration, restore into an isolated target and exercise the application against that target. For recovery, document what is outside the database copy. Our Supabase backup checklist makes those boundaries explicit.

For a desktop CSV workflow, see PostgreSQL CSV exports and the plainDB platform feature matrix.

How we write and review guides · Try plainDB