MySQL Shell 8.0.21 includes some exciting new utilities to create a logical dump and do a logical restore, with a focus on ease of use, performance and integration. In MySQL Shell 8.0.17, we already introduced a multi-threaded CSV import utility
util.importTable(), and we built on top of that to make it easy to dump and load a whole database instance or a set of schemas.
The new utilities are:
util.dumpInstance(): dump an entire database instance, including users
util.dumpSchemas(): dump a set of schemas
util.loadDump(): load a dump into a target database
This is the first blogpost in a trilogy of 4 parts about MySQL Shell Dump & Load where we compare the performance with other available tools and explain how Shell Dump & Load works under the hood. Other posts:
- MySQL Shell Dump & Load part 2: Benchmarks
- MySQL Shell Dump & Load part 3: Load Dump
- MySQL Shell Dump & Load part 4: Dump Instance & Schemas
MySQL Shell Dump & Load comes with several powerful features:
- multi-threaded dump, splitting larger tables in smaller chunks, with speeds shown up to 3GB/s!
- loading chunks in parallel, and combined with the ability to disable the InnoDB Redo Log in MySQL Server 8.0.21, load performance can go above 200MB/s
- load while Dump still in progress
- abort and Resume loading data
- built-in Compression (zstd & gzip)
- defer creation of secondary indexes after data is loaded
- dump & Load straight to/from OCI Object Storage
- compatibility modes for importing into OCI MySQL Database Service, which makes migration to the cloud easy.
The best way to explain these new utilities is with a little demo…
Note: for the demo’s go fullscreen to see the full terminal output. this blog does not allow more than 40 characters to be displayed, but the terminal screen recorded is wider.
(The recording was sped up during the loading as it takes more than 20 minutes)
MySQL Shell, making MySQL easier to use
loadDump() Shell now provides powerful logical dump and load functionality.