Upgrades and data safety
Basics · Upgrades and data safetyUpgrades and data safety
Updating Extrovert must never lose messages. This page states the guarantee, how it is enforced, and how to verify it.
The guarantee
- No upgrade deletes message rows.
messages,room_messages, posts and comments survive every version. - Superseded tables are archived, not dropped. Legacy tables are renamed
(
legacy_<name>_pre_mls,prototype_<name>_pre_rfc9420) so their rows stay recoverable. - Encrypted payloads are untouched. Ciphertext, sender self-copies, and MLS group state are copied verbatim; no migration rewrites them.
- Client E2EE state is never deleted on a decode failure. If an engine upgrade changes the state encoding, the original blob is preserved and a quarantined copy is written.
- Notifications prune only notifications. Read ones after 30 days, any after 90 days. Audit logs prune at 90 days. Messages are never pruned.
- Drive files are never deleted automatically. Startup orphan pruning is
opt-in (
EXTV_PRUNE_ORPHAN_FILES=1), because a failed backfill during an upgrade would otherwise make valid attachments look orphaned.
How to update safely
Docker
Your data lives in the volumes, so replacing the image is enough:
docker compose pull && docker compose up -d
Both /app/data and /app/uploads are declared as volumes in the image and in
docker-compose.yml. Do not switch to bind mounts or add --volumes to a
docker compose down, which would remove the named volumes.
Bare install / Proxmox
proxmox/extrovert-update.sh takes a snapshot of data/ and uploads/ before
updating. Run it instead of a plain git pull:
extrovert-update # snapshot, then update
extrovert-update --backup # snapshot only
extrovert-update --list-backups
Rollback
Migrations are additive and idempotent: they set app_meta markers and rename
tables. Rolling back to a previous version leaves the archived tables in place
and does not touch messages. Restore the snapshot if a rollback needs the old
schema shape.
Verification
npm run test:update-safety builds a database shaped like an older install
(legacy ciphertext messages, room messages, an MLS backup, prototype MLS tables,
Olm tables), clears the migration markers, boots the current code, and asserts:
- every message and room message row is still present, byte-for-byte;
- the MLS backup blob and salt are unchanged;
- legacy and prototype tables exist as
legacy_*/prototype_*archives; - both migration markers are set, and a second boot changes nothing.
The client-side counterpart is covered by scripts/mls-client-regression-test.js
("stale server group … state quarantined (never deleted)").
If you need to reclaim space
Archived tables are inert. Drop them deliberately once you are sure you do not need them:
-- inspect first
SELECT name FROM sqlite_master WHERE name LIKE 'legacy_%' OR name LIKE 'prototype_%';
-- then, per table you no longer need
DROP TABLE legacy_olm_identity_pre_mls;
Never drop messages, room_messages, mls_groups, or the backup tables.