Databasemysql backup

Fastest method for taking MySQL Backup and Restore

In this blog, you will know the Fastest method for taking MySQL Backup and Restore.

Mydumper and Myloader are the utility which allows you to perform an extremely Fastest method for taking MySQL Backup and Restore and reliable multi-threaded MySQL backup and restore. These tools are written in the C programming language.

Mydumper is a tool for fast reliable logical backups. It is an alternative to mysqldump and has many advantages over mysqldump some of which are listed below:

  • Multi-threaded backup tool which makes it a lot faster than mysqldump, as mysqldump is single threaded. It will be more advantage if you have very fast storage such as SSDs which can be much better utilized with multiple threads.
  • The tool produces separate files for separate tables instead of one big monolithic file, making it easy to restore single tables. You can even break/chunk the table into multiple files which is super useful for cases where you have very large tables.
  • The tool allows for multi-threaded restores, making restores an order of magnitude faster in comparison to restoring from mysqldump produced backups. This is especially true for large datasets.
  • The Mydumper tool provides inbuilt compression so that the backup files are written in compressed form.
When it comes to backing up and restoring MySQL database, most people usually use the very popular mysqldump. You know that mysqldump is very easy to use for a smaller database, it doesn’t work well with larger databases. It’s very slow for huge databases and very error prone when used for very big MySQL databases.
Install mydumper on ubuntuFastest method for taking MySQL Backup and Restore
# sudo apt-get install mydumper
Install mydumper for other linux:
Install Dependency:
# yum install glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel cmake
Download mydumper – https://launchpad.net/mydumper [OR] (Directly here https://launchpad.net/mydumper/0.6/0.6.2/+download/mydumper-0.6.2.tar.gz)

Syntax Mydumper:

Example: mydumper -u USER -p PASSWORD -o /home/DESTINATION_DIR/DATABASE/ -B DATABASE

Syntax Myloader

Example: myloader -u USER -p PASSWORD -B DATABASE -d /home/SOURCE_DIR/DATABASE/

Related Articles

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close

Adblock Detected

Please consider supporting us by disabling your ad blocker