Duplicate Project #5930
Update: we announced Supabase Branching featuring multiple environments of your project so you can experiment with your database and change its data safely during Launch Week X.You can follow this GitHub Discussion for the latest: https://github.com/orgs/supabase/discussions/18937.If you still need an easy way to duplicate your project please drop a comment below describing your use case, what exactly you wish to clone from your existing database (e.g. only schemas, schemas and all data, etc.), and any Supabase products you will continue using after duplicating your project.Would be awesome to duplicate projects and also choose to copy just the database schemas/structure or also migrate all data. |
Replies: 29 comments 15 replies
|
You can duplicate a project using the instructions here: If you want to only duplicate the schema and not the data, you can use |
|
I tried https://supabase.com/docs/guides/database/migrating-between-projects but it is deleting everything :( I would like to duplicate my production project to a staging project (same data, same storage). Is it achievable ? |
|
I would like to create a staging environment as well but am worried by @paulin-crtn comment. Any guidance? |
|
would also like to see a "duplicate" project button in the supabase UI. Would most likely also drive sales. |
|
That would be an amazing feature |
|
this would be super helpful! |
|
To be able to easily create new environment, one for testing, one for development and one for production would be a dream |
|
Yeah this is so necessary. Coming from mysql where you can just import/export and you're done, this feels really cumbersome. |
|
Agree – this feels super-necessary (see e.g. Render for how it could be handled) |
|
Given the in the face alerts for RLS / I need this - don't want to spend a day recreating environment. UPDATE - wait a second - we have this UPDATE 2 - can you guys buy this snaplet product / company ?/ it should be out of the box. |
|
So tried snaplet, and it messed up all the foreign key relationships, practically any foreign table query is 500 error. Its really tedious to clone a project, how are we supposed to maintain a local and live environments in sync ?! (edited by @MildTomato to remove profanity) |
|
I'd also love a "Copy this Project" button. |
|
I think it would also be cool to have updates be able to be made to different projects (based on their version (say one project has a development, staging and production environment)), similar to how Github handles pull requests. Say I make some relationship / schema changes to a few tables in development or how the storage bucket RLS works, I would like to be able to merge all of those changes from development into the production database. Not sure how that would realistically work, just pie in the sky thinking ¯_(ツ)_/¯ |
|
Neither Snaplet nor |
|
Anyone know if a "Duplicate project" button/feature is in the pipeline for a future release? I would instantly and gladly pay for this feature. |
|
I'd like this feature as well! |
|
+1 |
|
Support for prod and dev environments would be awesome. |
|
need. for now: after few copy paste, worked great and then setup hooks and triggers manually https://supabase.com/docs/guides/platform/migrating-and-upgrading-projects |
|
plz |
|
Also adding to this. I find it unbelievable the amount of time saved by Supabase, but then wasted b/c the most common practice (dev/prod/staging envs) is not supported. Cmon...Im not a paying user but I would happily pay for this. |
Update from the Supabase team — We are looking into this. We realize this feature request has been here for a while and it has gathered a lot of votes. Due the complexity of amount of services, each with their own config, data, deployments, we can't offer in the immediate short term a service to duplicate everything in a Supabase project just yet. so we'll think of this as a medium to long term goal. However, that shouldn't stop us making at least some progress that can satisfy some use cases. So we can start with duplicating the database schema, and we'll aim to roll that out fairly quickly as an easy action you can take in the Dashboard (and probably CLI). Although we can't promise any timeframes, Database data duplication is probably something we'll consider next, and then we'll start tackling the issues with Storage duplication, Function deployments and so on. |
|
Its ok now.
…On Sun, Oct 15, 2023 at 9:39 AM Jonathan Summers-Muir < ***@***.***> wrote:
Would be awesome to duplicate projects and also choose to copy just the
database schemas/structure or also migrate all data.
Update from the Supabase team — We are looking into this. We realize this
feature request has been here for a while and it has gathered a lot of
votes.
Due the complexity of amount of services, each with their own config,
data, deployments, we can't offer in the immediate short term a service to
duplicate *everything* in a Supabase project just yet. so we'll think of
this as a medium to long term goal.
However, that shouldn't stop us making at least some progress that can
satisfy some use cases. So we can start with duplicating the database
schema, and we'll aim to roll that out fairly quickly as an easy action you
can take in the Dashboard (and probably CLI).
Although we can't promise any timeframes, Database data duplication is
probably something we'll consider next, and then we'll start tackling the
issues with Storage duplication, Function deployments and so on.
—
Reply to this email directly, view it on GitHub
<#5930 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACUR4PL4VJI54AJZGIPCQLX7OHMPAVCNFSM5QZQVD3KU5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TOMRYGM4DSMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
regards
marc logemann
https://www.linkedin.com/in/logemann/
|
|
I think Supabase's upcoming Branching feature will help to address this. |
|
I am also looking for a similar implementation where I can copy my whole database (minus the data) from dev env to prod env. Both environments are on different user accounts as well. I would really appreciate any help. |
|
same here, commenting for support 😅 |
|
What I want is a duplicate of schema on something like dev and prod, where schema changes can be safely pushed from dev to prod. Only data will differ. |
|
for me I used two methods: method 1:1- you can install postgres . Note: this method will duplicate everything , except the storage method 2:1- use this documentation here. Note: this method will duplicate everything! |


The migration method is here now: https://supabase.com/docs/guides/platform/migrating-within-supabase
I think it is different than before, and have not tried this method.