← Exponential Network

How upgrades work

How an xne upgrade runs, what keeps it safe, and how it rolls back.

detect ─▶ plan ─▶ lock ─▶ backup (verified) ─▶ maintenance on? ─▶ files ─▶ kernel exp:upgrade | SQL files
                                                                           │
            ┌──────────────── any failure ◀────────────────────────────────┤
            ▼                                                              ▼
    automatic rollback (files, libraries, database, caches)      autoloads + cache clears ─▶ health ─▶ maintenance off ─▶ rotate
  • Files come from the target release (downloaded once into the release cache) and are written atomically, each checked against the release afterwards. Local edits are kept aside in the backup and listed.
  • Database steps are the kernel's own: bin/php/upgrade.php (exp:upgrade) when the target has it, else the update/database/<engine>/ SQL files, chained from the database's version to the target.
  • Nothing is deleted: retired files and files a rollback takes back are moved into the backup folder.

Safety, in short

  • Nothing changes before the backup is verified. The backup holds every file the upgrade changes, the settings, and the database; it is read back and checked before the first write.
  • Any failure rolls back. Writing files, the kernel's upgrade step, an SQL file, the cache clears or the health check: each failure restores files and database at once.
  • One run at a time. Each install has a lock; a second run is refused.
  • Nothing is deleted. Retired files and files a rollback takes back are moved into the backup folder.
  • Local edits are kept. A file changed on the server is copied into the backup before the release's version replaces it, and listed for you to merge.
  • Visitors keep being served by default; with maintenance=page they see the kernel's maintenance page while admins can still sign in.

// learn more

Go deeper.

Database engines

MySQL/MariaDB, PostgreSQL, SQLite, MongoDB and Oracle: what is backed up, upgraded and restored.

Read →

Rolling back

The backup, the automatic rollback, xne rollback, git tags, and the way back by hand.

Read →

Upgrade traps

The known traps xne detects, why each matters and the fix.

Read →

FAQ

Short answers to the common questions.

Read →