-
I've been wondering about how to duplicate a supabase project. In this particular case, I've developed my app around a supabase backend, and I'd like to keep this one for development, and have a clone (minus some of the crappy test data) to back my live site. What I've done:
The ERROR: schema "auth" already exists
ERROR: schema "extensions" already exists
ERROR: function "role" already exists with same argument types
ERROR: function "uid" already exists with same argument types
ERROR: function "notify_api_restart" already exists with same argument types
ERROR: relation "audit_log_entries" already exists
ERROR: relation "instances" already exists
ERROR: relation "refresh_tokens" already exists
ERROR: relation "refresh_tokens_id_seq" already exists
ERROR: relation "schema_migrations" already exists
ERROR: relation "users" already exists
ERROR: duplicate key value violates unique constraint "schema_migrations_pkey"
DETAIL: Key (version)=(999999999999) already exists. -- I changed the numbers here
CONTEXT: COPY schema_migrations, line 1
ERROR: multiple primary keys for table "audit_log_entries" are not allowed
ERROR: multiple primary keys for table "instances" are not allowed
ERROR: multiple primary keys for table "refresh_tokens" are not allowed
ERROR: multiple primary keys for table "schema_migrations" are not allowed
ERROR: relation "users_email_key" already exists
ERROR: multiple primary keys for table "users" are not allowed
ERROR: relation "audit_logs_instance_id_idx" already exists
ERROR: relation "refresh_tokens_instance_id_idx" already exists
ERROR: relation "refresh_tokens_instance_id_user_id_idx" already exists
ERROR: relation "refresh_tokens_token_idx" already exists
ERROR: relation "users_instance_id_email_idx" already exists
ERROR: relation "users_instance_id_idx" already exists
ERROR: publication "supabase_realtime" already exists
ERROR: event trigger "api_restart" already exists I understand that the starting point of a supabase project is not an empty postgres db, what I don't know is whether I can do the above and expect to be happy, or if I'm going to run into a bunch of weird problems that will be hard to trace back to this. In other words, can I ignore the above errors? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think it's erroring out because the file created by Try running |
Beta Was this translation helpful? Give feedback.
I think it's erroring out because the file created by
pg_dump
includes theauth
schema.Try running
pg_dump
for just thepublic
schema, iepg_dump --schema=public -h db.devsitename.supabase.io -U postgres > db_dump.sql