Convert SQLite to libSQL
Copy SQLite tables into libSQL for its remote HTTPS interface. This is a SQL-compatible conversion, not a drop-in client swap: replace the Postgres-wire client with the libSQL client.
Choose a source databaseHow it works
01
Review the pre-check
Open your source database in Layerbase Cloud and choose Convert. Read the compatibility notes before creating the target.
02
Create a new target
Choose a name for the new database. Your plan must include the target engine.
03
Copy the database
Layerbase copies into the new target. The source stays in place while you check the result.
04
Verify and cut over
Read the verification report and test your application against the target. Stop source writes for the final copy, then switch your connection when you are satisfied.
What is verified before cutover
- Source and target row counts are compared for the tables listed in the report. The report states how many tables were checked and whether any counts differ.
- If verification is unavailable, the report says so. Row counts do not prove that every value or database object is identical; test your queries before cutover.
What does not carry over unchanged
- Layerbase SQLite uses the Postgres wire protocol; libSQL uses Hrana over HTTPS with an auth token. Update your client library.
- Full-text search table definitions are recreated, but their index content must be rebuilt.
- Generated columns are recomputed. Views and triggers that depend on unsupported functions may be reported as warnings instead of recreated.
FAQ
Conversion questions
Does conversion delete my source?
No. Conversion creates a separate target. Review it before choosing whether to decommission the source.
Can I keep writing during cutover?
Writes made after the copy are not continuously replicated. Plan a write freeze for the final copy and check the target before switching your application.
Can I convert libSQL back to SQLite?
No. Only SQLite to libSQL is supported.