facebook对xtrabackup的优化整理


本文转载自:http://www.cnblogs.com/liuhao/p/3696994.html


facebook对xtrabackup的优化整理

1)Adding xtrabackup files
https://github.com/facebook/mysql-5.6/commit/6eb74f86e27410f1ad7bf3379ce15dbfc5687565
 
2)Integrate xtrabackup into tree
https://github.com/facebook/mysql-5.6/commit/74b6cc623dbdec113a735ce292c6bb364facd8ba
将xtrabackup和主干代码合并,相关改动加入#define XTRABACKUP保护;
 
3)Facebook changes to xtrabackup
https://github.com/facebook/mysql-5.6/commit/38d9cb38dc676e0484302963a6c8b38deb602840
主要还是一些编译相关的修改,并没有大的功能改进或增强;
 
4)xtrabackup: Do not FLUSH TABLES WITH READ LOCK on master
https://github.com/facebook/mysql-5.6/commit/58f3e1500a55751836ed7ea612314cb6955c099d
将option_no_lock默认值设成1,只在备库上执行mysql_lockall,主库不再执行FLUSH TABLES WITH READ LOCK操作。
 
5)Create xtrabackup_logfile in the supplied target_dir
https://github.com/facebook/mysql-5.6/commit/e8d01a8303d538f1c8f78a688098532870438af5
xtrabackup默认将log文件写入my.cnf文件中的tmpdir目录,由于logfile可能会特别大(如>10G),将其从tmpdir中移动到专门的xtrabackup_target_dir
 
6)Xtrabackup: Always use default error messages
https://github.com/facebook/mysql-5.6/commit/3bbd76e8085153f298a21a7eeb43b3f1d7ec8da3
 
7)Prevent xtrabackup apply-log disk-space bloat
https://github.com/facebook/mysql-5.6/commit/081830cd26a2b2ed5533fd09d750b4e4a27c06ee
针对innodb_file_per_table时大量的表(100000+)的恢复,每个表可能会比原表大1M,此commit修复了这个问题;
 
8)Fix error message segfault in xtrabackup.
https://github.com/facebook/mysql-5.6/commit/0e55b8beaf83a94d9d3c701dc4ab80447240a9fa
修复错误消息引起的段错误。
 
9)Adding first basic Xtrabackup test
https://github.com/facebook/mysql-5.6/commit/a292cf01084527dae3542a7ff2cd4ff89e9500dd
10)Add xtrabackup tests on core functionality
https://github.com/facebook/mysql-5.6/commit/27244fc5e4723df5d166ef1502d5c256284fdd2d
11)Improve xtrabackup test to setup replication
https://github.com/facebook/mysql-5.6/commit/aa326937ce0fed78bb8b980f84cf184c0b4e3dfd
以上3个都是为xtrabackup增加的测试用例。
 
12)Add fix for deleted tablespaces in xtrabackup apply log
https://github.com/facebook/mysql-5.6/commit/a57575aa72b5369292dc7b6ca6d220e685a6341c
解决xtrabackup在最后阶段可能hang住的问题,这个问题的原因是一些之前存在的ibd文件打开失败;
 
13)XtraBackup: Prevent indefinite sleep
https://github.com/facebook/mysql-5.6/commit/01bac2798b4d0147526c19f9c47ac13bcff545a2
解决apply log阶段,由于recv_sys->n_addrs不为0导致的sleep forever问题;
 
14)Make xtrabackup handle O_DIRECT_NO_FSYNC option
https://github.com/facebook/mysql-5.6/commit/bf1b321d2c022adf54874b0697bc14fe97bee9e6
使得xtrabackup能够处理O_DIRECT_NO_FSYNC选项
 
15)Added more tests for xtrabackup
https://github.com/facebook/mysql-5.6/commit/7b4f2bd553078280808bececf81c758035dca0ea
针对xtrabackup增加更多的测试用例,主要是备份压缩表和分区表;
 
16)Increase timeout for replication sync in xtrabackup tests
https://github.com/facebook/mysql-5.6/commit/0d304b15988146200e4d05a4c391cf4b205c2562
测试xtrabackup可以处理replication sync timeout
 
17)Add GTID support in xtrabackup
https://github.com/facebook/mysql-5.6/commit/32e03708f82bed2226a626e5b94a010ed8001951
使得xtrabackup支持gtid;
 
18)Don't use O_DIRECT for xtrabackup_logfile
https://github.com/facebook/mysql-5.6/commit/0765272b6d8ad8f28a24b47d57d535a7853ebfe6
 
19)xtrabackup: Use "RelWithDebInfo" cmake build type, not "Release".
https://github.com/facebook/mysql-5.6/commit/bf01618449b151fcf467474dcd45af277180f035
 
20)Add -Wall -Werror to xtrabackup's mysql build too
https://github.com/facebook/mysql-5.6/commit/9581040c7dd4cff694fe97ea22d56bf77bf314f2
 
21)Update xtrabackup.xb_gtid test to work again
https://github.com/facebook/mysql-5.6/commit/9ac78cd929abbbea9f0b3c8e9a5e8b1666b21fbd

注:近期参加MySQL运维学习,老师推荐该文章作为学习和技术提高的扩展阅读,先记录到自己的博客中,随后慢慢消化、学习、提高。本文章与“备份恢复”主题相关


你可能感兴趣的:(mysql,备份)