Incremental backup of MySQL

Source: Internet
Author: User

1, in MySQL's My.ini file

2 Create a Binlog folder under my D drive

3 Restart MySQL service can see my d drive under the binlog below to generate the following files

4, create the T_one1 table in the default test database
CREATE TABLE T_one1 (ID

www.baohuayule.cn

varchar (ten), name varchar (2));
4.1 Insert a few data, and then can see wxzlog.000001 This file modification date changes, this file is our database to add and delete change records, do not record the query, we can use MySQL
Bring your own mysqlbinlog to view
4.2 T_one1 This watch, and then we take steps to restore it.

5 Switch to cmd in the bin directory where you installed MySQL as

6, for viewing Mysqlbinlog d:www.wanmeiyuele.cn \binlog\wxzlog.www.leyouzaixan.cn 000001, you can see as part of my interception

1, it's time.
2, is the location
We can use both time and location to recover
The command is as follows:
Use location recovery
Mysqlbinlog--stop-position= "2137" d:www.baohuayule.com \binlog\wxzlog.000001 | Mysql-uroot-p
Use time recovery
Mysqlbinlog--stop-datetime= "2018-04-20 13:39:11" D www.huayu1178.cn: \binlog\wxzlog.000001 | Mysql-uroot-p
Recover data for a time period
Mysqlbinlog--start-datetime= "2018-04-20 13:32:13" www.yszx11.cn/--stop-datetime= "2018-04-20 www.006665.cn 13:39:11 "d:\binlog\wxzlog.000001 |

Incremental backup of MySQL

Related Article

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.