Mysqlbinlog Incremental backup and recovery

Source: Internet
Author: User


Incremental backup


cp/var/lib/mysql/mysql-bin*/tmp/


Back up the MyBlog database and clear the data about MyBlog in the incremental backup


Mysqldump--flush-logs-uroot-p Han >/tmp/myblog.sql



Back up all databases, clear incremental backups


Mysqldump--flush-logs-u root-p--all-databases >/tmp.all.sql


View Binlog content for a specified time


Ysqlbinlog--start-date= "2016-5-7 20:00:00"--stop-date= "2016-5-7 20:30:00"/tmp/mysql-bin.000001


Specify time period Recovery


Mysqlbinlog--start-date= "2016-5-7 20:00:00"--stop-date= "2016-5-7 20:30:00"/tmp/mysql-bin.000001 |mysql-uroot- P123.com



Specify Time Recovery


Mysqlbinlog--stop-date= "2016-5-7 20:00:00"/tmp/mysql-bin.000001 |mysql-uroot-p123.com


View database dynamics after a specified time recovery


Mysqlbinlog--start-date= "2016-5-7 20:00:00"/tmp/mysql-bin.000001 |mysql-uroot-p123.com




Http://blog.51yip.com/mysql/1042.html

Http://www.111cn.net/database/mysql/58386.htm

Http://www.centoscn.com/mysql/2015/0204/4630.html

This article from "No Trace" blog, reproduced please contact the author!

Mysqlbinlog Incremental backup and recovery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.