7x Exponential Network Docs Planning and upgrading
← Command reference

Planning and upgrading

xne command reference: Planning and upgrading.

plan

xne plan [--root=DIR] [--channel=stable|beta|main|security] [--to=REF] [--method=auto|filepatch|git]
         [--shared=skip|write] [--accept=TRAP,...] [--refresh] [--allow-downgrade]
  What an upgrade would do: the source used (gitlab, github, packagist, in that order), the target, the
  file diff (add, update, retire, local edits kept aside), the libraries and database steps, the traps and
  the ordered steps. Changes nothing in the install.
OptionMeaning
--channelstable (newest stable release of the same major), beta (alpha, beta and rc too), main (the nightly branch: a warning, a forced backup), security (newest stable release of the install's own x.y line)
--toa tag (v6.0.15 or 6.0.15), a branch (main) or a 40-hex commit; overrides the channel
--methodauto (git for git checkouts, else filepatch), filepatch, git; composer is refused until phase 3
--sharedfiles in folders that link out of the install (shared with another clone): skip leaves them, write writes through the link; without it the plan is blocked
--acceptaccepts blocking traps by id, after a person decided so
--refreshfetches the source's ref list again (it is cached for index_ttl seconds)
--allow-downgradeallows a target older than the install (use xne rollback instead when you can)

The plan lists: the sources in rank order and which answered; the target (ref, kind, commit, version, source); the method and the base of the file diff (release v6.0.14: the tree of the install's own release, else share/filelist.md5, else none); the file counts; the local edits; the database mode (kernel: the stages exp:upgrade will run; sql: the SQL update files, in order); whether Composer runs; the traps; warnings; the ordered steps; and blocked (why it would be refused). A plan downloads the target release (and the install's own release, as the base) into the release cache once; it changes nothing in the install. Exit 3 when the plan is blocked.

upgrade

xne upgrade [plan options] [--dry-run]
  Plan, verified backup, maintenance (setting), files, the kernel's exp:upgrade or the SQL update files,
  autoloads and cache clears, health check. Any failure after the backup rolls back files and database
  at once. --dry-run prints the plan and changes nothing.

With --dry-run it prints the plan and stops (exit 0, or 3 when blocked). Otherwise, in this order:

  1. plan again, refused (exit 3) when blocked;
  2. lock of the install (<state_dir>/installs/<install>/lock): a second run is refused;
  3. backup, verified (rollback-guide.md); when it fails, nothing is changed;
  4. maintenance on when maintenance=page (the kernel's bin/php/maintenance.php on --allow-admin);
  5. files: the file patch (add, update, local edits replaced after a copy is kept, retired files moved aside) or the git fast-forward (git merge --ff-only);
  6. libraries, database, scripts: php bin/php/upgrade.php --apply --stages=[libraries,]database,scripts --no-deploy --no-verify --no-tests --format=json --no-caption --force-no-caption --to=<commit> when the target has the kernel's exp:upgrade (xne's backup replaces the kernel's caption), else the SQL update files;
  7. finish: ezpgenerateautoloads.php -e, then ezcache.php --clear-tag=<tag> once per tag of cache_tags; with finish=velocity also exp:velocity deploy;
  8. health: written files equal the release, share/filelist.md5 is the release's own and matches the files, the install starts from the CLI (ezcache.php --list-tags), exp:upgrade:status shows no failed or pending step of the stages that ran, every health_url answers 200 to 399;
  9. maintenance off; the backup is marked applied; older backups beyond backup_keep are rotated away.

Any failure in steps 4 to 8 starts the automatic rollback and the command exits 1 with rolled_back: true.

sources

xne sources [--refresh]
  The release sources in rank order, which one answers, and the newest refs per channel.

The sources in rank order (sources=, default gitlab,github,packagist; local for a folder of release archives), which one answered, and the target of each channel. Ref lists are cached for index_ttl seconds; --refresh fetches them again.


← Looking at an install · Backups and rollback →