由于个人能力有限,文中可能存在错误,欢迎批评指正。
文章目录
innobackupex 备份日志及解析
# ------开始备份
180428 09:30:01 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
# ------检查版本
180428 09:30:01 version_check Connected to MySQL server
180428 09:30:01 version_check Executing a version check against the server...
180428 09:30:01 version_check Done.
180428 09:30:01 Connecting to MySQL server host: 127.0.0.1, user: root, password: set, port: 3306, socket: /mysql/data/mysql.sock
Using server version 5.5.18-rel23.0-log
/home/mysql/bin/innobackupex version 2.4.3 based on MySQL server 5.7.11 Linux (x86_64) (revision id: 6a46905)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /mysql/data
xtrabackup: open files limit requested 0, set to 51200
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:512M;ibdata2:512M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 4
xtrabackup: innodb_log_file_size = 536870912
# ------O_DIRECT,不使用缓存直接写入
xtrabackup: using O_DIRECT
InnoDB: Number of pools: 1
# ------redo 拷贝线程开启
180428 09:30:01 >> log scanned up to (1965766249)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 251 for slamdunk/backup_list, old maximum was 0
# ------ibd 拷贝线程开启
180428 09:30:02 [01] Streaming ./ibdata1
180428 09:30:02 >> log scanned up to (1965766249)
180428 09:30:03 >> log scanned up to (1965766249)
180428 09:30:04 >> log scanned up to (1965766249)
180428 09:30:05 >> log scanned up to (1965766249)
180428 09:30:06 >> log scanned up to (1965766249)
180428 09:30:07 >> log scanned up to (1965766249)
180428 09:30:08 [01] ...done
180428 09:30:08 [01] Streaming ./ibdata2
180428 09:30:08 >> log scanned up to (1965766249)
180428 09:30:09 >> log scanned up to (1965766249)
180428 09:30:10 >> log scanned up to (1965766249)
180428 09:30:11 >> log scanned up to (1965766249)
180428 09:30:12 >> log scanned up to (1965766249)
180428 09:30:13 [01] ...done
180428 09:30:13 [01] Streaming ./slamdunk/backup_list.ibd
180428 09:30:13 [01] ...done
180428 09:30:13 [01] Streaming ./slamdunk/backup_job.ibd
180428 09:30:13 [01] ...done
# ------ibp线程拷贝idb完成后,xtrabackup进程进入等待(redo 线程仍然继续拷贝)
180428 09:30:13 >> log scanned up to (1965766249)
# ------innobackupex 收到 xtrabackup 通知后,执行 FLUSH TABLES WITH READ LOCK (FTWRL),取得一致性位点,然后开始备份非InnoDB文件(包括frm、MYD、MYI、CSV、opt、par等)。
180428 09:30:14 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
180428 09:30:14 Executing FLUSH TABLES WITH READ LOCK...
180428 09:30:14 Starting to backup non-InnoDB tables and files
180428 09:30:14 [01] Streaming ./mysql/help_keyword.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/procs_priv.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/host.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/columns_priv.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/servers.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_topic.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_category.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_transition_type.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_name.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_category.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/ndb_binlog_index.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/proc.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/func.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_transition.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/user.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/host.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/general_log.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/db.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/columns_priv.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_name.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/host.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_keyword.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_transition.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/proxies_priv.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_leap_second.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/columns_priv.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/db.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/event.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/tables_priv.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/procs_priv.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_relation.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_relation.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/general_log.CSM to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/event.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/ndb_binlog_index.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/slow_log.CSM to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/slow_log.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/event.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_topic.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/tables_priv.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_leap_second.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/slow_log.CSV to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/plugin.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/proc.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/user.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/plugin.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_topic.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/procs_priv.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_transition.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/func.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_category.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/proc.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/proxies_priv.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/ndb_binlog_index.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/db.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/servers.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_relation.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/user.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_transition_type.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/tables_priv.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/plugin.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/general_log.CSV to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/help_keyword.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/proxies_priv.MYD to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_transition_type.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/func.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/servers.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_leap_second.MYI to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mysql/time_zone_name.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./test/db.opt to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./slamdunk/backup_list.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./slamdunk/backup_job.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./slamdunk/db.opt to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/mutex_instances.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/events_waits_summary_by_thread_by_event_name.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/setup_instruments.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/setup_timers.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/events_waits_history.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/events_waits_summary_global_by_event_name.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/performance_timers.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/threads.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/events_waits_current.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/setup_consumers.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/file_instances.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/cond_instances.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/file_summary_by_instance.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/file_summary_by_event_name.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/rwlock_instances.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/events_waits_summary_by_instance.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/events_waits_history_long.frm to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./performance_schema/db.opt to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 [01] Streaming ./mha_relay_clear/db.opt to <STDOUT>
180428 09:30:14 [01] ...done
180428 09:30:14 Finished backing up non-InnoDB tables and files
# ------当 innobackupex 拷贝完所有非 InnoDB 表文件后,通知 xtrabackup ,同时自己进入等待
Failed to get master binlog coordinates from SHOW SLAVE STATUS
This means that the server is not a replication slave. Ignoring the --slave-info option
# ------xtrabackup 收到 innobackupex 备份完非 InnoDB 通知后,就停止 redo 拷贝线程,然后通知 innobackupex redo log 拷贝完成;
180428 09:30:14 [00] Streaming xtrabackup_binlog_info
180428 09:30:14 [00] ...done
180428 09:30:14 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '1965766249'
xtrabackup: Stopping log copying thread.
.180428 09:30:14 >> log scanned up to (1965766249)
# ------innobackupex 收到 redo 备份完成通知后,就开始解锁
180428 09:30:14 Executing UNLOCK TABLES
180428 09:30:14 All tables unlocked
# ------ innobackupex 和 xtrabackup 进程各自完成收尾工作,如资源的释放、写备份元数据信息等
180428 09:30:14 Backup created in directory '/mysql/bak'
MySQL binlog position: filename 'mysql-bin.000037', position '449597771'
180428 09:30:14 [00] Streaming backup-my.cnf
180428 09:30:14 [00] ...done
180428 09:30:14 [00] Streaming xtrabackup_info
180428 09:30:14 [00] ...done
xtrabackup: Transaction log of lsn (1965765916) to (1965766249) was copied.
180428 09:30:14 completed OK!