Upgrading & Migration
This page records the compatibility facts the code actually guarantees. Anything not verified by a test or an explicit version check is marked untested — verify before relying rather than claimed as a guarantee. Source: the repo's upgrading guide.
Always back up first. Take and
relata verify-backup <path>a full snapshot before touching any node. Restore forward (old → new), not backward — backward format/version compatibility is untested.
Upgrading to 2.0.0
2.0.0 is a major release with breaking changes (semver-mandated by the Zero-Trust / licensing / tenancy work). Review before upgrading from 1.x:
- Multi-tenant gating.
RELATA_TENANCY_MODE=multinow FATALs onfreeandserver(both fixed atmax_tenants=1). Multi-tenant mode is cluster-only and requires an effectivemax_tenants > 1(license value, or theRELATA_MAX_TENANTSoverride). If you ranmultionfree/serverin 1.x, move toclusterwith a multi-tenant license or stay onsingle. See Deployment. - Licensing model v3. The binary
"unlimited-storage"capability is gone. Licenses carry two numeric parameters on the signedNodeConfig—storage_max_gbandmax_tenants(0= unlimited). Re-issue licenses with the v3 tool; old.licfiles without these fields are rejected. See Licensing & Tiers. - Zero-Trust admin surface.
/admin/*and/platform/*moved to a separate loopbound listener (RELATA_ADMIN_BIND, default127.0.0.1:9091); they are no longer served onRELATA_HTTP_BIND. SetRELATA_ADMIN_TOKENand reach the surface via port-forward / sidecar. - Auth posture uniform. No more implicit
free-profile dev bypass — setRELATA_OPEN_DEV_ALLOWED=trueexplicitly for unauthenticated local dev, on every profile. - Go SDK →
github.com/relatadb/sdk-go/v2. The major-version import-path suffix is mandatory; update your imports. See SDKs. - Version lockstep. Server and all SDKs/tray/Grafana/Helm now ship one version, enforced by the repo's
check_versions.py.
Validate on a staging copy of your data first; back up before upgrading.
On-disk / artefact format compatibility
Manifest (object-store layout)
relata-storage::manifest::ManifestVersion is the source of truth for the commit-manifest layout. Two variants exist: V1Single (legacy single file) and V2Sharded (sharded layout) — new writes always emit V2Sharded. Readers detect the version from the index object. There is no in-place V1→V2 rewriter; the migration story for an existing V1 store is untested — verify before relying (prefer a fresh V2 store seeded from a restore over an in-place flip).
Backup snapshot format
relata-storage::backup::BackupPayload is a self-describing JSON artefact (full-<ts>.json / incr-<ts>.json) with schema_version: u32 (currently 1). Cross-tenant restores are enforced (assert_agency aborts a payload/organisation mismatch). Tenant-scoped restore (POST /admin/restore {"tenant": "..."}) is rejected outright (501) — the store-swap is an unconditional whole-store replacement, so a tenant-scoped request would silently wipe every other tenant. Restore only without a tenant field until a true per-tenant merge ships.
Restoring a backup taken by a newer build into an older binary is untested — verify before relying. Always run relata verify-backup <path> before depending on a snapshot.
Ontology version monotonicity
relata-ontology::OntologyVersion(u64) is a monotonically-increasing counter, bumped on every type addition/modification and stored in the commit manifest. The version only ever moves forward within a branch; it never rewrites history. Downgrading the binary does not roll the ontology version back — an older binary reading a higher ontology version is untested — verify before relying.
Rolling-upgrade ordering (recommendation)
This ordering is a recommendation, not an enforced/tested invariant:
- Back up first — take and
verify-backupa full snapshot before touching any node. - Validate config — the CLI fails fast (exit
78,EX_CONFIG) on an invalidRELATA_*enum/numeric value. Apply config changes to one node and confirm it starts clean before rolling out. - Upgrade followers before the coordinator/writer — in a cluster, roll reader/follower nodes first so the write path stays on the known-good version longest; promote the coordinator/writer last.
clusterprofile only — drain the node before stopping it. Runrelata cluster drain <node-id> --waitand confirmsafe_to_stop: truebefore deleting/restarting a writer's pod. Otherwise the passive heartbeat-timeout rebalancer (RELATA_CLUSTER_DEAD_AFTER_SECS, default 90 s) may evict and re-move partitions during a slow restart — real, avoidable data movement.- One pod at a time — the operator's StatefulSet uses
RollingUpdate(default one pod at a time, orspec.upgrade.maxUnavailable). Wait forGET /health/ready200 and (cluster) forrelata_replication_lag_secondsto settle before continuing. - Roll back by restoring, not by downgrading in place — backward format/version compatibility is untested.
Config migration
relata config --migrate # migrate relata.toml / env vars across versionsThe CLI now fails fast on invalid RELATA_* enum/numeric values and logs the offending variable, so config drift surfaces at startup rather than at runtime.
Data migration
| Path | When | Docs |
|---|---|---|
relata import --from postgres|csv | Migrate an existing database into Relata | Connectors & Extensions · Ingestion |
relata config --migrate | Migrate config across versions | above |
| Embedding-model migration | Change the sidecar model / vector dimension | LLM & Embedding configuration |
| Backup → restore | Whole-store migration / disaster recovery | Backup & Restore |
For Neo4j / MongoDB / ClickHouse, relata import --from <source> is an honest stub today — each prints the documented CSV/NDJSON export workaround and exits non-zero.
v1.4.2 → v1.5.0 (reference)
A backward-compatible upgrade. /query responses added processing_time_ms alongside elapsed_ms (the latter retained for one release, removed in v1.6.0). QueryError exposed stable REL_* codes; the RFC 7807 type URI changed from about:blank to https://relatadb.dev/errors/{code}. 429 responses added X-RateLimit-* headers. Admission control moved to a real cost estimate (row count × join multiplier). Rolling: upgrade reader/indexer nodes first, writers last; all in-flight writes are safe (formats compatible).
See also
- Deployment — the three profiles and profile-specific gates
- Backup & Restore — snapshots,
verify-backup, restore semantics - Connectors & Extensions —
relata import --frommigration connectors - Licensing & Tiers — the two-parameter licensing model
- Cluster Setup — graceful-restart / drain procedure