Restoring Data
- Recovering from mysqldump and mysqlpump
- Recovering from mydumper using myloader
- Recovering from flat file backup
- Performing point-in-time recovery
Recovering from mysqldump and mysqlpump
The logical backup tools mysqldump and mysqlpump write data to a single file.
SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
How to do it
wget https://www.dropbox.com/s/lebpon3u8cts62i/dump.sql
mysql -u root -p < dump.sql
SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| bank |
| company |
| employees |
| information_schema |
| my.contacts |
| mysql |
| performance_schema |
| sys |
+--------------------+
8 rows in set (0.00 sec)
Sometimes, there can be failures during restoration. If you pass the --force option to MySQL, restoration will continue: