What copying a Supabase project actually does

Copying a Supabase project creates a separate, independent clone with its own database, authentication settings, and API keys. The copy is not linked to the original — changes you make in one project do not affect the other. This is useful when you want to test changes without touching your live project, move a project to a different team or account, or create a template you can reuse.

Supabase does not have a built-in "duplicate project" button. Instead, you export your project's structure and data, then import it into a new project. The process takes about 10 to 15 minutes and requires access to both your source project and the destination account or workspace.

Key Takeaways

  • Supabase projects are copied by exporting the database schema and data from the original, then importing into a new project.
  • You need to create a new empty Supabase project first before you can import anything into it.
  • The export includes your tables, columns, and data, but not your API keys or authentication secrets — those are generated fresh in the new project.
  • After import, you must update any code or applications that reference the old project's API URL and keys to use the new project's credentials.

Create a new empty project in your destination account

Log into the Supabase dashboard and navigate to the organization or workspace where you want the copied project to live. Click New Project and fill in the project name, database password, and region. Use the same region as your original project if you want consistent performance. Wait for the new project to finish initializing — this usually takes two to three minutes.

Once the new project is ready, you will see the project dashboard. Do not add any tables or data yet. Leave it empty; you will populate it by importing from your original project.

Export your original project's database

Open your original Supabase project and go to the SQL Editor section in the left sidebar. Click New Query and paste this command into the editor:

pg_dump -h db.XXXXXXXXXXXX.supabase.co -U postgres -d postgres --schema public > backup.sql

Replace XXXXXXXXXXXX with your original project's database ID. You can find this in your project settings under Database — it is the long string in your database URL. When you run this command, you will be prompted for your database password. Enter the password you set when you created the original project.

This creates a file called backup.sql that contains all your tables, columns, indexes, and data. Save this file somewhere you can find it — your Downloads folder is fine.

Import the backup into your new project

Open your new empty project and go to the SQL Editor. Click New Query and open the backup.sql file you just created. Copy all the contents and paste them into the SQL editor window. Click Run to execute the import.

Supabase will create all your tables, columns, and relationships in the new project and populate them with your data. This usually takes a few seconds to a minute depending on how much data you have. When it finishes, you will see a success message.

Go to the Table Editor in your new project and verify that all your tables are there and contain the correct data. Check a few rows to make sure nothing was lost in the copy.

Update your API keys and project references

Your new project has different API keys and a different project URL than your original. Any code, application, or service that connects to your Supabase project needs to use the new credentials.

In your new project dashboard, go to Settings and then API. Copy your new Project URL and anon key. Find every place in your code where the old project's URL or keys appear and replace them with the new ones. This includes environment variables, configuration files, and hardcoded strings.

If you are using authentication, you will also need to reconfigure any external services that use your Supabase project — for example, third-party login providers or webhook endpoints. They will need to know about your new project's URL.

Handle authentication and permissions separately

The database export includes your user table structure but not your actual user accounts or authentication secrets. If you need to copy user accounts from your original project, you must export them separately as a CSV file and import them into the new project's authentication system.

Row-level security policies (RLS) are included in the export, so your table permissions will carry over. However, test them in your new project to make sure they work as expected — sometimes the context changes slightly when you move between projects.

If you are using Supabase Auth with external providers like Google or GitHub, you will need to create new OAuth applications for your new project and update those credentials in your Supabase settings.

Delete your original project if you no longer need it

If the copy was meant to replace the original, you can delete the old project to avoid paying for two projects. Go to your original project's Settings, scroll to the bottom, and click Delete Project. Supabase will ask you to confirm and may require you to type the project name. Once deleted, the project and all its data are gone permanently.

If you are keeping both projects, make sure you understand which one is which. Label them clearly in your dashboard — for example, "production" and "staging" — so you do not accidentally push changes to the wrong one.

Frequently Asked Questions

Can I copy a project to a different Supabase organization?

Yes. Create a new project in the destination organization, then follow the export and import steps. The process is the same whether the new project is in your current organization or a different one.

What happens to my authentication users when I copy a project?

User accounts are not included in the database export. You need to export your users separately from the Authentication section of your original project, then import them into the new project's auth system. Passwords are not exported for security reasons.

Do I need to copy my storage buckets?

No. Storage buckets are separate from the database and are not included in the SQL export. You must copy files manually or use the Supabase CLI to sync buckets between projects if you need them in the new project.

Can I schedule automatic backups instead of doing this manually?

Supabase does not offer automatic project duplication, but you can set up scheduled database backups through the Backups section in your project settings. Backups are stored separately and can be restored to the same project, but they do not create a new project.

What if the import fails partway through?

Stop the import immediately and check the error message. Common causes are naming conflicts, missing extensions, or permission issues. Delete the partially imported tables from your new project and try again. If the error persists, check that your database password is correct and that you have the right project ID in your export command.