Page MenuHomePhabricator

Make `bin/storage dump` replica-aware
Closed, ResolvedPublic

Description

bin/storage dump should probably still hit the master by default even if replicas are configured, but giving it a --replica option to make dumping from a replica easy would be nice.

I've also left a note about this in the cluster database documentation.

Event Timeline

eadler added a project: Restricted Project.Apr 9 2016, 5:59 PM

T6996 is adjacent.

I think I'm just going to add host and port options since there's some significant value in picking a particular replica (usually the current host, so you don't have to send the whole uncompressed dump over the network), and we probably can't always guess right, and even if we tried to guess, the heuristic we'd want to use would likely be different than the "which replica do we send read-only traffic to"? heuristic.

I can make it smart about deducing --port, --user and --pass if you don't provide them, so bin/storage dump --host replica002.mycompany.com would look up the rest of the details and connect things properly.