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. C4C销售订单中业务伙伴的自动决定功能Partner determination procedure

    例子:我新建一个Sales Order,account 字段选择ID为1001的Account:Porter LLC 创建成功后,观察这个Sales Order的Involved Party里,Bil ...

  2. TeXstudio安装后提示no LaTeX distribution found on this system

    应该是设置一下用户变量,而非系统变量,用TeXLive 2015和MikTeX都不好使,最后设置了用户变量好使了 S:\TeX\MiKTeX 2.9\miktex\bin\x64\ 也是醉醉的 不过等 ...

  3. testng失败重跑

    重跑失败场景 1.要添加两个文件 背景:因为这里只是想单独展示失败的重跑的案例,所以先暂时把app这块的运行注释掉,只跑一个简单的demo,就一个简单类,类中就3个测试方法,失败重跑的原理是,运行方法 ...

  4. VPS 运行 Node.js 的一些经验

    VPS 系统选择 各系统安装难易对比 Ubuntu.Debian 较为简单,CentOS 稍麻烦,32位系统比64位更节省内存 DigitalOcean 甚至推出了 Ubuntu + Node.js ...

  5. python2.7 加密模块 解决各种坑

    1 Python27 安装crypto Windows安装 在Windows上安装的时候直接 pip install pycrypto会报错,参考:http://blog.csdn.net/teloy ...

  6. logistic regression (逻辑回归) 概述

    :http://hi.baidu.com/hehehehello/blog/item/0b59cd803bf15ece9023d96e.html#send http://en.wikipedia.or ...

  7. Linux驱动学习(编写一个最简单的模块)

    在Linux中想做驱动开发,那么一定要先熟悉module的使用和编写 一.什么是module 从名字上看就是模块的意思,我个人的理解就是一个一个的小程序,可以进行动态的安装和卸载,而在这里面就实现一些 ...

  8. 当Java遇见了Html--Jsp九大内置对象篇

    jsp内置对象对象是web容器创建的一组对象,不使用new关键词久可以使用的内置对象. 九大内置对象包括以下: out --JspWriter request --ServletRequest rep ...

  9. 开发必看 | iOS开发常用设计模式!

    ios开发学习中,经常弄不清楚ios的开发模式,今天我们就来进行简单的总结和探讨~(一)代理模式 应用场景:当一个类的某些功能需要由别的类来实现,但是又不确定具体会是哪个类实现.优势:解耦合敏捷原则: ...

  10. jquery操作DOM 元素(3)

    .detach() 从DOM 中去掉所匹配的元素. .detach([selector]) selector 一个选择表达式将需要移除的从匹配的元素中过滤出来. $("p").de ...