Preface
 
    Today I'm gonna test how to rescue a dropped table from binlog server based on a full Xtrabackup backup set.
 
Framework
 
Hostname IP/Port Identity OS Version MySQL Version GTID Mode Binlog Format
zlm1 192.168.56.100/3306 master CentOS 7.0 5.7.21 on row
zlm2 192.168.56.101/3306 slave CentOS 7.0 5.7.21 on row
zlm3 192.168.56.102/3306 binlog server CentOS 7.0 5.7.21 on row
 
Precedure
 
Step 1: Create binlog server.
 
Check the position on master 
 zlm@192.168.56.100: [sysbench]>show master status;
+------------------+----------+--------------+------------------+-------------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------------------------------------+
| mysql-bin. | | | | 2a4b3562-2ab6-11e8-be7a-080027de0e0e:- |
+------------------+----------+--------------+------------------+-------------------------------------------------+
row in set (0.00 sec)
Make binlog server begin to receive binlog.
 [root@zlm3 :: /data]
#mysqlbinlog -R --raw -h192.168.56. -urepl -prepl4slave -P3306 --stop-never mysql-bin. &
[]
mysqlbinlog: [Warning] Using a password on the command line interface can be insecure. [root@zlm3 :: /data]
#ls -l
total
drwxr-xr-x mysql mysql Jun : backup
drwxr-xr-x mysql mysql Mar : mysql
-rw-r----- root root Jul : mysql-bin.
Flush two logs on master.
 zlm@192.168.56.100: [sysbench]>flush logs;
Query OK, rows affected (0.06 sec) zlm@192.168.56.100: [sysbench]>flush logs;
Query OK, rows affected (0.01 sec) zlm@192.168.56.100: [sysbench]>show master status;
+------------------+----------+--------------+------------------+-------------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------------------------------------+
| mysql-bin. | | | | 2a4b3562-2ab6-11e8-be7a-080027de0e0e:- |
+------------------+----------+--------------+------------------+-------------------------------------------------+
row in set (0.00 sec)
Check whether the newly generated binlogs are successfully transmited to binlog server.
 [root@zlm3 :: /data]
#ls -l
total
drwxr-xr-x mysql mysql Jun : backup
drwxr-xr-x mysql mysql Mar : mysql
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.
Step 2: Destroy the table.
 
Check target table on master.
 zlm@192.168.56.100: [sysbench]>show tables;
+--------------------+
| Tables_in_sysbench |
+--------------------+
| sbtest1 |
| sbtest2 |
| sbtest3 |
| sbtest4 |
| sbtest5 |
| sbtest6 |
+--------------------+
rows in set (0.00 sec) zlm@192.168.56.100: [sysbench]>select count(*) from sbtest6;
+----------+
| count(*) |
+----------+
| |
+----------+
row in set (0.00 sec) zlm@192.168.56.100: [sysbench]>insert into sbtest6 values(,,'a','b');
Query OK, row affected (0.00 sec) zlm@192.168.56.100: [sysbench]>select * from sbtest6;
+----+---+---+-----+
| id | k | c | pad |
+----+---+---+-----+
| | | a | b |
+----+---+---+-----+
row in set (0.00 sec)
Generate Xtrabackup backup set.
 [root@zlm1 :: ~]
#innobackupex --defaults-file=/data/mysql/mysql3306/my3306.cnf -uroot -pPassw0rd /data/backup
:: innobackupex: Error: extra argument found -pPassw0rd
:: innobackupex: Error: extra argument found /data/backup [root@zlm1 :: ~]
#innobackupex -v
innobackupex version 2.4. Linux (x86_64) (revision id: df58cf2) [root@zlm1 :: ~]
#innobackupex --defaults-file=/data/mysql/mysql3306/my3306.cnf --user=root --password=Passw0rd /data/backup
:: innobackupex: Starting the backup operation
... :: Backup created in directory '/data/backup/2018-07-29_16-32-33'
MySQL binlog position: filename 'mysql-bin.000100', position '', GTID of the last change '2a4b3562-2ab6-11e8-be7a-080027de0e0e:1-12715694'
:: [] Writing backup-my.cnf
:: [] ...done
:: [] Writing xtrabackup_info
:: [] ...done
xtrabackup: Transaction log of lsn () to () was copied.
:: completed OK!
Insert one record of "sbtest6" and drop it.
 zlm@192.168.56.100: [sysbench]>insert into sbtest6 values(,,'c','d');
