设为首页 加入收藏

TOP

使用XtraBackup 备份MySQL数据库(二)
2016-12-28 08:15:44 】 浏览:540
Tags:使用 XtraBackup 备份 MySQL 数据库
lbackup/2016-12-13_12-27-13/ib_buffer_pool
161213 12:27:18 [00] ...done
161213 12:27:18 Backup created in directory '/mysqlbackup/2016-12-13_12-27-13'
161213 12:27:18 [00] Writing backup-my.cnf
161213 12:27:18 [00] ...done
161213 12:27:18 [00] Writing xtrabackup_info
161213 12:27:18 [00] ...done
xtrabackup: Transaction log of lsn (2671634) to (2671643) was copied.
161213 12:27:19 completed OK!
#在指定的目录下生成了一个时间目录
[root@rhel7 ~]# ls -l /mysqlbackup/
total 4
drwxr-x---. 7 root root 4096 Dec 13 12:27 2016-12-13_12-27-13
[root@rhel7 ~]# du -sm /mysqlbackup/*
90 /mysqlbackup/2016-12-13_12-27-13


注意:innobackupex会去读取my.cnf文件中的[mysqld]和[xtrabackup]部分,也可以使用--defaults-file指定参数文件。


2)恢复全备的数据


备份的数据不能直接使用,需要先做prepare操作(可以理解为应用日志的过程,commit的事务提交,未commit的事务回滚)


#使用--apply-log应用日志,
[root@rhel7 ~]# innobackupex --apply-log /mysqlbackup/2016-12-13_12-27-13/
161213 12:36:24 innobackupex: Starting the apply-log operation

IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".

innobackupex version 2.4.5 based on MySQL server 5.7.13 Linux (x86_64) (revision id: e41c0be)
xtrabackup: cd to /mysqlbackup/2016-12-13_12-27-13/
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=(2671634)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 8388608
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 8388608
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: PUNCH HOLE support not available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Number of pools: 1
InnoDB: Not using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 2671634
InnoDB: Doing recovery: scanned up to log sequence number 2671643 (0%)
InnoDB: Doing recovery: scanned up to log sequence number 2671643 (0%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: Waiting for purge to start
InnoDB: 5.7.13 started; log sequence number 2671643

xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB

首页 上一页 1 2 3 4 5 下一页 尾页 2/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Oracle dba_data_files数据字典里.. 下一篇Redis3.0.7集群部署完整版

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目