?????????????????????
?????з??? 102 ???????е?????
??????? 102 MySQL ????????? PROCESS LIST??MASTER STATUS?????????????????????????? 102 ????????
????104 ??? MySQL ?????????????? MySQL ??????????????????? mv ?????????????????????????????? 104?????δ??????
?????? 102 ?????? mysql ????????? rsync ?????? 104??
???????????????? 101 ?????? 104 ????? binlog ??????REPLICATION SLAVE?? REPLICATION CLIENT????
????????????????? 104 ????????е? server_id???????? 102 ?????£?
?????? 104 ??? MySQL ????????????????е????????·?????????????????
???????? 104 MySQL ???????? SHOW SLAVE STATUS ???????????????? Seconds_Behind_Master ??????
????Seconds_Behind_Master ??? 0 ????????????????????? pt-table-checksum ??? 101 ?? 104 ????????£??????????????????????????????????????????????????????
????????????????????????????????????????????????????????
???????з?Э???????? 102 ??????????е? 104??
???????? 102 ????????? 103 ??? 101 ?????????????
???????????????????????????????? 104 ??? 103 ????
????104 STOP SLAVE??
????103 STOP SLAVE IO_THREAD;
????103 STOP SLAVE SQL_THREAD????? MASTER_LOG_FILE ?? MASTER_LOG_POS??
????104 START SLAVE UNTIL ?????? MASTER_LOG_FILE ?? MASTER_LOG_POS??
????104 ??? STOP SLAVE??
????104 RESET SLAVE ALL ???????????????
????103 SHOW MASTER STATUS????? MASTER_LOG_FILE ?? MASTER_LOG_POS??
????103 ????? 104 ???? binlog ??????
????104 CHANGE MASTER TO 103??
????104 ???? MySQL????? RESET SLAVE ALL ???? SLAVE STATUS??Master_Server_Id ???? 101???????? 103??
????104 MySQL ?????SLAVE ??????????????? IO_THREAD ?? SQL_THREAD ???? YES??
????103 START SLAVE??
????????? 103 ?? 104 ????????????????? 104 ?? 101 ?????????? 103 ????????
????????????????? 103 ?? 101 ??????????
???????????????裬??????з?Э?????? 101 ???д????л? 102????????е? 104??????????????? 101 ?? 103 ??????д???????? 101 ?????д?????????е? 103????????? FLUSH TABLES WITH READ LOCK ??? 101?????????е? 103????????????????У??м??
?????л???????????????
???????????????????????????
????3.5 ?????? ?????????????
??????????????????????????????????????????????????????????????????????????????????д???????????????????? A ???????????滻??????????? 1.101 ????? 1.102 ????????μ???? 1.103 ?? 1.104??1.103 ???????1.104 ??????B ??? 2.101 ?? 2.102 ????????????????1.103 ?? 2.101 ????????????????塣??????????????????д???????滻??????????????н????????


??????? ????????????????

????????????????£?
????1.103 ?? 1.104 ??????????????????????????????????????
??????? 1.102 MySQL ????????? PROCESS LIST????????? MASTER STATUS ????仯???????????????????????? 1.102 ????????
????1.103 ??? MySQL ?????????????? MySQL ??????????????????? mv ????????????????
?????? 1.102 ?????? mysql ????????? rsync ?????? 1.103??
???????????????? 1.101 ?????? 1.103 ????? binlog ??????REPLICATION SLAVE?? REPLICATION CLIENT????
????????????????? 1.103 ????????е? server_id???????? 1.102 ?????£?
?????? 1.103 ??? MySQL ????????????????е????????·?????????????????
???????? 1.103 MySQL ???????? SHOW SLAVE STATUS ???????????????? Seconds_Behind_Master ??????
????Seconds_Behind_Master ??? 0 ????????????????????? pt-table-checksum ??? 1.101 ?? 1.103 ????????£??????????????????????????????????????????????????????
???????????????????? 1.104 ??? 1.103 ????
???????з??????????????????????????????????????????????????????????
????????????????????? 1.103 ??? 2.101 ?????????????????ο????????
??????????????1.103 ??????????????? 1.101 ??£?
???????????????裬??????з?Э?????? 1.101 ???д????е? 1.103???? 1.102 ???????е? 1.104????????????
???????????????????????????
????3.6 ?????? ?????????????
????????????????????????????????????????????????????????????ο?????????????????????????????????? 2.117 ????? 7938 ?? 7939 ??????滻??????????????????????????Щ????? A ??д???Щ????? B ??д??????????????????????