Query OK, row affected (0.00 sec) zlm@192.168.56.100: [sysbench]>show master status;
+------------------+----------+--------------+------------------+-------------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------------------------------------+
| mysql-bin. | | | | 2a4b3562-2ab6-11e8-be7a-080027de0e0e:- |
+------------------+----------+--------------+------------------+-------------------------------------------------+
row in set (0.00 sec) zlm@192.168.56.100: [sysbench]>drop tables sbtest6;
Query OK, rows affected (0.02 sec) zlm@192.168.56.100: [sysbench]>show master status;
+------------------+----------+--------------+------------------+-------------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------------------------------------+
| mysql-bin. | | | | 2a4b3562-2ab6-11e8-be7a-080027de0e0e:- |
+------------------+----------+--------------+------------------+-------------------------------------------------+
row in set (0.00 sec)
Shutdown the mysqld on master(mimic the MySQL instance down).
 [root@zlm1 :: /data/backup]
#mysqladmin shutdown [root@zlm1 :: /data/backup]
#ps aux|grep mysqld
mysql 0.0 20.7 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm1 :: /data/backup]
#ps aux|grep mysqld
mysql 0.0 20.1 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm1 :: /data/backup]
#mysqladmin shutdown
mysqladmin: connect to server at '192.168.56.100' failed
error: 'Can't connect to MySQL server on '192.168.56.100' ()'
Check that mysqld is running on 192.168.56.100 and that the port is .
You can check this by doing 'telnet 192.168.56.100 3306' [root@zlm1 :: /data/backup]
#ps aux|grep mysqld
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld
Copy backup set to zlm2.
 [root@zlm1 :: ~]
#cd /data/backup/ [root@zlm1 :: /data/backup]
#ls -l
total
drwxr-x--- root root Jul : --29_16-- [root@zlm1 :: /data/backup]
#scp -r --29_16-- zlm2:/data/backup
xtrabackup_logfile % .5KB/s :
ibdata1 % 100MB .0MB/s :
... //Omitted.
Step 3: Rescue data.
 
Prepare to restore the backup with "--apply-log" on zlm2.
 [root@zlm2 :: /data/backup]
#ls -l
total
drwxr-x--- root root Jul : --29_16-- [root@zlm2 :: /data/backup]
#innobackupex -v
xtrabackup: recognized server arguments: --datadir=/var/lib/mysql
innobackupex version 2.4. Linux (x86_64) (revision id: 170eb8c) [root@zlm2 :: /data/backup]
#innobackupex --defaults-file=/data/mysql/mysql3306/my3306.cnf -uroot -pPassw0rd --apply-log /data/backup/--29_16--/
... //Omitted. xtrabackup: starting shutdown with innodb_fast_shutdown =
InnoDB: page_cleaner: 1000ms intended loop took 8812ms. The settings might not be optimal. (flushed= and evicted=, during the time.)
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number
:: completed OK!
Shutdown instance and copy back.
 [root@zlm2 :: /data/backup]
#ps aux|grep mysqld
mysql 0.0 18.7 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm2 :: /data/backup]
#mysqladmin shutdown [root@zlm2 :: /data/backup]
#ps aux|grep mysqld
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm2 :: /data/backup]
#cd /data/mysql/mysql3306/data/ [root@zlm2 :: /data/mysql/mysql3306/data]
#rm -rf * [root@zlm2 :: /data/mysql/mysql3306/data]
#cd ../logs [root@zlm2 :: /data/mysql/mysql3306/logs]
#rm -rf * [root@zlm2 :: /data/mysql/mysql3306/logs]
#innobackupex --defaults-file=/data/mysql/mysql3306/my3306.cnf -uroot -pPassw0rd --copy-back /data/backup/--29_16--/
... //Omitted.
Restart instance and check table.
 [root@zlm2 :: /data/mysql/mysql3306/logs]
#cd ../data [root@zlm2 :: /data/mysql/mysql3306/data]
#chown -R mysql.mysql * [root@zlm2 :: /data/mysql/mysql3306/data]
#sh /root/mysqld.sh [root@zlm2 :: /data/mysql/mysql3306/data]
#ps aux|grep mysqld
mysql 3.2 17.9 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm2 :: /data/mysql/mysql3306/data]
#mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. zlm@192.168.56.101: [(none)]>use sysbench
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
zlm@192.168.56.101: [sysbench]>show tables;
+--------------------+
| Tables_in_sysbench |
+--------------------+
| sbtest1 |
| sbtest2 |
| sbtest3 |
| sbtest4 |
| sbtest5 |
| sbtest6 |
+--------------------+
rows in set (0.00 sec) zlm@192.168.56.101: [sysbench]>select * from sbtest6;
+----+---+---+-----+
| id | k | c | pad |
+----+---+---+-----+
| | | a | b |
+----+---+---+-----+
row in set (0.00 sec)
Step 4: Implement a slave with binlog server.
 
