Export & import
PerSQL produces and accepts standard SQLite SQL dumps — the same shape
as sqlite3 database.db .dump. Move data in, out, or sideways without
lock-in.
Export
Section titled “Export”In the console: Database → Overview → Data → Export SQL. The
download is a single .sql file containing schema + data, wrapped in
a transaction.
CLI:
persql db export acme/orders --out orders.sql# or pipe to stdout:persql db export acme/orders | gzip > orders.sql.gzREST:
curl -L --cookie-jar cookies.txt \ https://api.persql.com/api/namespaces/acme/databases/orders/export \ -o orders.sqlThe response is application/sql with a Content-Disposition
attachment so browsers download directly.
Anyone with read access to the database can export.
Import
Section titled “Import”In the console: Database → Overview → Data → Import SQL. Pick a
.sql file (50 MB cap). Imports run inside one DO transaction —
partial failures roll back.
CLI:
persql db import acme/orders ./orders.sqlREST:
curl --cookie cookies.txt \ -F "file=@orders.sql" \ https://api.persql.com/api/namespaces/acme/databases/orders/importImports are manage-only (namespace owner / admin) — they may overwrite existing tables.
The importer is forgiving about transaction-control directives; the following are skipped automatically because the DO already wraps the whole import in a transaction:
BEGIN TRANSACTION/BEGIN/COMMIT/ENDPRAGMA foreign_keys = …
Compatibility
Section titled “Compatibility”- Output is compatible with
sqlite3shell (you cansqlite3 new.db < orders.sql). - Input accepts anything
sqlite3 .dumpproduces. BLOBcolumns survive both directions (encoded asX'…hex…').