應(yīng)用于DC1 -> DC2
公司主營業(yè)務(wù):網(wǎng)站設(shè)計(jì)制作、做網(wǎng)站、移動(dòng)網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭(zhēng)能力。創(chuàng)新互聯(lián)是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)推出上黨免費(fèi)做網(wǎng)站回饋大家。
或者 MySQL replication
DC2,接收端:
監(jiān)聽接口1234
nc -l 1234 | tar ixvf - 2> xtrabackup.log
root@python-develpment:/script/slave# nc -l 1234 | tar ixvf - 2> xtrabackup.log
DC1,發(fā)送端,備份端
innobackupex --defaults-file=/data/3308/my.cnf --user=root --password=123456 --stream=tar ./ | nc 192.168.134.130 1234
[root@mysql-master backup]# innobackupex --defaults-file=/data/3308/my.cnf --user=root --password=123456 --slave-info --stream=tar ./ | nc 192.168.134.130 1234
170619 16:57:07 [01] Streaming ./pcik_log_dep/t_redbag_get.frm to
170619 16:57:07 [01] ...done
170619 16:57:07 [01] Streaming ./pcik_log_dep/t_trade.frm to
170619 16:57:07 [01] ...done
170619 16:57:07 [01] Streaming ./pcik_log_dep/t_mail_del.frm to
170619 16:57:07 [01] ...done
170619 16:57:07 Finished backing up non-InnoDB tables and files
170619 16:57:07 [00] Streaming xtrabackup_slave_info
170619 16:57:07 [00] ...done
170619 16:57:07 [00] Streaming xtrabackup_binlog_info
170619 16:57:07 [00] ...done
170619 16:57:07 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '370373412'
xtrabackup: Stopping log copying thread.
.170619 16:57:07 >> log scanned up to (370373421)
170619 16:57:07 Executing UNLOCK TABLES
170619 16:57:07 All tables unlocked
170619 16:57:07 [00] Streaming ib_buffer_pool to
170619 16:57:07 [00] ...done
170619 16:57:07 Backup created in directory '/backup'
MySQL binlog position: filename 'mysql-bin.000017', position '4497'
MySQL slave binlog position: master host '127.0.0.1', filename 'mysql-bin.000028', position '154'
170619 16:57:07 [00] Streaming backup-my.cnf
170619 16:57:07 [00] ...done
170619 16:57:07 [00] Streaming xtrabackup_info
170619 16:57:07 [00] ...done
xtrabackup: Transaction log of lsn (370373412) to (370373421) was copied.
170619 16:57:07 completed OK!
出現(xiàn)completed OK! 代表備份完成