Start mysqld on binlog server.
 [root@zlm3 :: /data/mysql/mysql3306/logs]
#ps aux|grep mysqld
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm3 :: /data/mysql/mysql3306/logs]
#sh /root/mysqld.sh [root@zlm3 :: /data/mysql/mysql3306/logs]
#ps aux|grep mysqld
mysql 16.5 15.6 pts/ Rl : : mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm3 :: /data/mysql/mysql3306/logs]
#ls -l
total
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.
-rw-r----- mysql mysql Jul : mysql-bin.
-rw-r----- mysql mysql Jul : mysql-bin.index [root@zlm3 :: /data/mysql/mysql3306/logs]
#cat mysql-bin.index
/data/mysql/mysql3306/logs/mysql-bin.
Disguise the binlog server is a fake master.
 [root@zlm3 :: /data/mysql/mysql3306/logs]
#rm -f mysql-bin.*
[]+ Done mysqlbinlog -R --raw -h192.168.56. -urepl -prepl4slave -P3306 --stop-never mysql-bin. (wd: /data)
(wd now: /data/mysql/mysql3306/logs) [root@zlm3 :: /data/mysql/mysql3306/logs]
#ls -l
total
-rw-r----- mysql mysql Jul : mysql-bin.index [root@zlm3 :: /data/mysql/mysql3306/logs]
#ps aux|grep mysqlbinlog
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqlbinlog [root@zlm3 :: /data/mysql/mysql3306/logs]
#cp /data/mysql-bin* . [root@zlm3 :: /data/mysql/mysql3306/logs]
#ls -l
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.
-rw-r----- root root Jul : mysql-bin.index [root@zlm3 :: /data/mysql/mysql3306/logs]
#ls - | awk '{print i$0}' i=`pwd`'/'|grep mysql-bin. > mysql-bin.index [root@zlm3 :: /data/mysql/mysql3306/logs]
#cat mysql-bin.index
/data/mysql/mysql3306/logs/mysql-bin.
/data/mysql/mysql3306/logs/mysql-bin.
/data/mysql/mysql3306/logs/mysql-bin. [root@zlm3 :: /data/mysql/mysql3306/logs]
#chown mysql.mysql * [root@zlm3 :: /data/mysql/mysql3306/logs]
#ls -l
total
-rw-r----- mysql mysql Jul : mysql-bin.
-rw-r----- mysql mysql Jul : mysql-bin.
-rw-r----- mysql mysql Jul : mysql-bin.
-rw-r----- mysql mysql Jul : mysql-bin.index
Change the server-uuid of binlog server to be equal with master.
 [root@zlm3 :: /data/mysql/mysql3306]
#cd ../data [root@zlm3 :: /data/mysql/mysql3306/data]
#cat auto.cnf
[auto]
server-uuid=e00ef9f5-6c4b-11e8--080027de0e0e [root@zlm3 :: /data/mysql/mysql3306/data]
#vim auto.cnf [root@zlm3 :: /data/mysql/mysql3306/data]
#cat auto.cnf
[auto]
server-uuid=2a4b3562-2ab6-11e8-be7a-080027de0e0e
Execute "change master to ... " on zlm2.
 zlm@192.168.56.101: [sysbench]>change master to \
-> master_host='192.168.56.102',\
-> master_port=,\
-> master_user='repl',\
-> master_password='repl4slave',\
-> master_auto_position=;
Query OK, rows affected, warnings (0.01 sec)
Start IO_Thread on zlm2.
 [root@zlm2 :: /data/backup/--29_16--]
#cat xtrabackup_binlog_info
mysql-bin. 2a4b3562-2ab6-11e8-be7a-080027de0e0e:- zlm@192.168.56.101: [sysbench]>reset master;
Query OK, rows affected (0.00 sec) zlm@192.168.56.101: [sysbench]>set @@global.gtid_purged='2a4b3562-2ab6-11e8-be7a-080027de0e0e:1-12715694';
Query OK, rows affected (0.00 sec) zlm@192.168.56.101: [sysbench]>start slave io_thread;
Query OK, rows affected (0.00 sec) zlm@192.168.56.101: [sysbench]>show slave status\G
*************************** . row ***************************
Slave_IO_State:
Master_Host: 192.168.56.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File:
Read_Master_Log_Pos:
Relay_Log_File: relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File:
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error: Got fatal error from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.'
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: e00ef9f5-6c4b-11e8--080027de0e0e
Master_Info_File: /data/mysql/mysql3306/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp: ::
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set: 2a4b3562-2ab6-11e8-be7a-080027de0e0e:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec)
    I was stucked here.Slave IO_Thread could not be started with 1236,although I had replaced the server-uuid and set the variable of gtid_purged.Only if the slave get binlog which contains the incremental data and start the slave SQL_Thread.We can get back our dropped table together with the modification on it.
 
