Long-term archives
PITR covers the last 30 days. For anything older — or for compliance retention — take a manual archive. PerSQL dumps the schema + data and stores it in Cloudflare R2.
Archives live in the Backups tab on each database, alongside snapshots and PITR.
When to take one
Section titled “When to take one”- Manual — anyone with
managepermission can hit Archive now to take an out-of-band archive. - From CI — POST
/api/namespaces/:ns/databases/:db/archivesfrom a release pipeline if you want a durable copy at every cut.
There is no platform-managed daily sweep. If you need durable periodic backups, schedule a job (or your CI) to call the POST endpoint on the cadence you want.
Retention
Section titled “Retention”- Archives stay in R2 until you delete them (DELETE on the row).
- R2 storage is metered as part of your namespace’s per-GB usage.
- For longer retention, download the SQL to your own storage — the file is portable to any SQLite tool.
Restore
Section titled “Restore”We don’t (yet) one-click restore an archive in place. The path is:
- Click Download on the archive — you get a
.sqlfile. - Open the Data card on the database’s Overview tab.
- Click Import SQL and pick the file.
This is intentional: restoring an archive replaces the schema, so we want the user to actively pick the destination.
| Method | Path |
|---|---|
GET | /api/namespaces/:ns/databases/:db/archives |
POST | /api/namespaces/:ns/databases/:db/archives |
GET | /api/namespaces/:ns/databases/:db/archives/:id/download |
DELETE | /api/namespaces/:ns/databases/:db/archives/:id |
POST and DELETE are manage-only. Download requires read access.
Caveats
Section titled “Caveats”- The dump is not encrypted at rest (R2’s standard encryption applies). If you need customer-managed keys, dump locally and re-upload.