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

用innobackupex恢复备份数据库

引用
tar ixvf database_sns_201110290358.tar.gz -C database_sns_201110290358

引用
[root@test3 byread]# PATH=$PATH:/byread/bin/mysql/bin

引用

[root@test3 byread]# /byread/bin/mysql/bin/innobackupex-1.5.1 --defaults-file=/byread/bin/mysql/etc/my.cnf --apply-log --user=root --password=password /byread/backup/database_sns_201110290358

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy.
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-1.5.1
           prints "completed OK!".



111129 13:02:23  innobackupex-1.5.1: Starting ibbackup with command: xtrabackup  --defaults-file="/byread/bin/mysql/etc/my.cnf" --prepare --target-dir=/byread/backup/database_sns_201110290358

xtrabackup  Ver 1.2 Rev undefined for 5.1.45 unknown-linux-gnu (x86_64)
xtrabackup: cd to /byread/backup/database_sns_201110290358
xtrabackup: This target seems to be not prepared yet.
xtrabackup: xtrabackup_logfile detected: size=15679488, start_lsn=(439451291573)
xtrabackup: Temporary instance for recovery is set as followings.
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 = 1
xtrabackup:   innodb_log_file_size = 15679488
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: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead
111129 13:02:23  InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 439451291573
111129 13:02:23  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Doing recovery: scanned up to log sequence number 439456534016 (37 %)
InnoDB: Doing recovery: scanned up to log sequence number 439461776896 (75 %)
InnoDB: Doing recovery: scanned up to log sequence number 439465227876 (100 %)
111129 13:02:30  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 842538513, file name ./mysql-bin.000145
111129 13:02:50 InnoDB Plugin 1.0.6-unknown started; log sequence number 439465227876

[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 842538513, file name ./mysql-bin.000145

xtrabackup: starting shutdown with innodb_fast_shutdown = 1
111129 13:03:05  InnoDB: Starting shutdown...
111129 13:03:06  InnoDB: Shutdown completed; log sequence number 43946523