??????? ????????????????

????????????????£?
????1.113 ??? 7936 ?????? innobackupex ??????????????????????????????? slave-info ??????
?????????????????????????? 2.117??
????2.117 ?????????????????????漰?????????
????2.117 ??? innobackupex ????????
????2.117 ??? innobackupex ?????????
????2.117 ??????????????????2?????replicate-ignore-db??innodb_file_per_table = 1??read_only = 1?? server_id??
????2.117 ??????????????
????1.112 ?????? 2.117 ????? binlog ??????REPLICATION SLAVE?? REPLICATION CLIENT????
????2.117 CHANGE MASTE TO 1.112??LOG FILE ?? LOG POS ?ο? xtrabackup_slave_info??
????2.117 START SLAVE???????????
????2.117 ????? 7939 ??????????????????????????? replicate-wild-do-table??
?????????????????????????????????????????????????????????
???????????????裬??????з?Э???????????????? 2.117 ?? 7938 ????? 7939 ???????????????
???????????????????????????
??????????????
??????????????????????????????????????
?????????????????漰?????????????? event_scheduler ??????
???????????????μ????????????????????????????????????綶???????????????????????????????
????CHANGE MASTER TO ?? LOG FILE ?? LOG POS ?м??????????????????????????????????????????????????
??????н??????? $HOME ?????????????????
????????????????y??????????????????ū???????κν??????????????
???????????????????????У???????????????嶼????????
??????????????£???? MySQL ???? mysqladmin ?????????????????????????????
????????e? read_only = 1 ?????????????????
???????????? server_id ?????????£?????????????????????
??????????? replicate-ignore-db ?? replicate-wild-do-table??
??????????????e? innodb_file_per_table ????? 1???????е????????????????????????? 0?????? ibdata1 ???????????????????????
??????? gzip ????????????????????gzip ????????????
???????е?????????????????????????????????????????????????崻???
????xtrabackup ??????????? InnoDB ??????????? MyISAM ????????????????ü???μ????????????????? MyISAM ?洢??????????У???????????????????? Engine??
?????塢 ????
?????? MySQL ??????У?????????????????
?????κ???? LOG FILE ?? relay_master_log_file????????? master ??? binlog ???????????LOG POS ?? exec_master_log_pos???????????? binlog ????? POS ??????
??????? rsync ??????????????? expect??nohup ?????????????
????????? innobackupex ?????????????????? gzip ?????????
????????? innobackupex ???????????????? –slave-info ???????????????
????????? innobackupex ???????????????? –throttle ?????????? IO??????????????????????? –parallel=n ??????????????????????????? tar ???????–parallel ??????Ч??
?????????????????????????????????и??嵥????????????????????е??????????????
??????????????????У??и?????????????? rsync?????????2?????-avhW –no-compress –progress??
???????????????????????????????? dd???????????????????????????????????????????????????и???????????????
?????? ?????
???????????????????????????????????????????????????μ??????????????????????????????ɡ???????????????????
??????????????????????????????????У?
??????????????????????????????????????????????????????????????????????
??????????????л?????????? MySQL ????????????????????????????????д??????????????????????????????????????????
????????????????????У?????ο??????????·?????????????????????????????У??????????????С?
?????????????????????????????????????????ж?????????????С???