O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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/ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required