Home Database Mysql Tutorial news in mysqlbinlog – Back Up Master Binary Log Files_MySQL

news in mysqlbinlog – Back Up Master Binary Log Files_MySQL

Jun 01, 2016 pm 01:14 PM
master Host

news in mysqlbinlog – Back Up Master Binary Log Files

从mysql5.6开始 mysqlbinlog开始支持远程读取master主机的binlog写入本地,极大的加强了binlog的备份策略,由于在mysql cluster复制环境中,binlog的存在极大的决定的数据恢复的完整性,所以binlog的备份显得特别重要。在诸多HA方案中,例如MHA,使用主库的binlog去恢复主备库之间的数据差,在主库物理机器down机无法重启的情况下,binlog的备份可以直接用来recover slave.所以这一特性提升mysql 容灾级别,使得mysql的灾备方案显得不是那么的单调唯一。

使用”–raw”,”–read-from-remote-server” 选项可以直接控制读取方式与读取server,可以采用管理机器统一读取多master binlog。
Facebook 采用类似semi-sync的方式重构了mysqlbinlog用来替代semi-sync方式的slave机器,达到多份复制的目的。

"We extended mysqlbinlog to speak Semisync protocol. The reason of the enhancement is that we wanted to use "semisync mysqlbinlog" as a replacement of local semisync slaves. We usually run slaves on remote datacenters, and we don't always need local slaves to serve read requests / redundancy. On the other hand, as described at above "Requirements for Semisync Deployment" section, in practice at least two local semisync readers are needed to make semisync work. We didn't like to run additional two dedicated slaves per master just for semisync. So we invented semisync mysqlbinlog and use it instead of semisync slaves, as shown in the below figure."
Copy after login

news in  mysqlbinlog – Back Up Master Binary Log Files_MySQL

我们采用mysqlbinlog的这种方式备份多台master的binlog.配合MHA的异地binlog复制,以达到最小的数据丢失。

[root@pajk-super-master /usr/local/dbadmin/backup]#nohup python binlog_backup_main.py ps -ef | grep -i daemondbus1056 10 May06 ?00:00:00 dbus-daemon --systemroot 24010 326960 10:58 pts/000:00:00 binlog_backup_daemon allroot 24319 240100 10:59 pts/000:00:00 binlog_backup_daemon '10.0.128.115':'3306' root 24330 240100 10:59 pts/000:00:00 binlog_backup_daemon '10.0.128.116':'3306' root 24341 240100 10:59 pts/000:00:00 binlog_backup_daemon '10.0.128.117':'3306' [root@pajk-super-master /usr/local/dbadmin/backup]#ls -ltr /tmp/backup/binlog_backup/10.0.128.115.3306/total 250908-rw-r--r-- 1 root root 27732 May 13 10:12 mysql-bin.000001-rw-r--r-- 1 root root 1063490 May 13 10:12 mysql-bin.000002-rw-r--r-- 1 root root 126 May 13 10:12 mysql-bin.000003-rw-r--r-- 1 root root 143 May 13 10:12 mysql-bin.000005-rw-r--r-- 1 root root 14000 May 13 10:12 mysql-bin.000004-rw-r--r-- 1 root root 64918 May 13 10:12 mysql-bin.000006-rw-r--r-- 1 root root 1216094 May 13 10:12 mysql-bin.000007-rw-r--r-- 1 root root 143 May 13 10:12 mysql-bin.000008-rw-r--r-- 1 root root 183388823 May 13 10:12 mysql-bin.000009-rw-r--r-- 1 root root20839355 May 13 10:12 mysql-bin.000010-rw-r--r-- 1 root root50039255 May 13 10:12 mysql-bin.000011-rw-r--r-- 1 root root250816 May 13 11:00 mysql-bin.000012
Copy after login

同时MHA 0.56 开始支持从binlog server上恢复日志:

Binlog serverStarting from MHA version 0.56, MHA supports new section [binlogN]. In binlog section, you can define mysqlbinlog streaming servers. When MHA does GTID based failover, MHA checks binlog servers, and if binlog servers are ahead of other slaves, MHA applies differential binlog events to the new master before recovery. When MHA does non-GTID based (traditional) failover, MHA ignores binlog servers.
Copy after login
Below is an example configuration.manager_host$ cat /etc/app1.cnf [server default]# mysql user and passworduser=rootpassword=mysqlpass# working directory on the managermanager_workdir=/var/log/masterha/app1# manager log filemanager_log=/var/log/masterha/app1/app1.log# working directory on MySQL serversremote_workdir=/var/log/masterha/app1[server1]hostname=host1[server2]hostname=host2[server3]hostname=host3[binlog1]hostname=binlog_host1[binlog2]hostname=binlog_host2
Copy after login

REF:semi-synchronous-replication-at-facebook
https://code.google.com/p/mysql-master-ha/wiki/Configuration#Binlog_server

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the difference between master and host What is the difference between master and host Sep 28, 2023 pm 01:34 PM

