Official MyDumper Project
3,224
stars
3,947
commits
C
primary language
Sep 10, 2026
updated
MyDumper is a MySQL Logical Backup Tool. It has 2 tools:
mydumper which is responsible to export a consistent backup of MySQL databasesmyloader reads the backup from mydumper, connects to the destination database and imports the backup.Both tools use multithreading capabilities.
MyDumper is Open Source and maintained by the community, it is not a Percona, MariaDB or MySQL product.
Official Documentation (work in progress) Machine JSON Logging
This sections has been migrated
This sections has been migrated
You can download the official docker image or you can build the Docker image either from local sources or directly from Github sources with the provided Dockerfile.
docker build --build-arg CMAKE_ARGS='-DWITH_ZSTD=ON' -t mydumper \
https://github.com/mydumper/mydumper.git#master:docker
Keep in mind that the main purpose the Dockerfile addresses is development and build from source locally. It might not be optimal for distribution purposes, but can also work as a quick build and run solution with the above one-liner, though.
See Usage
This is all done following best MySQL practices and traditions:
This for now does not provide consistent snapshots for non-transactional engines - support for that is expected in 0.2 :)
This sections has been migrated
You can execute external commands with --exec like this:
mydumper --exec "/usr/bin/gzip FILENAME"
--exec is single threaded, similar implementation than Stream. The exec program must be an absolute path. FILENAME will be replaced by the filename that you want to be processed. You can set FILENAME in any place as an argument.
The default file (aka: --defaults-file parameter) is starting to be more important in MyDumper
[mydumper]
host = 127.0.0.1
user = root
password = p455w0rd
database = db
rows = 10000
[myloader]
host = 127.0.0.1
user = root
password = p455w0rd
database = new_db
optimize-keys = AFTER_IMPORT_PER_TABLE
Prior to v0.14.0-1:
[mydumper_variables]
wait_timeout = 300
sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
[myloader_variables]
long_query_time = 300
innodb_flush_log_at_trx_commit = 0
From to v0.14.0-1:
[mydumper_session_variables]
wait_timeout = 300
sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
[mydumper_global_variables]
sync_binlog = 0
slow_query_log = OFF
[myloader_session_variables]
long_query_time = 300
[myloader_global_variables]
sync_binlog = 0
innodb_flush_log_at_trx_commit = 0
[`db`.`table`]
where = column > 20
limit = 10000
[`myd_test`.`t`]
columns_on_select=qty,price+20
columns_on_insert=qty,price
IMPORTANT: when using options that don't require an argument like: --no-data or --events, you need to set any value to those variables which will always indicate: TRUE/ON/ENABLE. It is a MISCONCEPTION if you think that adding --no-data=0 will export data:
[mydumper]
no-data=0
Will NOT export the data as no-data is being specified.
mydumper is versioned MAJOR.MINOR.PATCH-revision.
Even patch versions indicate a pre-release. More info.
(top 30 of 97)
C
91.0%
Shell
4.8%
CMake
2.8%
Dockerfile
1.4%
Official MyDumper Project
3,224
stars
3,947
commits
C
primary language
Sep 10, 2026
updated
MyDumper is a MySQL Logical Backup Tool. It has 2 tools:
mydumper which is responsible to export a consistent backup of MySQL databasesmyloader reads the backup from mydumper, connects to the destination database and imports the backup.Both tools use multithreading capabilities.
MyDumper is Open Source and maintained by the community, it is not a Percona, MariaDB or MySQL product.
Official Documentation (work in progress) Machine JSON Logging
This sections has been migrated
This sections has been migrated
You can download the official docker image or you can build the Docker image either from local sources or directly from Github sources with the provided Dockerfile.
docker build --build-arg CMAKE_ARGS='-DWITH_ZSTD=ON' -t mydumper \
https://github.com/mydumper/mydumper.git#master:docker
Keep in mind that the main purpose the Dockerfile addresses is development and build from source locally. It might not be optimal for distribution purposes, but can also work as a quick build and run solution with the above one-liner, though.
See Usage
This is all done following best MySQL practices and traditions:
This for now does not provide consistent snapshots for non-transactional engines - support for that is expected in 0.2 :)
This sections has been migrated
You can execute external commands with --exec like this:
mydumper --exec "/usr/bin/gzip FILENAME"
--exec is single threaded, similar implementation than Stream. The exec program must be an absolute path. FILENAME will be replaced by the filename that you want to be processed. You can set FILENAME in any place as an argument.
The default file (aka: --defaults-file parameter) is starting to be more important in MyDumper
[mydumper]
host = 127.0.0.1
user = root
password = p455w0rd
database = db
rows = 10000
[myloader]
host = 127.0.0.1
user = root
password = p455w0rd
database = new_db
optimize-keys = AFTER_IMPORT_PER_TABLE
Prior to v0.14.0-1:
[mydumper_variables]
wait_timeout = 300
sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
[myloader_variables]
long_query_time = 300
innodb_flush_log_at_trx_commit = 0
From to v0.14.0-1:
[mydumper_session_variables]
wait_timeout = 300
sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
[mydumper_global_variables]
sync_binlog = 0
slow_query_log = OFF
[myloader_session_variables]
long_query_time = 300
[myloader_global_variables]
sync_binlog = 0
innodb_flush_log_at_trx_commit = 0
[`db`.`table`]
where = column > 20
limit = 10000
[`myd_test`.`t`]
columns_on_select=qty,price+20
columns_on_insert=qty,price
IMPORTANT: when using options that don't require an argument like: --no-data or --events, you need to set any value to those variables which will always indicate: TRUE/ON/ENABLE. It is a MISCONCEPTION if you think that adding --no-data=0 will export data:
[mydumper]
no-data=0
Will NOT export the data as no-data is being specified.
mydumper is versioned MAJOR.MINOR.PATCH-revision.
Even patch versions indicate a pre-release. More info.
(top 30 of 97)
C
91.0%
Shell
4.8%
CMake
2.8%
Dockerfile
1.4%