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. Altium_Designer-PCB中布局元器件时的翻转问题

    这个问题是我在第一次对PCB元器件布局时发现的,当时我绘制好原理图生成PCB后,出现了这样一个情况: 在我反复尝试走线后,走好线发现很困难,最后我才想到如果能把这个器件反转一下问题不就都解决了吗!自己 ...

  2. DFS剪枝,最大团,POJ(1419)

    题目链接:http://poj.org/problem?id=1419 题目大意:一个无向图,用黑白涂色,相邻的两个点不能图同一种颜色,求黑色的点最多有几个? 刚一看题,完全是图的m着色问题啊,我就套 ...

  3. 解方程求PH值,POJ(2006)

    题目链接:http://poj.org/problem?id=2006 解题报告: 题意看了半天,没看懂,再加上化学没学好,更加让我头痛. 假设1L溶解了x摩尔的酸:ka=m*x*nx/ori-x; ...

  4. EF问题集合

    1. 在使用数据迁移的过程中,如果手工删除了本地数据库之后,再次尝试连接被删除的数据库,会有以下提示: System.Data.SqlClient.SqlException (0x80131904): ...

  5. java后台导出pdf

    新页面打开wpf @RequestMapping("/showPdf") public String getpic( HttpServletRequest request, Htt ...

  6. 小程序weapp的状态管理 Wenaox

    Wenaox wechat state management 特点 支持中间件 中大型项目可多个 contro 区分模块 asyncs 自带 loading 轻量.性能好 安装 npm i -S we ...

  7. 3.2.5 Magic Squares 魔板

    3.2.5 Magic Squares 魔板 成功地发明了魔方之后,鲁比克先生发明了它的二维版本,称作魔板.这是一张有8个大小相同的格子的魔板: 1 2 3 4 8 7 6 5 我们知道魔板的每一个方 ...

  8. Shell学习——终端打印

    1.echo1.1.默认情况下,echo在每次调用后会添加一个换行符1.2.待打印的内容,可以用单引号.双引号或者直接打印,不同的方式,有各自的限制1.2.1.使用不带引号的echo时,没法打印分好( ...

  9. ethereum(以太坊)(十三)--异常处理/元祖

    pragma solidity ^0.4.4; contract Students{ uint[] data= new uint[](4); address _owner = msg.sender; ...

  10. InteliJ IDEA 设置eclipse快捷键

    从使用eclipse切换到intellij idea开发工具常常会伴随这快捷切换的困扰,今天写到将intellij idea快捷键设置为eclipse快捷的方式 步骤如下: file -> se ...