Use --master-data, not --dump-slave, in bin/storage dump
Summary: These flags do slightly different things, I actually want --master-data here. My test databases are setup half-weird and work with either statement, which is why I missed this. Test Plan: Ran a dump against master, got the right CHANGE MASTER statement with no warnings. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D15716
This commit is contained in:
@@ -302,7 +302,7 @@ this command //from// that host, to avoid sending the whole dump over the
|
|||||||
network).
|
network).
|
||||||
|
|
||||||
With the `--for-replica` flag, the `bin/storage dump` command creates dumps
|
With the `--for-replica` flag, the `bin/storage dump` command creates dumps
|
||||||
with `--dump-slave`, which includes a `CHANGE MASTER` statement in the output.
|
with `--master-data`, which includes a `CHANGE MASTER` statement in the output.
|
||||||
This may be helpful when initially setting up new replicas, as it can make it
|
This may be helpful when initially setting up new replicas, as it can make it
|
||||||
easier to change the binlog coordinates to the correct position for the dump.
|
easier to change the binlog coordinates to the correct position for the dump.
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ final class PhabricatorStorageManagementDumpWorkflow
|
|||||||
array(
|
array(
|
||||||
'name' => 'for-replica',
|
'name' => 'for-replica',
|
||||||
'help' => pht(
|
'help' => pht(
|
||||||
'Add __--dump-slave__ to the __mysqldump__ command, '.
|
'Add __--master-data__ to the __mysqldump__ command, '.
|
||||||
'generating a CHANGE MASTER statement in the output.'),
|
'generating a CHANGE MASTER statement in the output.'),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
@@ -57,7 +57,7 @@ final class PhabricatorStorageManagementDumpWorkflow
|
|||||||
$argv[] = '--default-character-set=utf8';
|
$argv[] = '--default-character-set=utf8';
|
||||||
|
|
||||||
if ($args->getArg('for-replica')) {
|
if ($args->getArg('for-replica')) {
|
||||||
$argv[] = '--dump-slave';
|
$argv[] = '--master-data';
|
||||||
}
|
}
|
||||||
|
|
||||||
$argv[] = '-u';
|
$argv[] = '-u';
|
||||||
|
|||||||
Reference in New Issue
Block a user