Skip to the content
Documentation

exp:expmigrationresume

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Resume a migration run that failed or was interrupted: the migrations still pending run again; a dry run unless --apply

Usage

./console exp:expmigrationresume [options]
php bin/php/expmigrationresume.php [options]
./console exp:migration:resume [options]

Aliases

exp:migration:resume

Help

The output of ./console help exp:expmigrationresume (the script run with --help), without the standard options:

Usage: bin/php/expmigrationresume.php [OPTION]... [RUN]
Resume a migration run
The run named, or the newest run that failed or was interrupted (its record says running, but no
process holds the installation lock any more). A run that is still running, that finished or that
was rolled back is not resumed. Resuming is a new run, in the environment of the old one, of the
migrations still pending: those the old run did not reach, the one that failed, and those the
restore after the failure took back. With --apply the record of an interrupted run is closed as
failed first. The options of the run are those of exp:migration:migrate.

./console exp:migration:resume
./console exp:migration:resume 20261031-120000-a1b2c3 --apply


Options:
  --apply                 Make the changes (the default is a dry run that lists them and changes nothing)
  --dry-run               The default, accepted for scripts that pass it: list what would change, change nothing
  --environment=VALUE     The environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count
  --format=VALUE          text (default) or json (the machine output exp-migration/1)
  --login=VALUE           Run as this user (default: [RunSettings] RunAsUser of migration.ini)
  --no-caption            No caption before and after the run: a failure cannot be restored automatically
  --no-restore            After a failure, leave the installation as the failure left it instead of restoring the caption taken before the run
  --include-uncommitted   Run although settings/, extension/ or design/ have changes that are not committed, and keep them in the caption
  --no-commit             Do not commit the status file and run log to the migrations repository (no tag and no push either)
  --no-push               Commit and tag, but do not push
  --no-tag                Commit and push, but do not tag the run
  --force                 With --reason: accept migrations whose file changed after they were applied (they are not run again)
  --reason=VALUE          Why a changed migration is accepted (needed with --force; kept in the record and the audit log)
  --run-id=VALUE          The id of the run to start (default a new one: <date>-<time>-<6 hex digits>); the administration names it before it starts the run
  --progress=VALUE        Append the progress of the run to this file, one JSON object per line (what the administration shows while the run goes on)
  --max-migrations=VALUE  Apply at most this many migrations; the rest stay pending for the next run (default [RunSettings] MaxMigrations, empty: all)
  --max-time=VALUE        Start no further migration after this many seconds; the rest stay pending for the next run (default [RunSettings] MaxTime)
  --throttle=VALUE        Pause this many seconds between two migrations and between the batches of a long migration (default [RunSettings] Throttle)
  --nice=VALUE            Run at this lower priority, 1 to 19 as nice(1) (default [RunSettings] Nice)

Options

Option Value Description
--apply - Make the changes (the default is a dry run that lists them and changes nothing)
--dry-run - The default, accepted for scripts that pass it: list what would change, change nothing
--environment required The environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count
--format required text (default) or json (the machine output exp-migration/1)
--login required Run as this user (default: [RunSettings] RunAsUser of migration.ini)
--no-caption - No caption before and after the run: a failure cannot be restored automatically
--no-restore - After a failure, leave the installation as the failure left it instead of restoring the caption taken before the run
--include-uncommitted - Run although settings/, extension/ or design/ have changes that are not committed, and keep them in the caption
--no-commit - Do not commit the status file and run log to the migrations repository (no tag and no push either)
--no-push - Commit and tag, but do not push
--no-tag - Commit and push, but do not tag the run
--force - With --reason: accept migrations whose file changed after they were applied (they are not run again)
--reason required Why a changed migration is accepted (needed with --force; kept in the record and the audit log)
--run-id required The id of the run to start (default a new one: <date>-<time>-<6 hex digits>); the administration names it before it starts the run
--progress required Append the progress of the run to this file, one JSON object per line (what the administration shows while the run goes on)
--max-migrations required Apply at most this many migrations; the rest stay pending for the next run (default [RunSettings] MaxMigrations, empty: all)
--max-time required Start no further migration after this many seconds; the rest stay pending for the next run (default [RunSettings] MaxTime)
--throttle required Pause this many seconds between two migrations and between the batches of a long migration (default [RunSettings] Throttle)
--nice required Run at this lower priority, 1 to 19 as nice(1) (default [RunSettings] Nice)

Arguments

[run]

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/expmigrationresume.php, kernel/private/classes/commands/expmigrationresume.php

See also

Generated example: exp:expmigrationresume

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.