Xtrabackup备份恢复常用命令与压缩测试
一、使用全库备份和恢复的过程:使用innobackupex进行全库备份的命令:$ innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' /data/mysqldata/backup [html] view plain copy innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' /data/mysqldata/backup 备份后检验备份文件 $ ll /data/mysqldata/backup/2014-09-02_14-15-45使用全库备份进行恢复的命令(建议执行两次):$ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 [html] view plain copy innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 $ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 恢复和启动mysql服务:拷贝配置文件到指定位置cp /data/mysqldata/backup/my-3308.cnf /data/mysqldata/3308/my.cnf使用命令启动恢复后的mysql服务/usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysqldata/3308/my.cnf &[html] view plain copy /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysqldata/3308/my.cnf & 全库备份后恢复过程:进行恢复准备$ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 [html] view plain copy innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 进行文件恢复$ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --copy-back /data/mysqldata/backup/2014-09-02_14-15-45 [html] view plain copy innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --copy-back /data/mysqldata/backup/2014-09-02_14-15-45 准备配置文件并启动数据库服务:准备配置文件到指定位置cp /data/mysqldata/backup/my-3308.cnf /data/mysqldata/3308/my.cnf使用命令启动数据库服务$ /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysqldata/3308/my.cnf &[html] view plain copy /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysqldata/3308/my.cnf & 二、使用全库+增量进行备份和恢复的过程:使用innobackupex进行全库备份的命令:$ innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' /data/mysqldata/backup [html] view plain copy innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' /data/mysqldata/backup 全库备份后,建议备份文件$ ll /data/mysqldata/backup/2014-09-02_14-15-45使用innobackupex进行增量备份的命令:$ innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' --incremental --incremental-basedir=/data/mysqldata/backup/2014-09-02_14-15-45 /data/mysqldata/backup_rec [html] view plain copy innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' --incremental --incremental-basedir=/data/mysqldata/backup/2014-09-02_14-15-45 /data/mysqldata/backup_rec 增量备份后,建议确认增量备份文件$ ll /data/mysqldata/backup_rec/2014-09-02_14-40-18全库备份后恢复过程:进行全库备份恢复准备$ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log --redo-only /data/mysqldata/backup/2014-09-02_14-15-45 [html] view plain copy innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log --redo-only /data/mysqldata/backup/2014-09-02_14-15-45 进行增量备份恢复准备 $ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 --incremental-dir=/data/mysqldata/backup_rec/2014-09-02_14-40-18 [html] view plain copy innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --apply-log /data/mysqldata/backup/2014-09-02_14-15-45 --incremental-dir=/data/mysqldata/backup_rec/2014-09-02_14-40-18 进行文件拷贝 $ innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --copy-back /data/mysqldata/backup/2014-09-02_14-15-45 [html] view plain copy innobackupex --defaults-file=/data/mysqldata/backup/my-3308.cnf --copy-back /data/mysqldata/backup/2014-09-02_14-15-45 准备配置文件并启动数据库服务:准备配置文件到指定位置cp /data/mysqldata/backup/my-3308.cnf /data/mysqldata/3308/my.cnf使用命令启动数据库服务$ /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysqldata/3308/my.cnf &[html] view plain copy /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysqldata/3308/my.cnf & 三、使用打包+压缩的方式进行备份和恢复使用打包的命令进行mysql备份并打包和压缩的命令为:$ innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' --stream=tar /tmp | gzip -> /data/mysqldata/backup/test/xtra_fullbackup0903.tar.gz [html] view plain copy innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' --stream=tar /tmp | gzip -> /data/mysqldata/backup/test/xtra_fullbackup0903.tar.gz 解压缩命令为:解压缩的命令需要先加-i参数,将备份文件解压到当前目录:$ tar xvzfi xtra_fullbackup0903.tar.gz [html] view plain copy tar xvzfi xtra_fullbackup0903.tar.gz 解压到指定文件:$ tar xvzfi xtra_fullbackup0903.tar.gz -C /data/mysqldata/backup/test/backup0903[html] view plain copy tar xvzfi xtra_fullbackup0903.tar.gz -C /data/mysqldata/backup/test/backup0903 打包压缩备份与一般备份的文件大小对比:$ du -sh /data/mysqldata/backup/xtra_fullbackup0903.tar.gz4.4M /data/mysqldata/backup/xtra_fullbackup0903.tar.gz$ $ du -sh /data/mysqldata/backup/2014-09-02_14-15-45 2.8G /data/mysqldata/backup/2014-09-02_14-15-45$ 打包压缩备份解压前后大小对比:# du -sh backup0903 2.1G backup0903# du -sh xtra_fullbackup0903.tar.gz4.5M xtra_fullbackup0903.tar.gz使用打包压缩方式备份mysql数据库的过程为:[html] view plain copy $ innobackupex --defaults-file=/data/mysqldata/3306/my.cnf --user=xtrabk --password='onlybackup' --stream=tar /tmp | gzip -> /data/mysqldata/backup/xtra_fullbackup0903.tar.gz InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 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. 140903 15:47:49 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/data/mysqldata/3306/my.cnf;mysql_read_default_group=xtrabackup' as 'xtrabk' (using password: YES). 140903 15:47:49 innobackupex: Connected to MySQL server IMPORTANT: Please check that the backup run completes successfully. At the end of a successful backup run innobackupex prints "completed OK!". innobackupex: Using mysql server version 5.6.16-log innobackupex: Created backup directory /tmp 140903 15:47:50 innobackupex: Starting ibbackup with command: xtrabackup_56 --defaults-file="/data/mysqldata/3306/my.cnf" --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/data/mysqldata/3306/tmp --tmpdir=/data/mysqldata/3306/tmp --stream=tar innobackupex: Waiting for ibbackup (pid=17572) to suspend innobackupex: Suspend file '/data/mysqldata/3306/tmp/xtrabackup_suspended_2' xtrabackup_56 version 2.1.2 for MySQL server 5.6.10 Linux (x86_64) (revision id: 611) xtrabackup: uses posix_fadvise(). xtrabackup: cd to /data/mysqldata/3306/data xtrabackup: Target instance is assumed as followings. xtrabackup: innodb_data_home_dir = ./ xtrabackup: innodb_data_file_path = ibdata1:2048M:autoextend xtrabackup: innodb_log_group_home_dir = ./ xtrabackup: innodb_log_files_in_group = 3 xtrabackup: innodb_log_file_size = 268435456 InnoDB: Allocated tablespace 363, old maximum was 0 >> log scanned up to (29595814) [01] Streaming ./ibdata1 >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29595814) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596251) >> log scanned up to (29596688) >> log scanned up to (29596688) >> log scanned up to (29596688) >> log scanned up to (29596688) >> log scanned up to (29596688) >> log scanned up to (29596688) >> log scanned up to (29597546) >> log scanned up to (29597546) >> log scanned up to (29597546) >> log scanned up to (29597546) >> log scanned up to (29597546) >> log scanned up to (29597876) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598001) >> log scanned up to (29598331) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598438) >> log scanned up to (29598768) >> log scanned up to (29598875) >> log scanned up to (29598875) >> log scanned up to (29598875) >> log scanned up to (29598875) >> log scanned up to (29598875) >> log scanned up to (29599189) >> log scanned up to (29599312) >> log scanned up to (29599312) >> log scanned up to (29599312) >> log scanned up to (29599312) >> log scanned up to (29599626) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29599733) >> log scanned up to (29600063) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600170) >> log scanned up to (29600500) >> log scanned up to (29600607) >> log scanned up to (29600607) >> log scanned up to (29600607) >> log scanned up to (29600607) >> log scanned up to (29600607) >> log scanned up to (29600937) >> log scanned up to (29601710) >> log scanned up to (29601832) >> log scanned up to (29601832) >> log scanned up to (29601832) >> log scanned up to (29601832) >> log scanned up to (29602146) >> log scanned up to (29602253) >> log scanned up to (29602253) >> log scanned up to (29602253) [01] ...done [01] Streaming ./wikidb/EXTRNLNKS.ibd [01] ...done [01] Streaming ./wikidb/KEYSTORE.ibd [01] ...done [01] Streaming ./wikidb/CONTENTPROPERTIES.ibd [01] ...done [01] Streaming ./wikidb/NOTIFICATIONS.ibd [01] ...done [01] Streaming ./wikidb/AO_EF9604_FEATURE_DISCOVERY.ibd [01] ...done [01] Streaming ./wikidb/OS_PROPERTYENTRY.ibd >> log scanned up to (29602253) [01] ...done [01] Streaming ./wikidb/DECORATOR.ibd [01] ...done [01] Streaming ./wikidb/ATTACHMENTS.ibd [01] ...done [01] Streaming ./wikidb/AO_21D670_WHITELIST_RULES.ibd [01] ...done [01] Streaming ./wikidb/AO_5F3884_FEATURE_DISCOVERY.ibd [01] ...done [01] Streaming ./wikidb/AO_A0B856_WEB_HOOK_LISTENER_AO.ibd [01] ...done [01] Streaming ./wikidb/CONTENT_PERM_SET.ibd [01] ...done [01] Streaming ./wikidb/AO_187CCC_SIDEBAR_LINK.ibd [01] ...done [01] Streaming ./wikidb/AO_9412A1_AOUSER.ibd [01] ...done [01] Streaming ./wikidb/IMAGEDETAILS.ibd [01] ...done [01] Streaming ./wikidb/LABEL.ibd [01] ...done [01] Streaming ./wikidb/AO_54C900_C_TEMPLATE_REF.ibd [01] ...done [01] Streaming ./wikidb/PLUGINDATA.ibd [01] ...done [01] Streaming ./wikidb/AO_9412A1_AOREGISTRATION.ibd [01] ...done [01] Streaming ./wikidb/CONTENT_PERM.ibd [01] ...done [01] Streaming ./wikidb/INDEXQUEUEENTRIES.ibd [01] ...done [01] Streaming ./wikidb/CONTENT.ibd [01] ...done [01] Streaming ./wikidb/AO_54C900_SPACE_BLUEPRINT_AO.ibd [01] ...done [01] Streaming ./wikidb/PAGETEMPLATES.ibd [01] ...done [01] Streaming ./wikidb/AO_9412A1_AOTASK.ibd [01] ...done [01] Streaming ./wikidb/ATTACHMENTDATA.ibd [01] ...done [01] Streaming ./wikidb/AO_9412A1_AONOTIFICATION.ibd [01] ...done [01] Streaming ./wikidb/AO_54C900_CONTENT_BLUEPRINT_AO.ibd [01] ...done [01] Streaming ./wikidb/CONFVERSION.ibd >> log scanned up to (29602253) [01] ...done [01] Streaming ./wikidb/AO_38321B_CUSTOM_CONTENT_LINK.ibd [01] ...done [01] Streaming ./wikidb/AO_92296B_AORECENTLY_VIEWED.ibd [01] ...done [01] Streaming ./wikidb/LIKES.ibd [01] ...done [01] Streaming ./wikidb/AO_6384AB_FEATURE_METADATA_AO.ibd [01] ...done [01] Streaming ./wikidb/AO_DC98AE_AOHELP_TIP.ibd [01] ...done [01] Streaming ./wikidb/CONTENT_LABEL.ibd [01] ...done [01] Streaming ./wikidb/LINKS.ibd [01] ...done [01] Streaming ./wikidb/AO_42E351_HEALTH_CHECK_ENTITY.ibd [01] ...done [01] Streaming ./wikidb/FOLLOW_CONNECTIONS.ibd [01] ...done [01] Streaming ./wikidb/CLUSTERSAFETY.ibd [01] ...done [01] Streaming ./wikidb/CONFANCESTORS.ibd [01] ...done [01] Streaming ./wikidb/BODYCONTENT.ibd [01] ...done [01] Streaming ./wikidb/BANDANA.ibd [01] ...done [01] Streaming ./wikidb/AO_9412A1_USER_APP_LINK.ibd [01] ...done [01] Streaming ./test/t1.ibd [01] ...done [01] Streaming ./test/t2.ibd [01] ...done [01] Streaming ./test/jw_resource.ibd [01] ...done [01] Streaming ./test/deposit_coin.ibd [01] ...done [01] Streaming ./test/t4.ibd [01] ...done [01] Streaming ./test/t3.ibd [01] ...done [01] Streaming ./test/t5.ibd [01] ...done [01] Streaming ./test/admin_action_log.ibd [01] ...done [01] Streaming ./test/admin_browse_log.ibd [01] ...done [01] Streaming ./huobi@002dus/test_01.ibd [01] ...done [01] Streaming ./huobi@002dus/admin_action_log.ibd [01] ...done [01] Streaming ./huobi@002dus/admin_browse_log.ibd [01] ...done [01] Streaming ./mysql/slave_worker_info.ibd [01] ...done [01] Streaming ./mysql/slave_master_info.ibd [01] ...done [01] Streaming ./mysql/innodb_table_stats.ibd [01] ...done [01] Streaming ./mysql/innodb_index_stats.ibd [01] ...done [01] Streaming ./mysql/slave_relay_log_info.ibd [01] ...done [01] Streaming ./zabbixdb/sysmaps.ibd [01] ...done [01] Streaming ./zabbixdb/hosts_groups.ibd [01] ...done [01] Streaming ./zabbixdb/triggers.ibd [01] ...done [01] Streaming ./zabbixdb/group_discovery.ibd [01] ...done [01] Streaming ./zabbixdb/actions.ibd [01] ...done [01] Streaming ./zabbixdb/dbversion.ibd [01] ...done [01] Streaming ./zabbixdb/history_sync.ibd [01] ...done [01] Streaming ./zabbixdb/functions.ibd [01] ...done [01] Streaming ./zabbixdb/config.ibd [01] ...done [01] Streaming ./zabbixdb/scripts.ibd [01] ...done [01] Streaming ./zabbixdb/dhosts.ibd [01] ...done [01] Streaming ./zabbixdb/history_uint.ibd [01] ...done [01] Streaming ./zabbixdb/proxy_history.ibd [01] ...done [01] Streaming ./zabbixdb/opcommand_grp.ibd [01] ...done [01] Streaming ./zabbixdb/httptest.ibd [01] ...done [01] Streaming ./zabbixdb/items.ibd [01] ...done [01] Streaming ./zabbixdb/proxy_autoreg_host.ibd [01] ...done [01] Streaming ./zabbixdb/optemplate.ibd [01] ...done [01] Streaming ./zabbixdb/expressions.ibd [01] ...done [01] Streaming ./zabbixdb/sysmap_url.ibd [01] ...done [01] Streaming ./zabbixdb/dservices.ibd [01] ...done [01] Streaming ./zabbixdb/service_alarms.ibd >> log scanned up to (29602253) [01] ...done [01] Streaming ./zabbixdb/icon_mapping.ibd [01] ...done [01] Streaming ./zabbixdb/opgroup.ibd [01] ...done [01] Streaming ./zabbixdb/valuemaps.ibd [01] ...done [01] Streaming ./zabbixdb/sysmaps_links.ibd [01] ...done [01] Streaming ./zabbixdb/services_times.ibd [01] ...done [01] Streaming ./zabbixdb/hosts.ibd [01] ...done [01] Streaming ./zabbixdb/hosts_templates.ibd [01] ...done [01] Streaming ./zabbixdb/ids.ibd [01] ...done [01] Streaming ./zabbixdb/proxy_dhistory.ibd [01] ...done [01] Streaming ./zabbixdb/usrgrp.ibd [01] ...done [01] Streaming ./zabbixdb/slides.ibd [01] ...done [01] Streaming ./zabbixdb/httpstepitem.ibd [01] ...done [01] Streaming ./zabbixdb/opmessage.ibd [01] ...done [01] Streaming ./zabbixdb/operations.ibd [01] ...done [01] Streaming ./zabbixdb/history_uint_sync.ibd [01] ...done [01] Streaming ./zabbixdb/history_str_sync.ibd [01] ...done [01] Streaming ./zabbixdb/icon_map.ibd [01] ...done [01] Streaming ./zabbixdb/media.ibd [01] ...done [01] Streaming ./zabbixdb/auditlog_details.ibd [01] ...done [01] Streaming ./zabbixdb/screens.ibd [01] ...done [01] Streaming ./zabbixdb/media_type.ibd [01] ...done [01] Streaming ./zabbixdb/history_str.ibd [01] ...done [01] Streaming ./zabbixdb/dchecks.ibd [01] ...done [01] Streaming ./zabbixdb/slideshows.ibd [01] ...done [01] Streaming ./zabbixdb/httptestitem.ibd [01] ...done [01] Streaming ./zabbixdb/globalmacro.ibd [01] ...done [01] Streaming ./zabbixdb/sysmaps_elements.ibd [01] ...done [01] Streaming ./zabbixdb/item_discovery.ibd [01] ...done [01] Streaming ./zabbixdb/autoreg_host.ibd [01] ...done [01] Streaming ./zabbixdb/groups.ibd [01] ...done [01] Streaming ./zabbixdb/graph_theme.ibd [01] ...done [01] Streaming ./zabbixdb/applications.ibd [01] ...done [01] Streaming ./zabbixdb/history_log.ibd [01] ...done [01] Streaming ./zabbixdb/services_links.ibd [01] ...done [01] Streaming ./zabbixdb/conditions.ibd [01] ...done [01] Streaming ./zabbixdb/opconditions.ibd [01] ...done [01] Streaming ./zabbixdb/opmessage_usr.ibd [01] ...done [01] Streaming ./zabbixdb/services.ibd [01] ...done [01] Streaming ./zabbixdb/trigger_discovery.ibd [01] ...done [01] Streaming ./zabbixdb/node_cksum.ibd [01] ...done [01] Streaming ./zabbixdb/drules.ibd [01] ...done [01] Streaming ./zabbixdb/globalvars.ibd [01] ...done [01] Streaming ./zabbixdb/profiles.ibd [01] ...done [01] Streaming ./zabbixdb/housekeeper.ibd [01] ...done [01] Streaming ./zabbixdb/application_template.ibd [01] ...done [01] Streaming ./zabbixdb/group_prototype.ibd [01] ...done [01] Streaming ./zabbixdb/opmessage_grp.ibd [01] ...done [01] Streaming ./zabbixdb/user_history.ibd [01] ...done [01] Streaming ./zabbixdb/sysmap_element_url.ibd [01] ...done [01] Streaming ./zabbixdb/graph_discovery.ibd [01] ...done [01] Streaming ./zabbixdb/history_text.ibd [01] ...done [01] Streaming ./zabbixdb/nodes.ibd [01] ...done [01] Streaming ./zabbixdb/hostmacro.ibd [01] ...done [01] Streaming ./zabbixdb/opcommand_hst.ibd [01] ...done [01] Streaming ./zabbixdb/escalations.ibd [01] ...done [01] Streaming ./zabbixdb/acknowledges.ibd [01] ...done [01] Streaming ./zabbixdb/opcommand.ibd >> log scanned up to (29602253) [01] ...done [01] Streaming ./zabbixdb/sysmaps_link_triggers.ibd [01] ...done [01] Streaming ./zabbixdb/interface.ibd [01] ...done [01] Streaming ./zabbixdb/history.ibd [01] ...done [01] Streaming ./zabbixdb/host_inventory.ibd [01] ...done [01] Streaming ./zabbixdb/auditlog.ibd [01] ...done [01] Streaming ./zabbixdb/host_discovery.ibd [01] ...done [01] Streaming ./zabbixdb/trigger_depends.ibd [01] ...done [01] Streaming ./zabbixdb/trends_uint.ibd [01] ...done [01] Streaming ./zabbixdb/mappings.ibd [01] ...done [01] Streaming ./zabbixdb/events.ibd [01] ...done [01] Streaming ./zabbixdb/httpstep.ibd [01] ...done [01] Streaming ./zabbixdb/trends.ibd [01] ...done [01] Streaming ./zabbixdb/interface_discovery.ibd [01] ...done [01] Streaming ./zabbixdb/items_applications.ibd [01] ...done [01] Streaming ./zabbixdb/users_groups.ibd [01] ...done [01] Streaming ./zabbixdb/users.ibd [01] ...done [01] Streaming ./zabbixdb/graphs_items.ibd [01] ...done [01] Streaming ./zabbixdb/regexps.ibd [01] ...done [01] Streaming ./zabbixdb/maintenances_groups.ibd [01] ...done [01] Streaming ./zabbixdb/maintenances_windows.ibd [01] ...done [01] Streaming ./zabbixdb/sessions.ibd [01] ...done [01] Streaming ./zabbixdb/timeperiods.ibd [01] ...done [01] Streaming ./zabbixdb/alerts.ibd [01] ...done [01] Streaming ./zabbixdb/graphs.ibd [01] ...done [01] Streaming ./zabbixdb/screens_items.ibd [01] ...done [01] Streaming ./zabbixdb/maintenances.ibd [01] ...done [01] Streaming ./zabbixdb/rights.ibd [01] ...done [01] Streaming ./zabbixdb/images.ibd [01] ...done [01] Streaming ./zabbixdb/maintenances_hosts.ibd [01] ...done >> log scanned up to (29602253) 140903 15:49:35 innobackupex: Continuing after ibbackup has suspended 140903 15:49:35 innobackupex: Starting to lock all tables... 140903 15:49:35 innobackupex: All tables locked and flushed to disk 140903 15:49:35 innobackupex: Starting to backup non-InnoDB tables and files innobackupex: in subdirectories of '/data/mysqldata/3306/data' innobackupex: Backing up files '/data/mysqldata/3306/data/performance_schema/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (53 files) >> log scanned up to (29602253) innobackupex: Backing up files '/data/mysqldata/3306/data/wikidb/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (44 files) >> log scanned up to (29602253) innobackupex: Backing up files '/data/mysqldata/3306/data/test/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (10 files) innobackupex: Backing up file '/data/mysqldata/3306/data/huobi@002dus/db.opt' innobackupex: Backing up file '/data/mysqldata/3306/data/huobi@002dus/test_01.frm' innobackupex: Backing up file '/data/mysqldata/3306/data/huobi@002dus/admin_action_log.frm' innobackupex: Backing up file '/data/mysqldata/3306/data/huobi@002dus/admin_browse_log.frm' innobackupex: Backing up files '/data/mysqldata/3306/data/sys/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (64 files) innobackupex: Backing up files '/data/mysqldata/3306/data/mysql/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (74 files) >> log scanned up to (29602253) innobackupex: Backing up files '/data/mysqldata/3306/data/zabbixdb/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (109 files) >> log scanned up to (29602253) 140903 15:49:39 innobackupex: Finished backing up non-InnoDB tables and files 140903 15:49:39 innobackupex: Waiting for log copying to finish >> log scanned up to (29602253) xtrabackup: The latest check point (for incremental): '29602253' xtrabackup: Stopping log copying thread. .>> log scanned up to (29602253) xtrabackup: Transaction log of lsn (29595377) to (29602253) was copied. 140903 15:49:40 innobackupex: All tables unlocked innobackupex: Backup created in directory '/tmp' innobackupex: MySQL binlog position: filename 'mysql-bin.000006', position 404091 140903 15:49:40 innobackupex: Connection to database server closed innobackupex: You must use -i (--ignore-zeros) option for extraction of the tar stream. 140903 15:49:40 innobackupex: completed OK! [mysql@nagios backup]$ 使用压缩命令解压缩备份文件的过程为:[html] view plain copy # tar xvzfi xtra_fullbackup0903.tar.gz -C /data/mysqldata/backup/test/backup0903 backup-my.cnf ibdata1 wikidb/EXTRNLNKS.ibd wikidb/KEYSTORE.ibd wikidb/CONTENTPROPERTIES.ibd wikidb/NOTIFICATIONS.ibd wikidb/AO_EF9604_FEATURE_DISCOVERY.ibd wikidb/OS_PROPERTYENTRY.ibd wikidb/DECORATOR.ibd wikidb/ATTACHMENTS.ibd wikidb/AO_21D670_WHITELIST_RULES.ibd wikidb/AO_5F3884_FEATURE_DISCOVERY.ibd wikidb/AO_A0B856_WEB_HOOK_LISTENER_AO.ibd wikidb/CONTENT_PERM_SET.ibd wikidb/AO_187CCC_SIDEBAR_LINK.ibd wikidb/AO_9412A1_AOUSER.ibd wikidb/IMAGEDETAILS.ibd wikidb/LABEL.ibd wikidb/AO_54C900_C_TEMPLATE_REF.ibd wikidb/PLUGINDATA.ibd wikidb/AO_9412A1_AOREGISTRATION.ibd wikidb/CONTENT_PERM.ibd wikidb/INDEXQUEUEENTRIES.ibd wikidb/CONTENT.ibd wikidb/AO_54C900_SPACE_BLUEPRINT_AO.ibd wikidb/PAGETEMPLATES.ibd wikidb/AO_9412A1_AOTASK.ibd wikidb/ATTACHMENTDATA.ibd wikidb/AO_9412A1_AONOTIFICATION.ibd wikidb/AO_54C900_CONTENT_BLUEPRINT_AO.ibd wikidb/CONFVERSION.ibd wikidb/AO_38321B_CUSTOM_CONTENT_LINK.ibd wikidb/AO_92296B_AORECENTLY_VIEWED.ibd wikidb/LIKES.ibd wikidb/AO_6384AB_FEATURE_METADATA_AO.ibd wikidb/AO_DC98AE_AOHELP_TIP.ibd wikidb/CONTENT_LABEL.ibd wikidb/LINKS.ibd wikidb/AO_42E351_HEALTH_CHECK_ENTITY.ibd wikidb/FOLLOW_CONNECTIONS.ibd wikidb/CLUSTERSAFETY.ibd wikidb/CONFANCESTORS.ibd wikidb/BODYCONTENT.ibd wikidb/BANDANA.ibd wikidb/AO_9412A1_USER_APP_LINK.ibd test/t1.ibd test/t2.ibd test/jw_resource.ibd test/deposit_coin.ibd test/t4.ibd test/t3.ibd test/t5.ibd test/admin_action_log.ibd test/admin_browse_log.ibd huobi@002dus/test_01.ibd huobi@002dus/admin_action_log.ibd huobi@002dus/admin_browse_log.ibd mysql/slave_worker_info.ibd mysql/slave_master_info.ibd mysql/innodb_table_stats.ibd mysql/innodb_index_stats.ibd mysql/slave_relay_log_info.ibd zabbixdb/sysmaps.ibd zabbixdb/hosts_groups.ibd zabbixdb/triggers.ibd zabbixdb/group_discovery.ibd zabbixdb/actions.ibd zabbixdb/dbversion.ibd zabbixdb/history_sync.ibd zabbixdb/functions.ibd zabbixdb/config.ibd zabbixdb/scripts.ibd zabbixdb/dhosts.ibd zabbixdb/history_uint.ibd zabbixdb/proxy_history.ibd zabbixdb/opcommand_grp.ibd zabbixdb/httptest.ibd zabbixdb/items.ibd zabbixdb/proxy_autoreg_host.ibd zabbixdb/optemplate.ibd zabbixdb/expressions.ibd zabbixdb/sysmap_url.ibd zabbixdb/dservices.ibd zabbixdb/service_alarms.ibd zabbixdb/icon_mapping.ibd zabbixdb/opgroup.ibd zabbixdb/valuemaps.ibd zabbixdb/sysmaps_links.ibd zabbixdb/services_times.ibd zabbixdb/hosts.ibd zabbixdb/hosts_templates.ibd zabbixdb/ids.ibd zabbixdb/proxy_dhistory.ibd zabbixdb/usrgrp.ibd zabbixdb/slides.ibd zabbixdb/httpstepitem.ibd zabbixdb/opmessage.ibd zabbixdb/operations.ibd zabbixdb/history_uint_sync.ibd zabbixdb/history_str_sync.ibd zabbixdb/icon_map.ibd zabbixdb/media.ibd zabbixdb/auditlog_details.ibd zabbixdb/screens.ibd zabbixdb/media_type.ibd zabbixdb/history_str.ibd zabbixdb/dchecks.ibd zabbixdb/slideshows.ibd zabbixdb/httptestitem.ibd zabbixdb/globalmacro.ibd zabbixdb/sysmaps_elements.ibd zabbixdb/item_discovery.ibd zabbixdb/autoreg_host.ibd zabbixdb/groups.ibd zabbixdb/graph_theme.ibd zabbixdb/applications.ibd zabbixdb/history_log.ibd zabbixdb/services_links.ibd zabbixdb/conditions.ibd zabbixdb/opconditions.ibd zabbixdb/opmessage_usr.ibd zabbixdb/services.ibd zabbixdb/trigger_discovery.ibd zabbixdb/node_cksum.ibd zabbixdb/drules.ibd zabbixdb/globalvars.ibd zabbixdb/profiles.ibd zabbixdb/housekeeper.ibd zabbixdb/application_template.ibd zabbixdb/group_prototype.ibd zabbixdb/opmessage_grp.ibd zabbixdb/user_history.ibd zabbixdb/sysmap_element_url.ibd zabbixdb/graph_discovery.ibd zabbixdb/history_text.ibd zabbixdb/nodes.ibd zabbixdb/hostmacro.ibd zabbixdb/opcommand_hst.ibd zabbixdb/escalations.ibd zabbixdb/acknowledges.ibd zabbixdb/opcommand.ibd zabbixdb/sysmaps_link_triggers.ibd zabbixdb/interface.ibd zabbixdb/history.ibd zabbixdb/host_inventory.ibd zabbixdb/auditlog.ibd zabbixdb/host_discovery.ibd zabbixdb/trigger_depends.ibd zabbixdb/trends_uint.ibd zabbixdb/mappings.ibd zabbixdb/events.ibd zabbixdb/httpstep.ibd zabbixdb/trends.ibd zabbixdb/interface_discovery.ibd zabbixdb/items_applications.ibd zabbixdb/users_groups.ibd zabbixdb/users.ibd zabbixdb/graphs_items.ibd zabbixdb/regexps.ibd zabbixdb/maintenances_groups.ibd zabbixdb/maintenances_windows.ibd zabbixdb/sessions.ibd zabbixdb/timeperiods.ibd zabbixdb/alerts.ibd zabbixdb/graphs.ibd zabbixdb/screens_items.ibd zabbixdb/maintenances.ibd zabbixdb/rights.ibd zabbixdb/images.ibd zabbixdb/maintenances_hosts.ibd xtrabackup_binlog_info performance_schema/events_waits_summary_by_host_by_event_name.frm performance_schema/events_waits_summary_by_account_by_event_name.frm performance_schema/events_waits_history_long.frm performance_schema/socket_summary_by_event_name.frm performance_schema/socket_summary_by_instance.frm performance_schema/performance_timers.frm performance_schema/events_stages_summary_by_host_by_event_name.frm performance_schema/rwlock_instances.frm performance_schema/objects_summary_global_by_type.frm performance_schema/events_stages_summary_global_by_event_name.frm performance_schema/events_stages_history.frm performance_schema/host_cache.frm performance_schema/table_io_waits_summary_by_table.frm performance_schema/events_statements_summary_by_user_by_event_name.frm performance_schema/mutex_instances.frm performance_schema/events_statements_current.frm performance_schema/events_waits_summary_by_thread_by_event_name.frm performance_schema/events_statements_summary_by_host_by_event_name.frm performance_schema/events_statements_history.frm performance_schema/events_stages_history_long.frm performance_schema/threads.frm performance_schema/accounts.frm performance_schema/events_statements_summary_by_digest.frm performance_schema/events_waits_summary_by_instance.frm performance_schema/setup_actors.frm performance_schema/events_waits_summary_by_user_by_event_name.frm performance_schema/events_statements_summary_global_by_event_name.frm performance_schema/setup_objects.frm performance_schema/db.opt performance_schema/file_summary_by_event_name.frm performance_schema/users.frm performance_schema/events_waits_history.frm performance_schema/events_stages_summary_by_account_by_event_name.frm performance_schema/table_io_waits_summary_by_index_usage.frm performance_schema/socket_instances.frm performance_schema/events_waits_current.frm performance_schema/setup_instruments.frm performance_schema/events_statements_history_long.frm performance_schema/session_connect_attrs.frm performance_schema/file_instances.frm performance_schema/events_statements_summary_by_account_by_event_name.frm performance_schema/events_waits_summary_global_by_event_name.frm performance_schema/table_lock_waits_summary_by_table.frm performance_schema/session_account_connect_attrs.frm performance_schema/events_stages_summary_by_user_by_event_name.frm performance_schema/events_stages_current.frm performance_schema/setup_consumers.frm performance_schema/file_summary_by_instance.frm performance_schema/hosts.frm performance_schema/cond_instances.frm performance_schema/events_statements_summary_by_thread_by_event_name.frm performance_schema/setup_timers.frm performance_schema/events_stages_summary_by_thread_by_event_name.frm wikidb/CLUSTERSAFETY.frm wikidb/CONTENT_PERM.frm wikidb/DECORATOR.frm wikidb/AO_A0B856_WEB_HOOK_LISTENER_AO.frm wikidb/BANDANA.frm wikidb/PAGETEMPLATES.frm wikidb/AO_38321B_CUSTOM_CONTENT_LINK.frm wikidb/EXTRNLNKS.frm wikidb/LINKS.frm wikidb/CONFANCESTORS.frm wikidb/LIKES.frm wikidb/BODYCONTENT.frm wikidb/ATTACHMENTS.frm wikidb/NOTIFICATIONS.frm wikidb/KEYSTORE.frm wikidb/AO_EF9604_FEATURE_DISCOVERY.frm wikidb/db.opt wikidb/CONFVERSION.frm wikidb/AO_42E351_HEALTH_CHECK_ENTITY.frm wikidb/AO_54C900_C_TEMPLATE_REF.frm wikidb/CONTENTPROPERTIES.frm wikidb/INDEXQUEUEENTRIES.frm wikidb/AO_6384AB_FEATURE_METADATA_AO.frm wikidb/CONTENT.frm wikidb/AO_54C900_SPACE_BLUEPRINT_AO.frm wikidb/AO_187CCC_SIDEBAR_LINK.frm wikidb/AO_9412A1_AOTASK.frm wikidb/AO_54C900_CONTENT_BLUEPRINT_AO.frm wikidb/AO_9412A1_AOUSER.frm wikidb/AO_5F3884_FEATURE_DISCOVERY.frm wikidb/AO_9412A1_USER_APP_LINK.frm wikidb/ATTACHMENTDATA.frm wikidb/PLUGINDATA.frm wikidb/OS_PROPERTYENTRY.frm wikidb/AO_92296B_AORECENTLY_VIEWED.frm wikidb/CONTENT_LABEL.frm wikidb/LABEL.frm wikidb/AO_9412A1_AOREGISTRATION.frm wikidb/CONTENT_PERM_SET.frm wikidb/IMAGEDETAILS.frm wikidb/AO_DC98AE_AOHELP_TIP.frm wikidb/AO_21D670_WHITELIST_RULES.frm wikidb/FOLLOW_CONNECTIONS.frm wikidb/AO_9412A1_AONOTIFICATION.frm test/jw_resource.frm test/t2.frm test/deposit_coin.frm test/db.opt test/t1.frm test/t3.frm test/t4.frm test/admin_action_log.frm test/t5.frm test/admin_browse_log.frm huobi@002dus/db.opt huobi@002dus/test_01.frm huobi@002dus/admin_action_log.frm huobi@002dus/admin_browse_log.frm sys/x@0024statements_with_full_table_scans.frm sys/x@0024statements_with_sorting.frm sys/x@0024statements_with_errors_or_warnings.frm sys/x@0024io_global_by_file_by_latency.frm sys/x@0024user_summary_by_file_io_type.frm sys/x@0024schema_index_statistics.frm sys/innodb_buffer_stats_by_table.frm sys/x@0024io_global_by_wait_by_latency.frm sys/io_global_by_wait_by_bytes.frm sys/x@0024statements_with_temp_tables.frm sys/schema_table_statistics_with_buffer.frm sys/x@0024user_summary_by_statement_type.frm sys/processlist.frm sys/statements_with_sorting.frm sys/waits_global_by_latency.frm sys/latest_file_io.frm sys/x@0024wait_classes_global_by_avg_latency.frm sys/schema_unused_indexes.frm sys/user_summary_by_stages.frm sys/user_summary.frm sys/x@0024wait_classes_global_by_latency.frm sys/x@0024ps_digest_95th_percentile_by_avg_us.frm sys/db.opt sys/x@0024processlist.frm sys/x@0024schema_table_statistics.frm sys/user_summary_by_file_io_type.frm sys/statements_with_errors_or_warnings.frm sys/schema_table_statistics.frm sys/schema_object_overview.frm sys/x@0024innodb_buffer_stats_by_table.frm sys/schema_tables_with_full_table_scans.frm sys/io_global_by_file_by_latency.frm sys/statements_with_runtimes_in_95th_percentile.frm sys/version.frm sys/x@0024waits_global_by_latency.frm sys/x@0024statements_with_runtimes_in_95th_percentile.frm sys/user_summary_by_file_io.frm sys/waits_by_user_by_latency.frm sys/x@0024io_by_thread_by_latency.frm sys/x@0024io_global_by_wait_by_bytes.frm sys/user_summary_by_statement_type.frm sys/x@0024innodb_buffer_stats_by_schema.frm sys/x@0024user_summary_by_file_io.frm sys/x@0024schema_table_statistics_with_buffer.frm sys/x@0024latest_file_io.frm sys/x@0024waits_by_user_by_latency.frm sys/wait_classes_global_by_latency.frm sys/io_by_thread_by_latency.frm sys/schema_index_statistics.frm sys/ps_check_lost_instrumentation.frm sys/wait_classes_global_by_avg_latency.frm sys/x@0024user_summary.frm sys/x@0024ps_digest_avg_latency_distribution.frm sys/x@0024statement_analysis.frm sys/statements_with_temp_tables.frm sys/x@0024io_global_by_file_by_bytes.frm sys/user_summary_by_statement_latency.frm sys/x@0024user_summary_by_stages.frm sys/statement_analysis.frm sys/x@0024user_summary_by_statement_latency.frm sys/io_global_by_file_by_bytes.frm sys/io_global_by_wait_by_latency.frm sys/statements_with_full_table_scans.frm sys/innodb_buffer_stats_by_schema.frm mysql/plugin.frm mysql/time_zone_leap_second.MYD mysql/time_zone_transition_type.MYI mysql/servers.frm mysql/procs_priv.frm mysql/db.MYI mysql/help_topic.MYD mysql/time_zone.frm mysql/slave_master_info.frm mysql/help_relation.MYD mysql/proc.MYD mysql/time_zone_name.frm mysql/db.frm mysql/help_topic.MYI mysql/plugin.MYI mysql/innodb_table_stats.frm mysql/tables_priv.MYI mysql/func.frm mysql/general_log.frm mysql/plugin.MYD mysql/help_keyword.MYI mysql/time_zone.MYI mysql/event.MYI mysql/help_topic.frm mysql/proc.frm mysql/time_zone_transition_type.MYD mysql/help_category.MYD mysql/tables_priv.frm mysql/slave_relay_log_info.frm mysql/servers.MYI mysql/columns_priv.frm mysql/help_keyword.frm mysql/time_zone_transition_type.frm mysql/tables_priv.MYD mysql/general_log.CSM mysql/func.MYI mysql/time_zone_transition.MYD mysql/db.MYD mysql/ndb_binlog_index.MYI mysql/proxies_priv.MYD mysql/servers.MYD mysql/proc.MYI mysql/slave_worker_info.frm mysql/slow_log.CSM mysql/procs_priv.MYI mysql/columns_priv.MYI mysql/time_zone_name.MYI mysql/help_category.MYI mysql/help_keyword.MYD mysql/time_zone_name.MYD mysql/ndb_binlog_index.frm mysql/time_zone_transition.frm mysql/event.MYD mysql/time_zone_transition.MYI mysql/columns_priv.MYD mysql/general_log.CSV mysql/help_category.frm mysql/ndb_binlog_index.MYD mysql/proxies_priv.MYI mysql/time_zone_leap_second.frm mysql/func.MYD mysql/event.frm mysql/slow_log.frm mysql/procs_priv.MYD mysql/help_relation.frm mysql/time_zone.MYD mysql/help_relation.MYI mysql/innodb_index_stats.frm mysql/proxies_priv.frm mysql/slow_log.CSV mysql/user.MYI mysql/time_zone_leap_second.MYI mysql/user.frm mysql/user.MYD zabbixdb/services_times.frm zabbixdb/application_template.frm zabbixdb/slideshows.frm zabbixdb/media_type.frm zabbixdb/config.frm zabbixdb/functions.frm zabbixdb/opmessage_grp.frm zabbixdb/httpstep.frm zabbixdb/mappings.frm zabbixdb/proxy_autoreg_host.frm zabbixdb/screens.frm zabbixdb/maintenances_hosts.frm zabbixdb/history_sync.frm zabbixdb/user_history.frm zabbixdb/group_prototype.frm zabbixdb/host_discovery.frm zabbixdb/media.frm zabbixdb/dchecks.frm zabbixdb/maintenances_windows.frm zabbixdb/dbversion.frm zabbixdb/conditions.frm zabbixdb/opconditions.frm zabbixdb/acknowledges.frm zabbixdb/alerts.frm zabbixdb/hosts_groups.frm zabbixdb/rights.frm zabbixdb/auditlog_details.frm zabbixdb/httptest.frm zabbixdb/timeperiods.frm zabbixdb/autoreg_host.frm zabbixdb/graphs_items.frm zabbixdb/opgroup.frm zabbixdb/triggers.frm zabbixdb/images.frm zabbixdb/expressions.frm zabbixdb/proxy_dhistory.frm zabbixdb/users_groups.frm zabbixdb/optemplate.frm zabbixdb/dservices.frm zabbixdb/auditlog.frm zabbixdb/services_links.frm zabbixdb/interface.frm zabbixdb/httpstepitem.frm zabbixdb/history_text.frm zabbixdb/groups.frm zabbixdb/drules.frm zabbixdb/db.opt zabbixdb/trigger_discovery.frm zabbixdb/scripts.frm zabbixdb/users.frm zabbixdb/usrgrp.frm zabbixdb/opcommand.frm zabbixdb/sysmap_element_url.frm zabbixdb/sysmaps_elements.frm zabbixdb/applications.frm zabbixdb/sessions.frm zabbixdb/services.frm zabbixdb/maintenances_groups.frm zabbixdb/graph_discovery.frm zabbixdb/trigger_depends.frm zabbixdb/globalmacro.frm zabbixdb/dhosts.frm zabbixdb/history_uint_sync.frm zabbixdb/hosts_templates.frm zabbixdb/valuemaps.frm zabbixdb/events.frm zabbixdb/globalvars.frm zabbixdb/icon_map.frm zabbixdb/opmessage.frm zabbixdb/proxy_history.frm zabbixdb/items.frm zabbixdb/sysmaps.frm zabbixdb/escalations.frm zabbixdb/sysmaps_links.frm zabbixdb/maintenances.frm zabbixdb/httptestitem.frm zabbixdb/history_str_sync.frm zabbixdb/sysmaps_link_triggers.frm zabbixdb/hostmacro.frm zabbixdb/items_applications.frm zabbixdb/history_uint.frm zabbixdb/nodes.frm zabbixdb/graph_theme.frm zabbixdb/trends_uint.frm zabbixdb/history_str.frm zabbixdb/hosts.frm zabbixdb/history_log.frm zabbixdb/profiles.frm zabbixdb/item_discovery.frm zabbixdb/opcommand_grp.frm zabbixdb/regexps.frm zabbixdb/service_alarms.frm zabbixdb/node_cksum.frm zabbixdb/history.frm zabbixdb/host_inventory.frm zabbixdb/interface_discovery.frm zabbixdb/group_discovery.frm zabbixdb/opcommand_hst.frm zabbixdb/trends.frm zabbixdb/housekeeper.frm zabbixdb/opmessage_usr.frm zabbixdb/operations.frm zabbixdb/icon_mapping.frm zabbixdb/screens_items.frm zabbixdb/slides.frm zabbixdb/graphs.frm zabbixdb/actions.frm zabbixdb/sysmap_url.frm zabbixdb/ids.frm xtrabackup_logfile xtrabackup_checkpoints xtrabackup_binary [root@nagios backup]#