Own your data: schema, then rows, then files.
Create your own Supabase project first, on any plan. Then rebuild the structure
from the migrations Lovable already pushed to your GitHub repo. With the Supabase
CLI, linking and pushing recreates every table, RLS policy, function, and trigger
in your new project:
supabase link --project-ref YOUR_NEW_PROJECT_REF
supabase db push
That gives you an empty copy of the correct schema. Now the rows. Once you have a
direct Postgres connection string to the Lovable-managed database, a data-only
dump and restore moves the content without touching the structure you just
pushed:
supabase db dump --db-url "$LOVABLE_DB_URL" -f data.sql --use-copy --data-only
psql \
--single-transaction \
--variable ON_ERROR_STOP=1 \
--command 'SET session_replication_role = replica' \
--file data.sql \
--dbname "$YOUR_DB_URL"
The session_replication_role = replica line tells Postgres to hold
off on foreign-key checks and triggers while the copy loads, so the data lands in
any order without tripping over itself. If you would rather restore schema and data
together into a truly empty project, the full three-pass dump sequence is in our
backups guide.
If you do not have a direct connection string, you no longer need one to get the
rows out. Lovable ships an official export: in your project, go to the Cloud tab,
then Overview, then Advanced settings, and under Export project data start a
database export. Lovable emails you a temporary download link when it is ready.
The export covers the full database, structure and data together, is limited to
5 GB, and you can request one every 24 hours. For a quick partial move you can
also export individual tables as CSV from the Database tab. Whichever route you
take, the shape of what you are moving is exactly what is above.
One thing no database dump carries: your Storage files. A dump copies the metadata
rows that describe each object, not the objects themselves. Download the files from
the source buckets and upload them into the matching buckets on your project as a
separate step, and check that your bucket names and public/private settings match
before you point the app at them.