No downtime Xtrabackup creating slave nodes

Source: Internet
Author: User
Tags crc32
Complete the Basic Environment configuration of the slave node: Create mysql users, install mysql software of the same version, xtrabackup software package, create directories, and configure scripts.

Complete the Basic Environment configuration of the slave node: Create mysql users, install mysql software of the same version, xtrabackup software package, create directories, and configure scripts.

Master: 10.1.1.17: 3306
Slave: 10.1.1.18: 3307
Complete the Basic Environment configuration of the slave node: Create mysql users, install mysql software of the same version, xtrabackup software package, create directories, and configure scripts.

1. Create a full backup: master
[Mysql @ master1 backup] $ innobackupex -- defaults-file =/data/mysqldata/3306/my. cnf -- user = xtrabk -- password = 'onlybackup '/backup/backup_full/

2. Copy and prepare backup Sets
[Mysql @ master1 backup_full] $ scp-r/backup/backup_full/2015-05-21_01-31-19/* 10.1.1.18:/data/mysqldata/3307
[Mysql @ master2 3307] $ innobackupex -- apply-log/data/mysqldata/3307/data/

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003,200 9 Innobase Oy
And Percona Ireland Ltd 2009-2012. All Rights Reserved.

This software is published under
The gnu general public license Version 2, June 1991.

IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
Prints "completed OK! ".

150521 01:51:29 innobackupex: Starting ibbackup with command: xtrabackup_56 -- defaults-file = "/data/mysqldata/3307/data/backup-my.cnf" -- defaults-group = "mysqld" -- prepare -- target-dir =/data/mysqldata/3307/ data -- tmpdir =/tmp

Xtrabackup_56 version 2.0.7 for MySQL server 5.6.10 Linux (x86_64) (revision id: 552)
Xtrabackup: cd to/data/mysqldata/3307/data
Xtrabackup: This target seems to be not prepared yet.
Xtrabackup: xtrabackup_logfile detected: size = 2097152, start_lsn = (1645755)
Xtrabackup: Temporary instance for recovery is set as followings.
Xtrabackup: innodb_data_home_dir = ./
Xtrabackup: innodb_data_file_path = ibdata1: 2048 M: autoextend
Xtrabackup: innodb_log_group_home_dir = ./
Xtrabackup: innodb_log_files_in_group = 1
Xtrabackup: innodb_log_file_size = 2097152
Xtrabackup: Temporary instance for recovery is set as followings.
Xtrabackup: innodb_data_home_dir = ./
Xtrabackup: innodb_data_file_path = ibdata1: 2048 M: autoextend
Xtrabackup: innodb_log_group_home_dir = ./
Xtrabackup: innodb_log_files_in_group = 1
Xtrabackup: innodb_log_file_size = 2097152
Xtrabackup: Starting InnoDB instance for recovery.
Xtrabackup: Using 104857600 bytes for buffer pool (set by -- use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: CPU supports crc32 instructions
InnoDB: Initializing buffer pool, size = 100.0 M
InnoDB: Completed initialization of buffer pool
InnoDB: Highest supported file format is Barracuda.
InnoDB: The log sequence numbers 1639650 and 1639650 in ibdata files do not match the log sequence number 1645755 in the ib_logfiles!
InnoDB: 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: Last MySQL binlog file position 0 812, file name mysql-bin.000011
InnoDB: 128 rollback segment (s) are active.
InnoDB: Waiting for purge to start
2015-05-21 01:51:31 4a924940 InnoDB: Warning: table 'mysql/innodb_index_stats'
InnoDB: in InnoDB data dictionary has unknown flags 50.
2015-05-21 01:51:31 4a924940 InnoDB: Warning: table 'mysql/innodb_table_stats'
InnoDB: in InnoDB data dictionary has unknown flags 50.
InnoDB: 1.2.10 started; log sequence number 1645755

[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 812, file name mysql-bin.000011

Xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 1645779

150521 01:51:33 innobackupex: Restarting xtrabackup with command: xtrabackup_56 -- defaults-file = "/data/mysqldata/3307/data/backup-my.cnf" -- defaults-group = "mysqld" -- prepare -- target-dir =/data/mysqldata/3307/ data -- tmpdir =/tmp
For creating ib_logfile *

Xtrabackup_56 version 2.0.7 for MySQL server 5.6.10 Linux (x86_64) (revision id: 552)
Xtrabackup: cd to/data/mysqldata/3307/data
Xtrabackup: This target seems to be already prepared.
Xtrabackup: notice: xtrabackup_logfile was already used to '-- prepare '.
Xtrabackup: Temporary instance for recovery is set as followings.
Xtrabackup: innodb_data_home_dir = ./
Xtrabackup: innodb_data_file_path = ibdata1: 2048 M: autoextend
Xtrabackup: innodb_log_group_home_dir = ./
Xtrabackup: innodb_log_files_in_group = 3
Xtrabackup: innodb_log_file_size = 268435456
Xtrabackup: Temporary instance for recovery is set as followings.
Xtrabackup: innodb_data_home_dir = ./
Xtrabackup: innodb_data_file_path = ibdata1: 2048 M: autoextend
Xtrabackup: innodb_log_group_home_dir = ./
Xtrabackup: innodb_log_files_in_group = 3
Xtrabackup: innodb_log_file_size = 268435456
Xtrabackup: Starting InnoDB instance for recovery.
Xtrabackup: Using 104857600 bytes for buffer pool (set by -- use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: CPU supports crc32 instructions
InnoDB: Initializing buffer pool, size = 100.0 M
InnoDB: Completed initialization of buffer pool
InnoDB: Setting log file./ib_logfile101 size to 256 MB
InnoDB: Progress in MB: 100 200
InnoDB: Setting log file./ib_logfile1 size to 256 MB
InnoDB: Progress in MB: 100 200
InnoDB: Setting log file./ib_logfile2 size to 256 MB
InnoDB: Progress in MB: 100 200
InnoDB: Renaming log file./ib_logfile101 to./ib_logfile0
InnoDB: New log files created, LSN = 1645779
InnoDB: Highest supported file format is Barracuda.
InnoDB: 128 rollback segment (s) are active.
InnoDB: Waiting for purge to start
2015-05-21 01:52:00 4a5b4940 InnoDB: Warning: table 'mysql/innodb_index_stats'
InnoDB: in InnoDB data dictionary has unknown flags 50.
2015-05-21 01:52:00 4a5b4940 InnoDB: Warning: table 'mysql/innodb_table_stats'
InnoDB: in InnoDB data dictionary has unknown flags 50.
InnoDB: 1.2.10 started; log sequence number 1646092

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.