One of the tasks within Percona Remote DBA is to ensure we have reliable backups with minimal impact. To accomplish this, one of the tools our team uses is called mydumper. We use mydumper for logical backups because of several nice features. Some of them are:
- multithreaded, producing very fast backups compared to mysqldump
- almost no locking, if not using non innodb tables
- built-in compression
- separate files for each table, making it easy to restore single tables or schema, and the possibility to hardlink files reducing the space needed to keep history of backups. Also this feature give you the possibility to restore with more than one thread.
And now we are glad to announce our second release: mydumper 0.6.1. You can download the source code here. It is highly recommended to upgrade it if you are using 0.6.0 as we fixed and improved the new less-locking feature.
New features in the mydumper 0.6 series:
- Consistent backups with less locking
This new feature consists of locking all non-innodb tables with the dumping threads at the beginning so in this way we can unlock the flush tables with read lock earlier and no need to wait until all non-innodb tables were dumped. You can take advantage of this feature when you have large archive or myisam tables.
- File size chunks
Now you can split tables dump into different files with fixed size. This is usefull to reduce storage capacity needed to keep history backups by using hardlinks. Think on big “log” tables or tables where old data didnt change, now you will be able to hardlink back those chunks.
- Metadata Locking
Added new option –use-savepoints to reduce metadata locking issues while backup is running.
Fixed Bugs in the mydumper 0.6 series:
- #1250269 ensure statement is not bigger than statement_size
- #827328 myloader to set UNIQUE_CHECKS = 0 when importing
- #993714 Reducing the time spent with a global read lock
- #1250271 make it more obvious when mydumper is not successful
- #1250274 table doesnt exist should not be an error
- #987344 Primary key name not quoted in showed_nulls test
- #1075611 error when restoring tables with dashes in name
- #1124106 Mydumper/myloader does not care for 0-s in AUTO_INCREMENT fields
- #1125997 Timestamp data not portable between servers on differnt timezones
- #1273441 less-locking breaks consistent snapshot
- #1267501 mydumper erroneously always attempts a dummy read
- #1272310 main_connection keep an useless transaction opened and permit infinite metadata table lock
- #1269376 mydumper 0.6.0 fails to compile “cast from pointer to integer of different size”
- #1265155 create_main_connection use detected_server before setting it
- #1267483 Build with MariaDB 10.x
- #1272443 The dumping threads will hold metadata locks progressively while are dumping data.