Back up the database of a Lovable app
Make a backup of your Lovable app before you change anything: before you move the backend, change the .env file or point the app at another project. Once the project is connected to GitHub, the code is already there. The database is the part you copy yourself. How you do it depends on where the backend runs.
What a full Lovable app backup includes
- Code: in your GitHub repository once the project is connected. See Export a Lovable project to GitHub.
- Database: this guide.
- Uploaded files: they are not in the repository. See Move Lovable storage files to your own Supabase project.
- Secrets and keys: they stay in Lovable and are not in the repository, so write them down.
Lovable Cloud: export the data
In Lovable open More, Cloud, Overview, Advanced settings and click Export data. Click Export in the Database card, then Start export. Lovable emails you a download link, and the file also shows up under More, Cloud, Storage. It is a PostgreSQL backup archive, not a SQL file.

- You can make one export a day.
- The export file can be up to 5 GB.
- The database must be under 15 GB.
- Limits checked on 14 October 2026.
Your own Supabase project: one prompt
Paste this into Claude Code, Codex or Cursor in the project folder:
Make a backup of the database of the Supabase project this app uses, with supabase db dump: one file with the schema and one with the data (--data-only). Save them in a backups folder in this project and add that folder to .gitignore. Ask me for anything you need. Do not change the database.
Without --data-only, supabase db dump saves only the schema, not your rows. The CLI runs the dump in Docker, so install Docker and start it first. The CLI also asks for the database password. If you made your own database roles, ask for a third file with --role-only.

Open the backups folder in the project. You should see two .sql files. Open the data file: you should see the rows of your tables in it.
Keep it out of GitHub
A database copy holds the data of your users. It must never land in the repository. The prompt adds the backups folder to .gitignore for that reason.
How long to keep it
Keep it until the new setup has run for a while.