Page MenuHomePhabricator

Make `bin/storage dump` insert CREATE DATABASE and USE statements
ClosedPublic

Authored by epriestley on Oct 13 2017, 8:53 PM.
Tags
None
Referenced Files
F18509156: D18707.id.diff
Fri, Sep 5, 3:15 AM
F18501738: D18707.diff
Thu, Sep 4, 9:56 PM
F18217473: D18707.id44912.diff
Tue, Aug 19, 8:56 AM
F18206414: D18707.id.diff
Mon, Aug 18, 3:50 PM
F18193076: D18707.diff
Sun, Aug 17, 4:59 AM
F18089535: D18707.id44912.diff
Aug 6 2025, 11:41 AM
F17852942: D18707.diff
Jul 27 2025, 1:13 PM
F17799933: D18707.diff
Jul 25 2025, 5:41 AM
Subscribers
None

Details

Summary

Ref T13000. The new approach for dumping database-by-database means that we don't get CREATE DATABASE or USE statements, which makes importing the dump again inconvenient.

Manually stitch these into the dump.

Test Plan
  • Used bin/storage dump --namespace ... to dump a smaller local instance.
  • Used bin/storage destroy --namespace ..., to destroy the namespace, then inported the dump cleanly.
  • Verified that each CREATE DATABASE statement appears only once.
  • Verified that bin/storage renamespace --live can correctly process this file.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable