You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Turso / libSQL | Use the platform's backup feature; export to SQLite locally for cold copy |
33
33
| MongoDB | Replica-set snapshots; oplog for PITR |
34
-
| SQLite (single-node evaluation only) |File-level snapshot when the runtime is idle; **not** production-grade|
34
+
| SQLite (single-node / desktop) |WAL mode + hot snapshots via `VACUUM INTO` or the Online Backup API; optionally Litestream for continuous replication — see [SQLite deployments](#sqlite-deployments) below|
35
35
36
36
Whatever the driver, validate that:
37
37
@@ -40,6 +40,68 @@ Whatever the driver, validate that:
40
40
traffic;
41
41
- restore tests are exercised end-to-end at least once a quarter.
42
42
43
+
## SQLite deployments
44
+
45
+
SQLite is the default driver and is a legitimate production choice for
46
+
**single-node** ObjectOS — desktop apps, internal tools for a small
47
+
team, edge / on-prem appliances, evaluation environments. The trade-off
48
+
is structural: SQLite is single-writer, so it does not fit multi-node
49
+
ObjectOS, high concurrent write throughput, or shared-database
50
+
deployments. For those, use PostgreSQL.
51
+
52
+
When you do run SQLite in production, the configuration that makes it
53
+
safe and the backup recipe go together:
54
+
55
+
**Runtime configuration**
56
+
57
+
- Enable WAL: `PRAGMA journal_mode=WAL` (readers don't block the
58
+
writer; crash-safe).
59
+
-`PRAGMA synchronous=NORMAL` is the usual desktop/single-node default
60
+
— safe with WAL, much faster than `FULL`.
61
+
- Keep the database file on **local disk**. Do **not** put it on NFS,
62
+
SMB, or inside a folder synced by Dropbox / OneDrive / iCloud while
63
+
the runtime is running — SQLite's locking is unreliable on those and
64
+
this is the most common way SQLite deployments corrupt.
65
+
66
+
**Hot snapshot (no downtime)**
67
+
68
+
The runtime keeps serving traffic while you take a snapshot using
69
+
SQLite's Online Backup API or `VACUUM INTO`:
70
+
71
+
```sql
72
+
VACUUM INTO '/var/backups/objectos/db-2026-05-27T13-00Z.sqlite';
73
+
```
74
+
75
+
Schedule it (cron, systemd timer, or the in-process scheduler) at a
76
+
cadence matching your RPO. Tag each snapshot with the artifact version
77
+
that produced it so you can roll database + artifact back together
78
+
(see [Artifact versioning](#artifact-versioning) below).
79
+
80
+
**Offsite copy**
81
+
82
+
A local snapshot doesn't survive disk loss. Push each snapshot to
83
+
durable storage:
84
+
85
+
- Server / VM: push to S3 or any S3-compatible bucket (you likely
86
+
already have one configured for the `storage` capability).
87
+
- Desktop app: write the snapshot to a user-controlled sync folder
88
+
(OneDrive / iCloud / Google Drive) — acceptable here because the
89
+
snapshot file is **closed and immutable**, unlike the live database.
90
+
91
+
**Continuous replication (lower RPO)**
92
+
93
+
For sub-minute RPO without giving up SQLite, run
94
+
[Litestream](https://litestream.io) alongside the ObjectOS process. It
95
+
streams the WAL to S3-compatible storage and supports point-in-time
96
+
restore. This is the recommended path when a single-node SQLite
97
+
deployment needs near-zero data loss.
98
+
99
+
**Restore**
100
+
101
+
Stop the runtime, replace the database file with the chosen snapshot
102
+
(or run `litestream restore`), start the runtime against the same
103
+
artifact version that produced the snapshot.
104
+
43
105
## Artifact versioning
44
106
45
107
Treat published artifacts as immutable. Tag each artifact with the
@@ -61,6 +123,7 @@ A workable starting target for customer deployments:
61
123
| Class | RPO | RTO | Notes |
62
124
|---|---|---|---|
63
125
| Evaluation / demo | best-effort | best-effort | SQLite snapshot is fine |
0 commit comments