What Lovable’s version rollback restores, and what it leaves behind
Revert in Lovable puts the code back and redeploys edge functions. It does not roll the database back. Database backups are a separate, daily control.
Updated 2026-10-14. Written from the vendor docs linked at the end. Not a guarantee that a restore will work.
Version history is a history of the code
Lovable saves a version for every change. There is no separate save button for the agent’s work. Open Show history at the top of the editor, preview an earlier version, then Revert to this version. Lovable asks you to confirm, and it shows the date you are returning to. The chat is not wiped. Later edits stay in the project chat, and Lovable says you can reapply them.
The version history page is specific about the limit. Revert restores the project’s code, and it redeploys edge functions so they match that version. It does not restore or roll back database data. If a later message added records, changed data, or ran migrations against that data, those data changes remain.
You can bookmark a stable version so it is easier to find. A manual edit in the code editor is also a version: Lovable says each save becomes one, and you revert it the same way. Lovable does not review those manual edits before they apply.
What a revert will not put back
- Rows in the database. Lovable’s own answer is that reverting only restores code, and the data stays as it is. Revert also cannot undo a bad data change that happened after that version.
- The effect of a migration on data. The migration file may return with the code, but the data change it already applied does not reverse.
- A very old version, beyond the point where the revert control says it cannot go back. You can still preview it.
- Versions from before a remix, when the source project used Lovable Cloud. Lovable says those cannot be restored.
- The published site, unless you publish again. Git sync updates the editor preview when you push, and Lovable says a push never publishes the live site.
Database backups are a different button
For the data, Lovable documents a separate control. Open More, then Cloud, then Database, then Backups. Lovable takes a daily backup and says it retains up to roughly 14 days. Each row is a timestamp in UTC. Restore to this backup rolls the database back, schema and data, and Lovable says the database is unavailable for a few minutes while that runs.
Read the confirmation. Lovable says the restore is permanent. Anything created or changed after that backup is lost. Because the schema reverts too, the app can stop matching the database. When it finishes, Lovable tells you to ask in the project chat to test the app and patch schema mismatches. There is no restore to a minute between two daily snapshots.
That backup is Lovable’s, inside the project. It is not a file on your disk, and it is not the Git repository. The repository holds code, including migration files, and Lovable says it never holds the data inside the database. Lovable also does not run migration files you add through Git.
Keep a copy that revert does not have to save
Use the database backup when you need the data back, and use version history when you need the code back. Neither one is a copy you hold outside Lovable. Export the database before a risky change, and keep Git sync on if you want the code in a repository you can clone. The recovery guide covers what happens if the project or the repository is deleted.
If the code is in a public GitHub repository, the free scan will tell you whether that repo shows a backup workflow, a lockfile, and env files committed by mistake. It will not tell you whether Lovable’s daily database backup exists. Check More → Cloud → Database → Backups yourself.
Questions
Does Revert restore the database?
No. Lovable’s version history says revert restores the project’s code only, and redeploys edge functions to match. Database data stays as it is. A later message that inserted rows, edited rows, or ran a migration against data is not undone by reverting the code.
How far back can a Lovable database backup go?
Lovable’s database documentation says it takes one backup a day and keeps up to roughly 14 days. You restore to one of those daily snapshots, not to an arbitrary minute between them. Restoring is permanent: data written after that snapshot is lost, and the schema is reverted too.
Can every old code version be restored?
You can open and preview older versions. Lovable says a very old version can show “Cannot revert this far back in history”. Versions from before a remix of a Cloud project cannot be restored either. If you are already on that version, there is nothing to revert.
Sources
Related
Vendor limits quoted above are from those docs, not measurements by LastGood.