Must meet certain prerequisites to is able to restore a IBD tablespace:
1.The IBD file must to consistent backup with all insert buffer entries merged and have no uncommitted transaction s in order to is dependent of the shared 2.tablespace Ibdata. The IS, shutting, and innodb_fast_shutdown=0. We ' ll use Xtrabackup to avoid the server shutdown.
3.You must not drop, truncate or alter the schema of the table after the backup has been taken.
The variable innodb_file_per_table must is enabled.
[Root@test bin]#./innobackupex--defaults-file=/service/mysql5.5/my.cnf--export/backup/5.5/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.
This software is published under
The GNU general public LICENSE Version 2, June 1991.
131125 19:50:23 innobackupex:connecting to MySQL server with DSN ' dbi:mysql:;mysql_read_default_file=/service/mysql5.5 /my.cnf;mysql_read_default_group=xtrabackup ' (using Password:no).
131125 19:50:23 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.5.25-log
innobackupex:created Backup directory/backup/5.5/2013-11-25_19-50-23
131125 19:50:23 innobackupex:starting ibbackup with command:xtrabackup_55--defaults-file= "/SERVICE/MYSQL5.5/MY.CNF" --defaults-group= "mysqld"--backup--suspend-at-end--target-dir=/backup/5.5/2013-11-25_19-50-23--tmpdir=/tmp
Innobackupex:waiting for Ibbackup (pid=13361) to suspend
Innobackupex:suspend file '/backup/5.5/2013-11-25_19-50-23/xtrabackup_suspended_2 '
xtrabackup_55 version 2.1.5 for Percona Server 5.5.31 Linux (x86_64) (revision id:680)
Xtrabackup:uses posix_fadvise ().
XTRABACKUP:CD to/data/mysql5.5
Xtrabackup:using the following InnoDB configuration:
Xtrabackup:innodb_data_home_dir =./
Xtrabackup:innodb_data_file_path = Ibdata1:10m:autoextend
Xtrabackup:innodb_log_group_home_dir =./
Xtrabackup:innodb_log_files_in_group = 3
Xtrabackup:innodb_log_file_size = 5242880
>> Log scanned up to (1600610)
[Copying]/ibdata1 to/backup/5.5/2013-11-25_19-50-23/ibdata1
[... done]
[Copying]/test/t2.ibd to/backup/5.5/2013-11-25_19-50-23/test/t2.ibd
[... done]
>> Log scanned up to (1600610)
xtrabackup:creating suspend file '/backup/5.5/2013-11-25_19-50-23/xtrabackup_suspended_2 ' with PID ' 13361 '
131125 19:50:25 innobackupex:continuing after Ibbackup has suspended
131125 19:50:25 innobackupex:starting to lock all tables ...
131125 19:50:25 innobackupex:all tables locked and flushed to disk
131125 19:50:25 innobackupex:starting to backup Non-innodb tables and files
Innobackupex:in subdirectories of '/data/mysql5.5 '
innobackupex:backing up file '/data/mysql5.5/test/t2.frm '
innobackupex:backing up files '/data/mysql5.5/mysql/*. {Frm,isl,myd,myi,mad,mai,mrg,trg,trn,arm,arz,csm,csv,opt,par} ' (in the files)
>> Log scanned up to (1600610)
innobackupex:backing up files '/data/mysql5.5/performance_schema/*. {Frm,isl,myd,myi,mad,mai,mrg,trg,trn,arm,arz,csm,csv,opt,par} ' (Files)
131125 19:50:26 innobackupex:finished backing up non-innodb tables and files
131125 19:50:26 innobackupex:waiting for log copying to finish
Xtrabackup:the Latest Check Point (for incremental): ' 1600610 '
xtrabackup:stopping log copying thread.
.>> Log scanned up to (1600610)
xtrabackup:creating suspend file '/backup/5.5/2013-11-25_19-50-23/xtrabackup_log_copied ' with PID ' 13361 '
Xtrabackup:transaction Log of LSN (1600610) to (1600610) is copied.
131125 19:50:27 innobackupex:all Tables Unlocked
Innobackupex:backup created in directory '/backup/5.5/2013-11-25_19-50-23 '
Innobackupex:mysql binlog position:filename ' zwc-test.000003 ', position 420
131125 19:50:27 innobackupex:connection to database server closed
131125 19:50:27 innobackupex:completed ok!
This column more highlights: http://www.bianceng.cn/database/MySQL/