Backup

Using MyDumper Checksums for Reliable MySQL Backup Validation

intro

Discover why MyDumper is a well-known open-source multi-threaded tool to help developers back up their MySQL and MariaDB databases!

Tools used in the tutorial
Tool Description Link
Dbvisualizer DBVISUALIZER
TOP RATED DATABASE MANAGEMENT TOOL AND SQL CLIENT
mariadb MARIADB
THE MARIADB DATABASE
MySQL logo MySQL
THE MYSQL DATABASE

Have you ever used MyDumper? Given that you’re reading this blog, there’s a huge probability of that being the case. Do you know everything about the tool though? Probably not. Let’s find out everything you need to know about it, including its features and advanced options!

What is MyDumper?

MyDumper is a tool that was developed by David Ducos, who is presently employed at Percona. David Ducos was interviewed and asked what MyDumper is and how does it differ from mysqldump. This is what he replied:

“MyDumper is a logical backup tool <…> the most important thing about it is that it’s using multithreading so that’s why it’s faster than other options. <…> It solves a problem of mysqldump which was that it was single-threaded. <…> DBAs can take backups much faster with MyDumper compared to other options.”

Why is It Important for Backing Up Bigger Data Sets?

When asked whether MyDumper is suitable for larger datasets, David Ducos stated that the tool works well for both large and small datasets because it can split huge tables into multiple chunks and process them using multiple threads.

Now, MyDumper isn’t the only tool we use to take backups of our beloved relational database management system, but due to its speed and parallelism, consistency, output management, flexibility, and ability to compress data, it’s a contender to many backup tools on the market right now.

Backup Integrity with MyDumper

As for backup integrity, a downside of MyDumper is that it doesn’t enforce any checksum checks by default. At the same time, the tool does have options to for backup integrity checks when told to do so. To check for backup integrity, issue a query like so when taking the backup:

Copy
        
1 ./mydumper --host localhost --user mysqluser --password BrV9u2MbT 2 --outputdir /tmp/backups/ --M

Here:

  • localhost is the host of your DBMS (make sure your database is up and running on this host.)
  • mysqluser is the user of your MySQL database (”mysqluser” is just a sample username).
  • BrV9u2MbT is the password of your MySQL user (”BrV9u2MbT ” is just a sample password).
  • /tmp/backups/ is the directory to store backups taken by MyDumper in.

Additionally, the --M option will tell MyDumper to check for backup checksum values: in other words, we will check for backup integrity too.

Here’s what’s going to happen: mydumper will obtain checksums of all of the data that is being backed up (that includes data itself, indexes, triggers, schema definitions, routines, etc.), then compare it to checksum values by performing the same steps as before upon restoration. If the data isn’t the same (if the checksum values differ signifying integrity changes), the backup won’t be restored.

To learn more about verifying checksum values and backup integrity, refer to Percona’s blog about MyDumper.

MyDumper Options and the Role of MyLoader

MyDumper is also able to kill long-running transactions, filter tables or databases from backups to include or exclude them if necessary, and assist with large-scale migrations. That’s the case not only because the tool is multithreaded, but also because it has a lot of options that will help you to:

  1. Connect to the database exclusively using SSL if necessary (--ssl-mode)
  2. Include or exclude databases from being backed up (--regex or -x)
  3. Dump only selected records (--where)
  4. Override the long query timer to prevent timeouts (--long-query-guard and --long-query-retries)
  5. Define the maximum number of threads that it can use when dumping a single table (max-threads-per-table) and do other things.

Often, MyDumper is used together with MyLoader. That’s the case when we need to create and restore logical backups of very large MySQL databases.

The tandem works as follows:

  1. MyDumper takes the backup using multiple threads (we can also tell MyDumper to check for checksum values here as well).
  2. MyLoader reads/imports that backup into MySQL also working on checksum values.

Thus, MyLoader helps with speed and performance when restoring larger datasets that would be slow to backup/restore using traditional single-threaded tools like mysqldump.

Embrace an SQL Client for Better Backups and Data Management

When it comes to different kinds of tooling concerning your database, don’t forget to take a look at SQL clients. SQL clients like the one offered by DbVisualizer will not help you back up your databases or check your backup checksum values like MyDumper does, however, it does have a couple of features similar to checksum values. One of those features concern the SQL History window:

