{"record":{"id":"4f6f49770448cf76","repo":"phacility/phabricator","slug":"specify-the-dumpfile-to-read-with-input-or-us","errorCode":null,"errorMessage":"Specify the dumpfile to read with \"--input\", or use \"--live\" to generate one automatically.","messagePattern":"Specify the dumpfile to read with \"--input\", or use \"--live\" to generate one automatically\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/infrastructure/storage/management/workflow/PhabricatorStorageManagementRenamespaceWorkflow.php","lineNumber":63,"sourceCode":"            'name' => 'overwrite',\n            'help' => pht(\n              'With __--output__, write to disk even if the file already '.\n              'exists.'),\n          ),\n        ));\n  }\n\n  protected function isReadOnlyWorkflow() {\n    return true;\n  }\n\n  public function didExecute(PhutilArgumentParser $args) {\n    $console = PhutilConsole::getConsole();\n\n    $input = $args->getArg('input');\n    $is_live = $args->getArg('live');\n    if (!strlen($input) && !$is_live) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify the dumpfile to read with \"--input\", or use \"--live\" to '.\n          'generate one automatically.'));\n    }\n\n    $from = $args->getArg('from');\n    if (!strlen($from)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify namespace to rename from with %s.',\n          '--from'));\n    }\n\n    $to = $args->getArg('to');\n    if (!strlen($to)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify namespace to rename to with %s.',","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementRenamespaceWorkflow.php#L45-L81","documentation":"Thrown by the Phabricator `bin/storage renamespace` workflow when the command provides no dump source: both `--input` (path to an existing mysqldump file) and `--live` (dump the configured database automatically) are empty. Renamespace only rewrites namespace prefixes inside a dump, so it must have one of the two sources before it can do anything. This is a PhutilArgumentUsageException: the invocation is invalid and no work was performed.","triggerScenarios":"Running `./bin/storage renamespace --from X --to Y` with neither `--input` nor `--live`, so strlen($input) == 0 and $is_live is false at the check in didExecute().","commonSituations":"Copying a renamespace example from docs or a wiki that omits the dump source; assuming the tool operates on the live database by default; a migration script where the dump-export step was skipped or failed silently.","solutions":["Pass `--input /path/to/dump.sql` pointing at an existing mysqldump export.","Or pass `--live` so the workflow dumps the configured database itself before renaming namespaces.","Run `./bin/storage help renamespace` to confirm the flag names for your Phabricator version."],"exampleFix":"# before\n./bin/storage renamespace --from phabricator --to mycompany\n\n# after\nmysqldump --all-databases > /tmp/dump.sql\n./bin/storage renamespace --input /tmp/dump.sql --from phabricator --to mycompany --output /tmp/renamed.sql","handlingStrategy":"validation","validationCode":"if [ -z \"$DUMP_FILE\" ] && [ \"$LIVE\" != 1 ]; then\n  echo 'error: set DUMP_FILE or LIVE=1 as the dump source' >&2\n  exit 2\nfi\n./bin/storage renamespace \\\n  ${DUMP_FILE:+--input \"$DUMP_FILE\"} \\\n  ${LIVE:+--live} \\\n  --from \"$FROM\" --to \"$TO\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat renamespace as a dump-transform tool: runbooks must always name either --input or --live.","Wrap storage commands in a script that fails fast when required variables are empty.","Re-check flag names with ./bin/storage help after upgrading Phabricator."],"tags":["phabricator","bin-storage","renamespace","cli","argument-validation","usage-error"],"backgroundTag":"missing-required-cli-flag","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}