From 7852ec16190ff96209fda9afcab5cf1d804f041c Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 14 Apr 2016 14:50:52 -0700 Subject: [PATCH] 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 --- src/docs/user/cluster/cluster_databases.diviner | 2 +- .../workflow/PhabricatorStorageManagementDumpWorkflow.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/docs/user/cluster/cluster_databases.diviner b/src/docs/user/cluster/cluster_databases.diviner index cfe684c601..1da9eb2156 100644 --- a/src/docs/user/cluster/cluster_databases.diviner +++ b/src/docs/user/cluster/cluster_databases.diviner @@ -302,7 +302,7 @@ this command //from// that host, to avoid sending the whole dump over the network). 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 easier to change the binlog coordinates to the correct position for the dump. diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php index 268b32b462..4933bd70bb 100644 --- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php +++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php @@ -13,7 +13,7 @@ final class PhabricatorStorageManagementDumpWorkflow array( 'name' => 'for-replica', 'help' => pht( - 'Add __--dump-slave__ to the __mysqldump__ command, '. + 'Add __--master-data__ to the __mysqldump__ command, '. 'generating a CHANGE MASTER statement in the output.'), ), )); @@ -57,7 +57,7 @@ final class PhabricatorStorageManagementDumpWorkflow $argv[] = '--default-character-set=utf8'; if ($args->getArg('for-replica')) { - $argv[] = '--dump-slave'; + $argv[] = '--master-data'; } $argv[] = '-u';