What copying a Supabase project actually does
Copying a Supabase project creates a duplicate of your database structure, tables, and settings in a new, separate project. The copy includes your schema (the blueprint of how your tables are organized) and any functions or triggers you've written, but not your actual data — the rows of information stored in those tables. This is useful when you want to test changes without touching your live database, or when you need to set up a similar database for a different environment like staging or development.
Supabase does not have a built-in "clone project" button. Instead, you export your schema from the original project and import it into a new one. This takes about ten minutes if you know the steps, and requires access to both projects through the Supabase dashboard.
Key Takeaways
- Copying a Supabase project duplicates your table structure and settings but leaves behind all your actual data rows.
- You create a new empty Supabase project first, then export the schema from your original project using the SQL editor.
- The schema export is a text file of SQL commands that you paste into the new project's SQL editor to rebuild the structure.
- After importing the schema, you can manually copy data if you need it, or leave the new project empty for testing.
Create a new Supabase project to receive the copy
Log into your Supabase account and go to the Projects page. Click "New Project" and fill in the project name, database password, and region. Choose the same region as your original project if you want consistent performance. Supabase will take a few minutes to spin up the new project — you'll see a loading screen, then a confirmation when it's ready.
Once the new project is created, you'll land on its dashboard. You don't need to do anything else here yet. Keep this browser tab open or bookmark it, because you'll come back to paste your schema in a moment.
Export the schema from your original project
Go back to your original Supabase project. In the left sidebar, click "SQL Editor". At the top of the editor, you'll see a dropdown that says "New Query" — click it and select "Schema Dump". Supabase will generate a SQL file containing all the commands needed to rebuild your tables, columns, indexes, and functions.
The schema dump appears as text in the editor. Highlight all of it (Ctrl+A on Windows, Cmd+A on Mac), then copy it. This text is the blueprint of your database structure — everything except the actual rows of data.
Import the schema into the new project
Switch to the new project's tab. Go to SQL Editor in the left sidebar and click "New Query". You'll see a blank editor. Paste the schema dump you just copied (Ctrl+V or Cmd+V). The entire SQL dump will appear in the editor.
Click the "Run" button (or press Ctrl+Enter). Supabase will execute all the SQL commands and rebuild your table structure in the new project. You'll see a success message at the bottom of the screen. If there are any errors, they'll appear in red — usually this means a table name or column already exists, which you can fix by deleting that line and running again.
Verify the schema copied correctly
In the new project's left sidebar, click "Table Editor". You should see all the same tables from your original project listed here. Click into each table to confirm the columns match — same names, same data types, same settings. If a table is missing or a column is wrong, go back to SQL Editor and check the error message from your last run.
The new project is now a structural copy of the original. It has no data in it yet, which is usually what you want for a test environment. If you need to copy specific rows of data as well, you can export them from the original project as a CSV file and import them into the new one through the Table Editor.
Copy data if you need it in the new project
If you want the new project to contain actual data, you have two options. The simpler one is to export a CSV from your original project: open a table, click the menu icon (three dots), and select "read as CSV". Then go to the new project, open the same table, click the menu icon, and select "Upload CSV". This works well for smaller datasets.
For larger amounts of data or if you want to automate the process, you can write a SQL query that copies rows from the original database to the new one. This requires your original project's connection string, which you can find under Settings > Database in the Supabase dashboard. A developer can write a script to do this, but for most use cases, the CSV method is simpler and safer.
Disconnect the projects so they don't stay linked
After you've finished copying, the two projects are completely separate. Changes you make in one won't affect the other. However, if you used a script to copy data, make sure to remove any connection strings or API keys from that script so the projects don't accidentally stay connected.
If you're using the new project for testing, you might want to add a note in the project name or description so you remember it's a copy — something like "Original-Testing" or "Original-Staging". This prevents accidentally pushing changes from the test project to production.
Frequently Asked Questions
Does copying a project copy my data too?
No. The schema dump copies only the structure — table names, columns, data types, and functions. All the actual rows of data stay in the original project. You can copy data separately using CSV export or a SQL script if you need it.
Can I copy a project that has real-time subscriptions or row-level security?
Yes. The schema dump includes row-level security policies and function definitions. Real-time subscriptions are tied to your process code, not the database structure, so you'll need to update your app to point to the new project's URL and API key.
What if the schema dump fails to run?
Check the error message in red at the bottom of the SQL editor. Common issues are duplicate table names (if you already have tables in the new project) or missing extensions. Delete any conflicting lines and run again, or start with a completely fresh project.
How long does it take to copy a project?
The schema dump and import usually takes less than a minute. If you're also copying data with CSV or a script, it depends on how much data you have — anywhere from a few seconds to several minutes for large datasets.
Can I copy a project to a different region?
Yes. The schema dump works the same way regardless of region. Create a new project in your target region, then import the schema dump. Keep in mind that data in different regions may have slightly different latency depending on where your users are located.