盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

详细说明MySQL PXC构建新节点只需IST传输的方法

时间:2025/3/15作者:未知来源:盾怪网教程人气:

[摘要]+----+-------+5 rows in set (0.00 sec)step4:将备份的数据传输到node241上并恢复:[root@zejin241 mysql]# innobackupe...
+----+-------+ 5 rows in set (0.00 sec)

step4:将备份的数据传输到node241上并恢复:

[root@zejin241 mysql]
# innobackupex --apply-log 2016-05-28_09-39-07/InnoDB Backup Utility v1.5.1-xtrabackup; 
Copyright 2003, 2009 Innobase Oyand Percona LLC and/or its affiliates 2009-2013. 
All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 
2, June 1991.Get the latest version of Percona XtraBackup, documentation, and help resources:percona.com 09:54:01 
innobackupex: Starting the apply-log operationIMPORTANT: Please check that the apply-log run completes successfully.      
At the end of a successful apply-log run innobackupex      
prints "completed OK!".160528 09:54:01 innobackupex: Starting ibbackup with 
command: xtrabackup --defaults-file="/home/mysql/2016-05-28_09-39-07/backup-my.cnf" --defaults-group="mysqld" --prepare 
--target-dir=/home/mysql/2016-05-28_09-39-07xtrabackup version 2.2.11 based on MySQL server 5.6.24 Linux (x86_64) 
(revision id: )xtrabackup: cd to /home/mysql/2016-05-28_09-39-07xtrabackup: This target seems to be not prepared yet.xtrabackup: 
xtrabackup_logfile detected: size=2097152, start_lsn=(1637591)xtrabackup: using the following InnoDB configuration for recovery:xtrabackup:  
innodb_data_home_dir = ./xtrabackup:  innodb_data_file_path = ibdata1:10M:autoextendxtrabackup:  innodb_log_group_home_dir = ./xtrabackup:  
innodb_log_files_in_group = 1xtrabackup:  innodb_log_file_size = 2097152xtrabackup: 
using the following InnoDB configuration for recovery:xtrabackup:  innodb_data_home_dir = ./xtrabackup:  
innodb_data_file_path = ibdata1:10M:autoextendxtrabackup:  innodb_log_group_home_dir = ./xtrabackup:  
innodb_log_files_in_group = 1xtrabackup:  
innodb_log_file_size = 2097152xtrabackup: Starting InnoDB instance for recovery.xtrabackup: 
Using 104857600 bytes for buffer pool (set by --use-memory parameter)InnoDB: Using atomics to ref count buffer pool 
pagesInnoDB: The InnoDB memory heap is disabledInnoDB: Mutexes and rw_locks use GCC atomic builtinsInnoDB: Memory barrier is not 
usedInnoDB: Compressed tables use zlib 1.2.3InnoDB: Using CPU crc32 instructionsInnoDB: Initializing buffer pool, 
size = 100.0MInnoDB: Completed initialization of buffer poolInnoDB: Highest supported file format is 
Barracuda.InnoDB: Log scan progressed past the checkpoint lsn 1637591InnoDB: Database was not shutdown 
normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...InnoDB: 
Restoring possible half-written data pages InnoDB: from the doublewrite buffer...InnoDB: Doing recovery: 
scanned up to log sequence number 1637598 (0%)InnoDB: Last MySQL binlog file position 0 2772, 
file name log_bin.000003InnoDB: 128 rollback segment(s) are active.InnoDB: Waiting for purge to startInnoDB: 5.6.24 started; 
log sequence number 1637598[notice (again)] If you use binary log and don't use any hack of group commit, 
the binary log position seems to be:InnoDB: Last MySQL binlog file position 0 2772, file name log_bin.000003xtrabackup: 
Recovered WSREP position: 6c86dc17-246f-11e6-9955-ae4d7e89eed2:8xtrabackup: starting shutdown
 with innodb_fast_shutdown = 1InnoDB: FTS optimize thread exiting.InnoDB: Starting shutdown...InnoDB: Shutdown completed; 
 log sequence number 1637608160528 09:54:03 innobackupex: Restarting xtrabackup with command: xtrabackup 
 --defaults-file="/home/mysql/2016-05-28_09-39-07/backup-my.cnf" --defaults-group="mysqld" --prepare 
 --target-dir=/home/mysql/2016-05-28_09-39-07for creating ib_logfile*xtrabackup version 2.2.11 based on MySQL server 5.6.24 
 Linux (x86_64) (revision id: )xtrabackup: cd to /home/mysql/2016-05-28_09-39-07xtrabackup: 
 This target seems to be already prepared.xtrabackup: notice: xtrabackup_logfile 
 was already used to '--prepare'.xtrabackup: using the following InnoDB configuration for recovery:xtrabackup:  
 innodb_data_home_dir = ./xtrabackup:  innodb_data_file_path = ibdata1:10M:autoextendxtrabackup:  
 innodb_log_group_home_dir = ./xtrabackup:  innodb_log_files_in_group = 2xtrabackup:  
 innodb_log_file_size = 50331648xtrabackup: using the following InnoDB configuration for recovery:xtrabackup: 
  innodb_data_home_dir = ./xtrabackup:  innodb_data_file_path = ibdata1:10M:autoextendxtrabackup:  
  innodb_log_group_home_dir = ./xtrabackup:  innodb_log_files_in_group = 2xtrabackup:  
  innodb_log_file_size = 50331648xtrabackup: Starting InnoDB instance for recovery.xtrabackup:
   Using 104857600 bytes for buffer pool (set by --use-memory parameter)InnoDB: 
   Using atomics to ref count buffer pool pagesInnoDB: 
   The InnoDB memory heap is disabledInnoDB: Mutexes and rw_locks use GCC atomic builtinsInnoDB: Memory barrier is not usedInnoDB: 
   Compressed tables use zlib 1.2.3InnoDB: Using CPU crc32 instructionsInnoDB: Initializing buffer pool, size = 100.0MInnoDB: 
   Completed initialization of buffer poolInnoDB: Setting log file ./ib_logfile101 size to 48 MBInnoDB: Setting log file ./ib_logfile1 
   size to 48 MBInnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0InnoDB: New log files created, 
   LSN=1637608InnoDB: Highest supported file format is Barracuda.InnoDB: 128 rollback segment(s) are active.InnoDB: 
   Waiting for purge to startInnoDB: 5.6.24 started; log sequence number 1637900[notice (again)] 
   If you use binary log and don't use any hack of group commit, the binary log position seems to be:InnoDB: 
   Last MySQL binlog file position 0 2772, file name log_bin.000003xtrabackup: 
   starting shutdown with innodb_fast_shutdown = 1InnoDB: FTS optimize thread exiting.InnoDB: Starting shutdown...InnoDB: 
   Shutdown completed; log sequence number 1637910160528 09:54:06 innobackupex: completed OK!
