Xiaoye of mysql5.6 Binlog Real-time offsite backup

Source: Internet
Author: User

Because the server data is more important, in addition to the configuration of a master three from the mode, but also increased the main library Binlog real-time backup.

Binlog basic definition: A binary log that records SQL statements that occur to or potentially change data and is stored in a binary form on disk.

configuration Modify my.cnf parameter file join

Log-bin =/database/mysql/logs/binlog/mysql-bin indicates that the archive log is turned on. Additional parameters for Binlog can be found in the previous MySQL general optimization configuration.

Entering Mysqlbinlog--help under CentOS will display all the parameters of the Mysqlbinlog tool. Note that the mysqlbinlog I'm talking about here is the tool that tools open the archive log, not the Binlogs log file below.

Install the mysql5.6 version of Mysqlbinlog on the client (backup server). The Yum source configuration mysql5.6 can be installed directly and given replication permissions.

The following is my simple test script, of course, network server on the Internet for other reasons, such as the exception can be added, time-out breakpoint continued transmission and so on.

#!/bin/bash
Mysqlbinlog--read-from-remote-server--host=192.168.0.200--port=3306--user= "Log_master"--password= "Binlgobak"-- Raw--stop-never--result-file=/data/masterlogbackup mysql-bin.000001

The mysqlbinlog automatically synchronizes the Binlog log files from the original main library, and when a new log file is generated with flush logs, the Mysqlbinlog process on the backup server is automatically tracked and a new Binlog file is automatically generated. Wow, it feels so strong. There is wood there!!!

Xiaoye of mysql5.6 Binlog Real-time offsite backup

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.