phacility/phabricator · error · PhutilArgumentUsageException
Specify an engine to migrate to with
Error message
Specify an engine to migrate to with `%s`. Use `%s` to get a list of engines.
What it means
Usage guard in `bin/files migrate`: the --engine argument is missing or empty, so there is no target storage engine for migration. execute() raises this and points at `bin/files engines` for the list of available engines.
Solutions
- Pass --engine <identifier> naming a configured storage engine
- Run with the engine-listing help flag shown in the message to discover valid engine identifiers
- Ensure the target engine is properly configured in storage settings before migrating
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/6aace23cdd4b3292.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:82
$local_disk_source = $args->getArg('local-disk-source');
if (strlen($local_disk_source)) {
$path = Filesystem::resolvePath($local_disk_source);
try {
Filesystem::assertIsDirectory($path);
} catch (FilesystemException $ex) {
throw new PhutilArgumentUsageException(
pht(
'The "--local-disk-source" argument must point to a valid, '.
'readable directory on local disk.'));
}
$env = PhabricatorEnv::beginScopedEnv();
$env->overrideEnvConfig('storage.local-disk.path', $path);
}
$target_key = $args->getArg('engine');
if (!$target_key) {
throw new PhutilArgumentUsageException(
pht(
'Specify an engine to migrate to with `%s`. '.
'Use `%s` to get a list of engines.',
'--engine',
'files engines'));
}
$target_engine = PhabricatorFile::buildEngine($target_key);
$iterator = $this->buildIterator($args);
$is_dry_run = $args->getArg('dry-run');
$min_size = (int)$args->getArg('min-size');
$max_size = (int)$args->getArg('max-size');
$is_copy = $args->getArg('copy');
$failed = array();View on GitHub (pinned to 5720a38cfe)