Supplemented on July 31:
 
    The previous fault of 1236 was due to the wrong configuration of variable "gtid_purged".There were two individual gtids generated by the other masters with different uuid as bellow:
 
 
 
    Therefore,the configuration command should be executed like this:
 
 set @@global.gtid_purged='27af30ca-6800-11e8-ad7e-080027de0e0e:1,
2a4b3562-2ab6-11e8-be7a-080027de0e0e:-,
e00ef9f5-6c4b-11e8--080027de0e0e:';
    not merely set it like this:
 
 set @@global.gtid_purged='2a4b3562-2ab6-11e8-be7a-080027de0e0e:1-12715694';
    Eventually,In order to make the gtid more clear,I executed "reset master" on binlog server(zlm3) and then copyed those necessary binlogs which were transfered from original master.Further more,I changed back the uuid of zlm3.Because I found that there's no need to change it at all.
    The new procedure of demonstration was shown below:
 
 zlm@192.168.56.101: [(none)]>set @@global.gtid_purged='2a4b3562-2ab6-11e8-be7a-080027de0e0e:1-12715694';
Query OK, rows affected (0.00 sec) zlm@192.168.56.101: [(none)]>change master to master_host='192.168.56.102',master_port=,master_user='repl',master_password='repl4slave',master_auto_position=;
Query OK, rows affected, warnings (0.01 sec) zlm@192.168.56.101: [(none)]>start slave io_thread;
Query OK, rows affected (0.00 sec) zlm@192.168.56.101: [(none)]>show slave status\G
*************************** . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File:
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: e00ef9f5-6c4b-11e8--080027de0e0e //I changed back the uuid of zlm3 to its previous value.
Master_Info_File: /data/mysql/mysql3306/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 2a4b3562-2ab6-11e8-be7a-080027de0e0e:- //New gtid was received.
Executed_Gtid_Set: 2a4b3562-2ab6-11e8-be7a-080027de0e0e:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec) zlm@192.168.56.101: [sysbench]>start slave sql_thread until sql_before_gtids='2a4b3562-2ab6-11e8-be7a-080027de0e0e:12715696';
Query OK, rows affected (0.00 sec) zlm@192.168.56.101: [sysbench]>show slave status\G
*************************** . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File: mysql-bin.
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: SQL_BEFORE_GTIDS
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: e00ef9f5-6c4b-11e8--080027de0e0e
Master_Info_File: /data/mysql/mysql3306/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 2a4b3562-2ab6-11e8-be7a-080027de0e0e:-
Executed_Gtid_Set: 2a4b3562-2ab6-11e8-be7a-080027de0e0e:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec) zlm@192.168.56.101: [sysbench]>select * from sbtest6;
+----+---+---+-----+
| id | k | c | pad |
+----+---+---+-----+
| | | a | b |
| | | c | d |
+----+---+---+-----+
rows in set (0.00 sec) //The incremental data in "sbtest6" had been come again.It was okay this time.
Summary
  • Binlog server act as a master in this experiment.It can prevent data loss such as miss opeartion of dropping tables whenever the master crashes.
  • We can implement as many binlog servers as possible to continuously acquire the binlogs on different masters.
  • If the only purpose is to get back the dropping data,replication filter of "replicate_do_table" is not necessary.
  • The modification of "sever-uuid" is also neglectable operation.Each gtid contains a differten uuid is completely acceptable.It won't influence our replication except for a little bit complex in output.
 

