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
F17648932: D18707.diff
Sat, Jul 12, 3:05 AM
Unknown Object (File)
Sun, Jun 29, 8:08 PM
Unknown Object (File)
May 19 2025, 9:04 AM
Unknown Object (File)
May 5 2025, 7:10 PM
Unknown Object (File)
May 2 2025, 2:09 PM
Unknown Object (File)
Apr 14 2025, 7:42 AM
Unknown Object (File)
Apr 12 2025, 8:42 AM
Unknown Object (File)
Apr 8 2025, 3:58 PM
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