Currently, bin/storage dump has a --for-replica option used to seed a replica database.
It also has a --no-indexes option used to skip indexes, and dumps tables marked as cache tables (PhabricatorConfigTableSchema::PERSISTENCE_CACHE) without data in all cases.
I suspect this won't quite work properly. In particular:
- Combining the --for-replica and --no-indexes flags should probably be explicitly disallowed.
- In --for-replica mode, we should probably dump all data, including caches.
- The help for the --for-replica flag should be updated with a note that it dumps more data.
Before making changes, we should verify that this is actually a problem (i.e., loading a dump with missing data into a replica and then starting replication really causes issues) but it's hard to imagine that this works properly.