日期:2014-05-16  浏览次数:20471 次

innobackupex不同备份方式的记录明细
普通备份模式
[root@Slave02 tmp]# innobackupex  --database="inno test" --user=root --password=root  --no-lock --defaults-file=/etc/my.cnf  /data0/backup/mysql  2>/tmp/mysqlbackup.log
xtrabackup_55 version 1.6.2 for MySQL server 5.5.10 Linux (i686) (revision id: undefined)
[01] Copying ./ibdata1 
     to /data0/backup/mysql/2013-03-28_10-10-45/ibdata1
[01]        ...done
[01] Copying ./inno/mm.ibd 
     to /data0/backup/mysql/2013-03-28_10-10-45/inno/mm.ibd
[01]        ...done
[01] Copying ./inno/t.ibd 
     to /data0/backup/mysql/2013-03-28_10-10-45/inno/t.ibd
[01]        ...done
xtrabackup: The latest check point (for incremental): '893330831'
xtrabackup: Stopping log copying thread.
xtrabackup: Transaction log of lsn (893330831) to (893330831) was copied.
[root@Slave02 tmp]# 
注:使用mysql的root用户将数据库testinnodb和test的备份,备份路径是/data0/backup/mysql/。备份 成功后会在该目录下将创建以时间戳为名称的备份目录。no-lock参数用于指定备份时不锁定表。2>/tmp/mysqlbackup.log是 将备份过程中的输出信息保存到/tmp/mysqlbackup.log中
[root@Slave02 tmp]# cd /data0/backup/mysql/           ---校验备份的文件
[root@Slave02 mysql]# ll
total 20
drwxr-xr-x 4 root root 4096 Mar 28 10:11 2013-03-28_10-10-45
-rw-r--r-- 1 root root   83 Mar 28 10:10 stderr
-rw-r--r-- 1 root root    0 Mar 28 10:10 stdout
[root@Slave02 mysql]# cd 2013-03-28_10-10-45/
[root@Slave02 2013-03-28_10-10-45]# ll
total 469520
-rw-r--r-- 1 root root       363 Mar 28 10:10 backup-my.cnf
-rw-r--r-- 1 root root 480247808 Mar 28 10:11 ibdata1
drwx------ 2 root root      4096 Mar 28 10:11 inno
-rw-r--r-- 1 root root         0 Mar 28 10:11 mysql-stderr
-rw-r--r-- 1 root root        76 Mar 28 10:11 mysql-stdout
drwxr-xr-x 2 root root      4096 Mar 28 10:11 test
-rw-r--r-- 1 root root        13 Mar 28 10:11 xtrabackup_binary
-rw-r--r-- 1 root root        81 Mar 28 10:11 xtrabackup_checkpoints
-rw-r--r-- 1 root root      2560 Mar 28 10:11 xtrabackup_logfile
[root@Slave02 2013-03-28_10-10-45]# cd inno/
[root@Slave02 inno]# ll
total 2096
-rw-r----- 1 mysql mysql    8554 Mar 27 14:49 mm.frm
-rw-r--r-- 1 root  root  1048576 Mar 28 10:11 mm.ibd
-rw-r----- 1 mysql mysql    8554 Mar 27 14:49 t.frm
-rw-r--r-- 1 root  root  1048576 Mar 28 10:11 t.ibd
[root@Slave02 inno]#
[root@Slave02 tmp]# cat mysqlbackup.log      ----查看备份记录的详细过程

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2011.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

130328 10:10:39  innobackupex: Starting mysql with options:  --defaults-file='/etc/my.cnf' --password='root' --user='root' --unbuffered --
130328 10:10:39  innobackupex: Connected to database with mysql child process (pid=3714)
130328 10:10:45  innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex: Using mysql  Ver 14.14 Distrib 5.5.13, for Linux (i686) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

innobackupex: Created backup directory /data0/backup/mysql/2013-03-28_10-10-45
130328 10:10:45  innobackupex: Starting mysql with options:  --defaults-file='/etc/my.cnf' --password='root' --user='root' --unbuffered --
130328 10:10:45  innobackupex: Connected to database with mysql child process (pid=3742)
130328 10:10:49  innobackupex: Connection to database server closed

130328 10:10:49  innobackupex: Starting ibbackup with command: xtrabackup_55  --defaults-file="/etc/my.cnf" --backup --suspend-at-end --target-dir=/data0/backup/mysql/2013-03-28_10-10-45
innobackupex: Waiting for ibbackup (pid=3754) to suspend
innobackupex: Suspend file '/data0/backup/mysql/2013-03-28_10-10-45/xtrabackup_suspended'

xtrabackup: uses posix_fadvise().
xtrabackup: cd to /usr/local/mysql/data
xtrabackup: Target instan