The differences between master and host are: 1. Host can play the role of client or server, while master is the central server responsible for coordinating and managing other slave servers in a distributed system; 2. Host is an ordinary computer device, and master usually has Higher processing power and resources are used to process and distribute tasks, manage data, and maintain the stability of the entire system; 3. The host is a node in the network, and the master is the server that plays a core role in the distributed system.

What is the relationship between the domain name of the host and the IP address of the host? What is the relationship between the domain name of the host and the IP address of the host? Jan 14, 2021 pm 06:02 PM

The relationship between the host's domain name and the host's IP address is: one IP address corresponds to multiple domain names. The IP address uses a digital form to identify the host in the computer network, and the domain name uses a character form to identify the host in the computer network. In the Internet, one domain name can correspond to one IP address, but one IP address can be corresponding to multiple domain names.

Lenovo YOGA Portal mini host officially announced on July 27, released by ChinaJoy, with built-in 350W power supply Lenovo YOGA Portal mini host officially announced on July 27, released by ChinaJoy, with built-in 350W power supply Jul 23, 2024 pm 01:47 PM

According to news from this site on July 23, Lenovo’s YOGA Portal high-performance desktop computer, which has been exposed for a long time, is now confirmed to be officially released at ChinaJoy in Shanghai on July 27. It is claimed to be a mini host designed for professional AI creation. It is a performance master and an expert in AI creation of 3D digital people. The AI ​​virtual background is based on the on-site pictures provided by our friend @yuP in Shanghai. The volume of this small host is only 3.7L. It is made of anodized aluminum and is equipped with Intel Core. i7-14700 processor, equipped with 32GBDDR5 memory and 1TB solid state drive. YOGA Portal is both a host and an all-in-one AI creation machine. The high-performance host is combined with an algorithm-optimized camera to form an integrated solution. Just stand in front of the camera i.e.

MSI showcases MEG Vision MSI showcases MEG Vision Jun 09, 2024 am 11:15 AM

According to news from this site on June 5, MSI participated in the 2024 Taipei International Computer Show and showcased a new flagship gaming computer called MEGVisionXAI. This game console is an extension of the existing Vision series and uses a very eye-catching surround glass design, with internal components clearly visible. The most attractive part is that the front of the host is equipped with an oversized touch screen. MSI staff said that it can synchronize MSI’s exclusive AI applications to further enhance various AI functions. The relevant pictures attached to this site are as follows: MSI has not yet explained more details. From the pictures shared, you can see that a local AI chatbot is running on the screen. Users can interact with it and ask it to complete AI tasks and locate locally stored documents. wait. Source of the above picture:

what is mysql host name what is mysql host name Jul 20, 2023 am 11:37 AM

The mysql host name refers to the name or IP address used to identify and access the mysql database server. When building and maintaining the mysql server, in order to remotely access the database on the server, the user needs to know the host name of the mysql server and ensure that the server has been correctly Configuration and firewall settings, using the correct connection string can connect and access the mysql server in the programming language.

Cooler Master Sneaker Cooler Master Sneaker Feb 15, 2024 am 08:21 AM

This website reported on February 14th that Cooler Master had previously displayed a SneakerX shoe-shaped computer host, which imitated the appearance of sports shoes. The national bank price of the machine has now been released. This is a red and white sneaker PC host equipped with a mini-ITX motherboard, 850WSFX gold medal full-module power supply, 360 integrated water cooling, and a size of 650x306x348mm. This site found that the Chinese version of the machine is available in AMD and Intel versions: the AMD version is equipped with Ryzen 97950X3D processor + RX7900XTX graphics card, equipped with 64GBDDR56000MHz memory and 4TB PCIe4.0SSD, as well as Wi-Fi6E + Bluetooth 5.2 + wired network port . Intel

What are the ways to check the host name in Linux? What are the ways to check the host name in Linux? Jun 07, 2023 pm 06:03 PM

There are 10 ways to check the host name in Linux, which are: 1. Use hostnamectl; 2. Use hostname; 3. Use uname; 4. Use nmcli; 5. Use sysctl; 6. Use cat /etc/hostname; 7. Use cat /etc/hosts; 8. Through ProcFS; 9. Use nmtui; 10. View through /etc/sysconfig/network.

Computer host memory module installation guide Computer host memory module installation guide Jan 05, 2024 am 09:49 AM

When installing a memory stick, if it is installed upside down, not only will it not fit in, but it may even cause the motherboard and CPU to burn out. So how do you install the memory stick in the computer host from the front to the back? In fact, in order to distinguish the front from the back, the memory stick will have an asymmetrical one. slot. How to install the front and back of a memory stick in a computer host: Answer: Observe the notch on the gold finger of the memory stick, as shown in the picture. Align the notch with the protrusion on the motherboard memory socket and insert it. 1. In order to prevent users from confusing the front and back. 2. So the socket of the current memory module is asymmetrical. 3. It may appear in the left or right position. 4. When installing, we must first ensure that the interface of our memory module matches the motherboard. 5. After confirmation, find the memory slot on the motherboard and release the buckle at the location shown in the picture. 6. Break up

See all articles