[root@zejin240 2016-05-28_09-39-07]# lltotal 176168-rw-r--r--. 
1 root root   
358 May 28 09:39 backup-my.cnf-rw-r-----. 
1 root root 77594624 May 28 09:54 ibdata1-rw-r--r--. 
1 root root 50331648 May 28 09:54 ib_logfile0-rw-r--r--. 
1 root root 50331648 May 28 09:54 ib_logfile1drwx------. 
2 root root   4096 May 28 09:39 mysqldrwxr-xr-x. 
2 root root   4096 May 28 09:39 performance_schema-rw-r--r--. 
1 root root    20 May 28 09:39 xtrabackup_binlog_info-rw-r--r--. 
1 root root    20 May 28 09:54 xtrabackup_binlog_pos_innodb-rw-r-----. 
1 root root    89 May 28 09:54 xtrabackup_checkpoints-rw-r--r--. 
1 root root    38 May 28 09:54 xtrabackup_galera_info-rw-r--r--. 
1 root root   635 May 28 09:39 xtrabackup_info-rw-r-----. 
1 root root 2097152 May 28 09:54 xtrabackup_logfiledrwx------. 
2 root root   4096 May 28 09:39 zejin

step5:找出Xid的位置

有两种方法

方法一:查看文件xtrabackup_galera_info

[root@zejin241 I6000]# cat xtrabackup_galera_info6c86dc17-246f-11e6-9955-ae4d7e89eed2:8

方法二:通过binlog位置来查找:

[root@zejin241 I6000]# cat xtrabackup_binlog_infolog_bin.000003 2772
即备份时的备份点位置为log_bin.000003 2772

我们再去主库查找此binlog对应的xid

[root@zejin240 I6000]# mysqlbinlog -vv log_bin.000003

关键词:详细说明MySQL PXC构建新节点只需IST传输的办法




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版