利用binlog server及Xtrabackup备份集来恢复误删表(drop)的更多相关文章

  1. 基于Xtrabackup备份集来恢复某个误删除的表(drop)

      Preface       Yesterday,I've demonstratated how to rescue a droped and a truncated table based on ...

  2. Database基础(五):使用binlog日志、XtraBackup备份工具、MySQL AB复制

    一.使用binlog日志 目标: 利用binlog恢复库表,要求如下: 启用binlog日志 创建db1库tb1表,插入3条记录 删除tb1表中刚插入的3条记录 使用mysqlbinlog恢复删除的3 ...

  3. (4.10)mysql备份还原——利用binlog+全备恢复误删表【不推荐使用】

    关键误操作:mysql误删除 1.备份+binlog恢复数据 [1.1]场景:不小心误删除某张表 [1.2]解决方法:在另外一台机器,恢复全库+日志,然后导出删除的表,再插入会生产库. [1.3]案例 ...

  4. 基于mysqldump备份集来恢复某个误操作的表(drop,truncate)

      Preface       How to rescue a dropped or truncated table online?Dropping or truncating is ddl oper ...

  5. Oracle备份恢复之无备份情况下恢复undo表空间

    UNDO表空间存储着DML操作数据块的前镜像数据,在数据回滚,一致性读,闪回操作,实例恢复的时候都可能用到UNDO表空间中的数据.如果在生产过程中丢失或破坏了UNDO表空间,可能导致某些事务无法回滚, ...

  6. SQL Server 查看备份集元数据的 4 种方法。

    方法 1. restore labelonly 方法 2. restore headeronly 方法 3. restore filelistonly 方法 4. restore verifyonly ...

  7. Percona XtraBackup 备份原理说明【转】

    本文来自:http://mysql.taobao.org/monthly/2016/03/07/ 前言 Percona XtraBackup(简称PXB)是 Percona 公司开发的一个用于 MyS ...

  8. MySQL · 物理备份 · Percona XtraBackup 备份原理

    http://mysql.taobao.org/monthly/2016/03/07/ 前言 Percona XtraBackup(简称PXB)是 Percona 公司开发的一个用于 MySQL 数据 ...

  9. Percona XtraBackup 备份原理

    前言 Percona XtraBackup(简称PXB)是 Percona 公司开发的一个用于 MySQL 数据库物理热备的备份工具,支持 MySQl(Oracle).Percona Server 和 ...

随机推荐

  1. 硬件-ESP32S模块资料

    1.产品概述 ESP-32S WiFi 模块是由安信可科技自主设计研发,该模块核心处理器 ESP32提供了一套完整的802.11 b/g/n/e/i 无线局域网(WLAN)和蓝牙4.2解决方案,具有最 ...

  2. POJ-2155 Matrix---二维树状数组+区域更新单点查询

    题目链接: https://vjudge.net/problem/POJ-2155 题目大意: 给一个n*n的01矩阵,然后有两种操作(m次)C x1 y1 x2 y2是把这个小矩形内所有数字异或一遍 ...

  3. javaweb基础(39)_数据库连接池

    一.应用程序直接获取数据库连接的缺点 用户每次请求都需要向数据库获得链接,而数据库创建连接通常需要消耗相对较大的资源,创建时间也较长.假设网站一天10万访问量,数据库服务器就需要创建10万次连接,极大 ...

  4. javascript入门笔记4-数组

    1.数组 var arr=new Array(); var myarray= new Array(8); //创建数组,存储8个数据. 注意: 1.创建的新数组是空数组,没有值,如输出,则显示unde ...

  5. C#中datatable的用法/传数据

    在开发中,我们常用到表类型数据,不同于string,int....那么datatable类型如何定义呢,具体怎么使用呢,代码如下: namespace Common.Table { using Sys ...

  6. leetcode笔记(二)94. Binary Tree Inorder Traversal

    题目描述 (原题目链接) Given a binary tree, return the inorder traversal of its nodes' values. For example:Giv ...

  7. Python——字典

    字典是一种key-value 的 数据类型,使用就想我们上学用的字典.可以通过笔画,字母来查对应页的详细内容. 特性:1. 字典是无须的.(如果光打印字典里的字符串,那么排序不会按照顺序排,因为字典是 ...

  8. Linux进程通信之匿名管道

    进程间的通信方式 进程间的通信方式包括,管道.共享内存.信号.信号量.消息队列.套接字. 进程间通信的目的 进程间通信的主要目的是:数据传输.数据共享.事件通知.资源共享.进程控制等. 进程间通信之管 ...

  9. 申请qq第三方登录 http://www.php20.com/forum.php?mod=viewthread&tid=29 (出处: 码农之家)

    百度  qq互联  进入网站 按图中的步骤申请第三方登录即可 先申请成为开发者 审核通过后再继续操作 提交 后列表中会出现提交的申请. 状态为审核中,审核通过会得到下图. 点查看 红线后面就是appi ...

  10. JavaScript高级程序设计第三版.CHM【带实例】

    从驱动全球商业.贸易及管理领域不计其数的复杂应用程序的角度来看,说 JavaScript 已经成为当今世界上最流行的编程语言一点儿都不为过. JavaScript 是一种非常松散的面向对象语言,也是 ...