Skip to content

How to Export Your Lovable Project: Code, Data and Files

Last updated: By The Migrator Team

When people search how to export from Lovable, they usually mean one of four different things: the app's code, the database, the users, or the uploaded files. You can export your Lovable project completely, but each part comes from a different place, which is why it feels confusing at first.

This guide gives you one checklist for all four, explains where each export lives, and shows how to turn the pile of files into a working backup. Everything here is read-only: exporting never changes your live app. When you are ready to move, the free migration tool takes these exports and loads them into your own Supabase project.

The four parts of a Lovable export

Code is the only part that is not data, which is why GitHub is the first stop.

  • Code: your front-end app and the supabase folder (schema migrations and edge functions). Exported through GitHub.
  • Database data: the rows in each table. Exported as CSV files.
  • Auth users: ids, emails and password hashes. Exported with a SQL query.
  • Storage files: images, documents and other uploads. Downloaded from each bucket.

Step by step: export your Lovable project code

  1. 1Connect the project to GitHub

    In your Lovable project, open the GitHub connection and create a repository. The full walkthrough is in how to sync your Lovable project to GitHub.

    Lovable project settings showing how to export your Lovable project code to GitHub
    Lovable project settings showing how to export your Lovable project code to GitHub
  2. 2Download or clone it

    On github.com choose Code → Download ZIP, or clone with git. You now own a full copy of your app's source code.

    Terminal: clone your exported project
    git clone https://github.com/YOUR_USER/YOUR_REPO.git
    cd YOUR_REPO
    npm install
    npm run build

Export your database and users

Your schema is already in the code, in supabase/migrations. The rows are not, so export each table as CSV from the database view in Lovable's Cloud area. Name each file after its table. The detailed steps, plus a SQL fallback when there is no migrations folder, are in how to export your Lovable Cloud database.

Auth users come from a query on auth.users, covered in Migrate Lovable Cloud users to Supabase. Treat that CSV as sensitive because it includes password hashes.

Export your storage files

Download the files of every bucket and keep the folder structure and the bucket names, because database columns often store file paths. See how to move your storage files for the restore side.

Make it a real backup

The Lovable documentation and the Supabase backup docs describe the platform-side options.

  • Put the four exports in one dated folder, for example lovable-backup-2026-10-10.
  • Record the row count of every table so you can verify a restore.
  • Store one copy offline or in a second cloud location, and keep the users CSV encrypted.
  • Test the backup by restoring it into a throwaway Supabase project, not on the day you need it.
  • Repeat before any big change and on a regular schedule if your data changes daily.

What to do with your export

An export gives you freedom. You can keep it as insurance, migrate to your own Supabase project, or self-host the whole app on infrastructure you control.

Frequently asked questions

How do I export my code from Lovable?

Connect the project to GitHub, then download the repository as a ZIP or clone it. That gives you the complete source code, including the supabase folder.

Can I export my Lovable database?

Yes. Export each table as CSV, take the schema from supabase/migrations in GitHub and export users with a SQL query. A migration tool can then load everything into Supabase.

Does exporting affect my live app?

No. Every export step is read-only and does not interrupt your users.

Is there a one-click full export?

Exports are split by type: code through GitHub, data as CSV, users via SQL and files by download. This guide combines them into one checklist.

Can I back up my Lovable project automatically?

GitHub keeps your code history automatically. For data, schedule regular exports, or move to your own Supabase project where backup options are built into the dashboard.