7x Exponential Network Learn Database engines
← How upgrades work

Database engines

Every engine gets a verified backup first and an automatic rollback when a step fails.

Proven on all five engines. MySQL/MariaDB, PostgreSQL and SQLite: 6.0.13 to 6.0.14 and 6.0.14 to 6.0.15, by file patch and by git, with exact rollbacks. Oracle: an install 20 commits behind main upgraded to main (64 files, 5 kernel steps, health check passed), then rolled back: all 264 tables and every file outside var/ equal to before. MongoDB: the same run (64 files, 3 steps), then rolled back: all 155 collections and the files equal to before.
Known gap: when the kernel reports its libraries stage as pending, xne does not run that stage yet. It stops and rolls back safely, so the install stays as it was.

Last verified: 2026-11-24 (xne 0.3.0.1)

Proven on every engine. MySQL/MariaDB, PostgreSQL and SQLite: 6.0.13 -> 6.0.14 and 6.0.14 -> 6.0.15 by file patch and by git, with exact rollbacks (the integration suite). MongoDB and Oracle (2026-11-24): an exact backup and restore (the integration tests), and a full upgrade of a kickstarted install (kernel main~20 to main: 64 files written, the kernel's exp:upgrade applied 3 steps on MongoDB and 5 on Oracle, health check passed), then xne rollback: every file outside var/ and every collection (155) or table (264) equal to before. The Oracle run found and fixed two faults (Oracle Text DR$ tables in the dump; the ezoracle alias in the trap).

Kernel libraries stage (closed in 0.3.0.1). A later Oracle proof stopped and rolled back: the kernel reported its libraries stage pending although composer.lock was unchanged (vendor/ not what the lock names, as on a kickstarted install), and exp:upgrade refuses the database stage while an earlier stage has pending steps. xne used to add the libraries stage only when the target's composer.lock differed. Since 0.3.0.1 the plan also asks the install's exp:upgrade:status --stages=libraries, and when it is pending runs libraries, database, scripts in that order, with vendor/, composer.json, composer.lock and the Composer extension folders in the verified backup and the same automatic rollback; when only the new kernel reports it after the files landed, xne stops and rolls back rather than run it without a backup. Proven by LibrariesTest (a fake kernel with the kernel's stage order rule: plan, upgrade, xne rollback and an automatic rollback restore files, vendor/ and database exactly; all 46 unit tests pass). Not yet rerun on a real Oracle install: the throwaway install from that proof no longer exists on this node.

xne backs up, upgrades and rolls back the database of an Exponential install with the install's own [DatabaseSettings] (settings/site.ini, the siteaccess, settings/override; the password is never shown). Every backup is verified before anything changes, and a rollback is exact: the tests compare a fingerprint of every table or collection (and sequence) before the backup and after the restore.

EngineDatabaseImplementationPHP extension xne needsBackup (<backup>/...)Upgrade stepsRollback
MySQL / MariaDBezmysqli, ezmysqlpdo_mysqldb.sql.gz: xne's framed SQL dump (DDL from SHOW CREATE TABLE, rows counted)the kernel's exp:upgrade, else update/database/mysql/ SQL filesevery table dropped and recreated from the dump
PostgreSQLezpostgresqlpdo_pgsqldb.sql.gz: DDL from the catalog, sequences at their positions, rowsexp:upgrade, else update/database/postgresql/in one transaction
SQLitesqlite3, ezsqlite3pdo_sqlite (+ sqlite3)db.sqlite: a consistent copy, integrity-checkedexp:upgrade, else update/database/sqlite/through SQLite's backup API
MongoDBexpmongodbmongodbdb.mongo.jsonl.gz: indexes and documents as canonical extended JSON (every BSON type exact)the kernel's exp:upgrade only (6.0.15 and newer)collections dropped, indexes and documents recreated
Oracleezoracleoci8db.oracle.jsonl.gz: DDL from DBMS_METADATA (tables, sequences at their positions, indexes, triggers), rows with CLOB/BLOB whole; no expdp, RMAN or server directorythe kernel's exp:upgrade (through ezoracle) onlytables purged, recreated, rows bound back, then indexes and triggers

When xne's own PHP lacks the extension, name one that has it: xne upgrade --root=... --php=/opt/plesk/php/8.5/bin/php (xne then runs itself under that PHP). An install whose siteaccesses use more than one database is refused (several-databases).

Examples

xne detect  --root=/var/www/vhosts/example.com/doc/www.example.com      # the database line names the engine
xne backup  --root=... --php=/opt/plesk/php/8.5/bin/php                 # a verified backup now (any engine)
xne upgrade --root=... --dry-run
xne upgrade --root=...
xne rollback --root=...