The history of SQL queries executed in DbVisualizer
The history of SQL queries executed in DbVisualizer

Besides the history of SQL queries, DbVisualizer has many other features unique to itself including the ability to drag-and-drop tables you want to query into the tool, the ability to bookmark your queries for them to be re-used in the future, as well as the ability to export result sets in all kinds of formats.

DbVisualizer really is a versatile tool you can use for pretty much any purpose: for data comparisons, data editing, or simply running SQL queries through the SQL editor. Tired of checksum-checking? Give it a try!

Summary

MyDumper comes with an immense list of options, as well as the ability to take backups using multiple threads at once.

With that being said, backups aren’t the only thing you need to worry about; if someone messes around with your data after it’s restored, that’s never good, and that’s why MyDumper comes with the ability to check for checksum values, too.

Since checksum values aren’t the only thing we need to worry about either, make sure to manage your databases with powerful SQL clients like DbVisualizer. DbVisualizer comes with a free 21-day trial meaning that all of the features of the tool will be free for you to try for 21 days. Grab a free evaluation trial, and until next time!

FAQ

What is MyDumper and how does it differ from mysqldump?

MyDumper is a logical backup tool with a primary difference from mysqldump being that MyDumper is multithreaded and mysqldump is not. Learn more about core differences in the interview with the developer of MyDumper (David Ducos) on YouTube.

Are MyLoader and MyDumper the same?

No, MyLoader and MyDumper are not the same thing. They’re two different tools, but they’re often used in conjunction (one after the other or vice versa) because MyLoader assists us when loading data into a database, and MyDumper assists us when taking a backup or two.

How to use MyDumper?

To take a backup using MyDumper, invoke mydumper through the CLI by specifying the host of your database, the user and the password (the --M option is optional here, and you can use it for backup integrity):

Copy
        
1 ./mydumper --host localhost --user YOUR_USERNAME --password YOUR_PASSWORD 2 --outputdir OUTPUT_DIR_PATH --M

About the author
LukasVileikisPhoto
Lukas Vileikis
Lukas Vileikis is an ethical hacker and a frequent conference speaker. He runs one of the biggest & fastest data breach search engines in the world - BreachDirectory.com, frequently speaks at conferences and blogs in multiple places including his blog over at lukasvileikis.com.
The Table Icon
Sign up to receive The Table's roundup
More from the table
Title Author Tags Length Published
title

Data Backup and Recovery: Implement the Golden Rule in Your Database

author Lukas Vileikis tags Backup Recovery SQL 6 min 2025-04-07
title

SQL Server Backup and Recovery

author Ochuko Onojakpor tags Backup 16 min 2024-10-09
title

Restoring a PostgreSQL Backup With pg_restore: Examples, Tips, and Tricks

author Antonello Zanini tags Backup POSTGRESQL 8 min 2024-07-29
title

mysqldump: How to Backup and Restore MySQL Databases

author Antonello Zanini tags Backup MySQL SQL 11 min 2024-06-06
title

PostgreSQL Backup and Restore: Complete Tutorial with pg_dump and pg_restore

author Leslie S. Gyamfi tags pg_dump POSTGRESQL 9 min 2026-05-04
title

MySQL 8.0 EOL: What Happens Next?

author Lukas Vileikis tags MARIADB MySQL SQL 4 min 2026-04-30
title

Best Tools for Role-Based Access Control (RBAC) in SQL Databases in 2026

author Lukas Vileikis tags SQL SQL clients 6 min 2026-04-27
title

Versioning Your Queries: Git Workflows for Analysts and Engineers

author Lukas Vileikis tags 7 min 2026-04-23
title

The Best MySQL GUI for macOS: Top 4 Alternatives to Workbench

author Leslie S. Gyamfi tags SQL SQL clients 7 min 2026-04-20
title

Choosing the Right SQL Client for Cassandra Clusters

author Lukas Vileikis tags Cassandra 5 min 2026-04-16

The content provided on dbvis.com/thetable, including but not limited to code and examples, is intended for educational and informational purposes only. We do not make any warranties or representations of any kind. Read more here.