MySQL database backup tool has its own mysqldump, which is an official mysql backup tool. However, mydumper, a third-party backup tool, is advantageous for more people. Next we will test and verify the backup efficiency between them.
1. Install the mydumper source package. You can check the relevant information to complete the installation!
2. Create a test database and table in the mysql database (enter the mysql database)
Create database test;
Create table test (a int );
3. Generate a million data file (input on the terminal)
Seq 1 30000000>/tmp/test. SQL
4. import data from the file to the database table
Load data infile '/tmp/test. SQL' into table test;
5. Use the mysql backup tool to back up and display the backup time (Figure below)
Time mysqldump test>/tmp/test1.bak
6. Use the third-party backup tool mydumper to back up and display the backup time (Figure below)
Time mydumper-B test-o/tmp/test2.bak-r 5000