Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expmigrationdeploy

Deploy this installation's migrations to one or many remotes at once, in sync: preflight and verify on all, then switch all, or take all back.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/commands/expmigrationdeploy.md

On this page

exp:expmigrationdeploy

Deploy this installation's migrations to one or many remotes at once, in sync: preflight and verify on all, then switch all, or take all back.

Script bin/php/expmigrationdeploy.php, code in kernel/private/classes/commands/expmigrationdeploy.php. Run it from the installation root, as the user the web server runs as:

./console exp:expmigrationdeploy --help
./console exp:migration:deploy --help
php bin/php/expmigrationdeploy.php --help

Help text

Deploy migrations to remotes, all at once and in sync
Sends this installation's migrations (the site's and the active extensions') to the selected remotes of
migration.ini ([RemoteSettings] RemoteList[], one [Remote_<id>] each) and runs them there. A preflight
on every remote in parallel (reachable, run lock free, nothing failed, the same kernel version, no file
changed after it was applied) must pass before anything changes; the files go to every remote and are
verified there; then every remote applies with one shared run id. When one remote fails, every remote
that applied is taken back to its caption, so all of them stay in the same state. Without --apply it is
a dry run: the preflight and the plan, nothing is sent or changed.

./console exp:migration:deploy --remotes=stage,production
./console exp:migration:deploy --remotes=production --apply
./console exp:migration:deploy --remotes=all --transfer-only --apply
./console exp:migration:deploy --remotes=beta --only=20261102090000_add_news_class --apply --format=json

Staged: --staged puts the remotes in stages by their environment ([RemoteSettings] StageOrder[]); the
first stage is switched, then the deploy waits at a gate until --continue=<deploy id> switches the
next one. --rollback=<deploy id> takes back every remote that applied a deploy.

./console exp:migration:deploy --remotes=all --staged --apply
./console exp:migration:deploy --continue=20261102-120000-a1b2c3 --apply
./console exp:migration:deploy --rollback=20261102-120000-a1b2c3 --apply

Options

OptionValueHelp
--remotesrequiredThe remotes: ids or group names of [RemoteSettings] RemoteList[] in migration.ini, or all (a comma list or repeated)
--applyMake the changes (the default is a dry run that lists them and changes nothing)
--dry-runThe default, accepted for scripts that pass it: list what would change, change nothing
--transfer-onlySend and verify the migration files, but do not run them (with --apply; the only mode for an FTP remote without a trigger)
--onlyrequiredOnly these migrations (migration ids, a comma list or repeated)
--formatrequiredtext (default) or json (the machine output exp-migration/1)
--parallelrequiredHow many remotes are worked on at the same time (default [RemoteSettings] Parallel)
--timeoutrequiredSeconds each remote may take for one phase (default [RemoteSettings] Timeout)
--retriesrequiredHow often a connection failure is tried again (default [RemoteSettings] Retries)
--stagedDeploy stage by stage ([RemoteSettings] StageOrder[] by environment): the first stage now, a gate before each next one (with --apply)
--continuerequiredApprove the gate of a staged deploy and deploy its next stage (the deploy id; with --apply)
--rollbackrequiredTake back every remote that applied this deploy (the deploy id; with --apply)
--loginrequiredRun as this user (default: [RunSettings] RunAsUser of migration.ini)
--run-idrequiredThe id of the run to start (default a new one: <date>-<time>-<6 hex digits>); the administration names it before it starts the run
--progressrequiredAppend the progress of the run to this file, one JSON object per line (what the administration shows while the run goes on)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expmigrationdeploy.php, kernel/private/classes/commands/expmigrationdeploy.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x