Why does mysql shell not load any data when I use util.load_dump()?

576 Views Asked by At

I am using MySQL shell utilities 8.0.23 for both dump and load and the process goes as follows:

On one host: I use util.dump_Instance() to create a dump of a mysql 8.0.23 instance with multiple schemas.

On another host: I download partial files from the dump - all the files relevant to a specific schema and the metadata files (@.;${SCHEMA}@) when I use the load_dump instance it seems the data is not loaded.

here is my code:

util.load_dump(RESTORE_PATH, {'threads': THREADS, 'showProgress': True, 'includeSchemas': [INCLUDE_SCHEMA], 'excludeTables': [EXCLUDE_TABLES], 'loadData': True, 'loadDdl': True })

and the result I am getting when running this process using CI is as follows:

Opening dump...
15:05:40  Target is MySQL 8.0.23. Dump was produced from MySQL 8.0.23
15:05:40  Scanning metadata \ 0 / ~0
Scanning metadata - done       
15:05:40  Checking for pre-existing objects...
15:05:40  Executing common preamble SQL
15:05:40  Executing DDL \ 0 / ~0
Executing DDL - done       
15:05:40  Executing view DDL \ 0 / ~0
Executing view DDL - done       
15:05:40  Starting data load
15:05:40  
15:05:40  Recreating indexes \ 0 / 0 
Recreating indexes - done       
15:05:40  Executing common postamble SQL
15:05:40  No data loaded.
15:05:40  0 warnings were reported during the load.

What am I missing? why is my data not loaded? what can I do to fix this so my data will be loaded properly?

1

There are 1 best solutions below

0
On

I found the issue - no data was loaded because when loading partial data from dump_instance the list of files that need to be copied are as follows:

  1. @.* - dump metadata files
  2. SCHEMA@* - schema data files
  3. SCHEMA.* - schema metadata fils (these are the files that were missing and caused no data to load)