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
F18843017: D18707.id44911.diff
Tue, Oct 28, 8:27 PM
F18835471: D18707.id.diff
Sun, Oct 26, 4:02 PM
F18830187: D18707.diff
Sat, Oct 25, 4:53 AM
F18791122: D18707.id.diff
Thu, Oct 16, 2:35 AM
F18748921: D18707.diff
Oct 4 2025, 1:33 AM
F18509156: D18707.id.diff
Sep 5 2025, 3:15 AM
F18501738: D18707.diff
Sep 4 2025, 9:56 PM
F18217473: D18707.id44912.diff
Aug 19 2025, 8:56 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