phacility/phabricator · warning · PhutilArgumentUsageException
Specify the dumpfile to read with "--input", or use "--live"
Error message
Specify the dumpfile to read with "--input", or use "--live" to generate one automatically.
What it means
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.
Source
Thrown at src/infrastructure/storage/management/workflow/PhabricatorStorageManagementRenamespaceWorkflow.php:63
'name' => 'overwrite',
'help' => pht(
'With __--output__, write to disk even if the file already '.
'exists.'),
),
));
}
protected function isReadOnlyWorkflow() {
return true;
}
public function didExecute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
$input = $args->getArg('input');
$is_live = $args->getArg('live');
if (!strlen($input) && !$is_live) {
throw new PhutilArgumentUsageException(
pht(
'Specify the dumpfile to read with "--input", or use "--live" to '.
'generate one automatically.'));
}
$from = $args->getArg('from');
if (!strlen($from)) {
throw new PhutilArgumentUsageException(
pht(
'Specify namespace to rename from with %s.',
'--from'));
}
$to = $args->getArg('to');
if (!strlen($to)) {
throw new PhutilArgumentUsageException(
pht(
'Specify namespace to rename to with %s.',View on GitHub (pinned to 5720a38cfe)
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.
Example fix
# before ./bin/storage renamespace --from phabricator --to mycompany # after mysqldump --all-databases > /tmp/dump.sql ./bin/storage renamespace --input /tmp/dump.sql --from phabricator --to mycompany --output /tmp/renamed.sql
Defensive patterns
Strategy: validation
Validate before calling
if [ -z "$DUMP_FILE" ] && [ "$LIVE" != 1 ]; then
echo 'error: set DUMP_FILE or LIVE=1 as the dump source' >&2
exit 2
fi
./bin/storage renamespace \
${DUMP_FILE:+--input "$DUMP_FILE"} \
${LIVE:+--live} \
--from "$FROM" --to "$TO" Prevention
- 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.
When it happens
Trigger: 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().
Common situations: 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.
Related errors
- Specify namespace to rename from with %s.
- Specify namespace to rename to with %s.
- The "--overwrite" flag can only be used alongside "--output"
- Output file "%s" already exists. Use "--overwrite" to overwr
- Select which leases you want to release. See "--help" for gu
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/4f6f49770448cf76.
Report an issue: GitHub.