Recovering a single table

mydumper writes the backup of each table to a separate .sql file. You can pick up the .sql file and restore:

shell> mysql -u <user> -p<password> -h <hostname> company -A -f < company.payments.sql

If the table is split into chunks, you can copy all the chunks and information related to the table to a directory and specify the location.

Copy the required files:

shell> sudo cp /backups/employee_table_chunks/employees.employees.* \/backups/employee_table_chunks/employees.employees-schema.sql \/backups/employee_table_chunks/employees-schema-create.sql \/backups/employee_table_chunks/metadata \/backups/single_table/

Use myloader to load; it will automatically detect the chunks and load them:

shell> myloader --directory=/backups/single_table/ ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.