S
Supabase8mo ago
loup

How completely migrate from one supabase project to another (self hosted)

Okay I try but without success to completely move my supabase instance to another server. For now Ive just try to migrate roles and schema (data is gonna be after that). So I have my 2 files .sql but when I try to push them in the new database I have all kind of error saying for example :
psql \ ─╯
--single-transaction \
--variable ON_ERROR_STOP=1 \
--file roles.sql \
--dbname "postgres://admin:password@myhost:port/db"

SET
SET
SET
psql:roles.sql:7: ERROR: role "supabase_realtime_admin" already exists
psql \ ─╯
--single-transaction \
--variable ON_ERROR_STOP=1 \
--file roles.sql \
--dbname "postgres://admin:password@myhost:port/db"

SET
SET
SET
psql:roles.sql:7: ERROR: role "supabase_realtime_admin" already exists
But is doing the same thing for table in schema.sql that doesnt exist in the new one so Im completely lost... Thx for helping !
1 Reply
loup
loupOP8mo ago
Ive success adding all schema.sql directly from the sql editor in the supabase studio (of the new supabase isntance) but now I have the same problem with data dump saying data already exist (the table is empty)...

Did you find this page helpful?