设为首页 加入收藏

TOP

使用XtraBackup 备份MySQL数据库(四)
2016-12-28 08:15:44 】 浏览:537
Tags:使用 XtraBackup 备份 MySQL 数据库
: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 2671671
InnoDB: Number of pools: 1
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 = 2
xtrabackup: innodb_log_file_size = 50331648
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: Setting log file ./ib_logfile101 size to 48 MB
InnoDB: Setting log file ./ib_logfile1 size to 48 MB
InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
InnoDB: New log files created, LSN=2671671
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 2672140
InnoDB: Doing recovery: scanned up to log sequence number 2672149 (0%)
InnoDB: Doing recovery: scanned up to log sequence number 2672149 (0%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Removed temporary tablespace data file: "ibtmp1"
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 2672149
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 2672168
161213 12:36:30 completed OK!
#查看prepare后数据目录的大小
[root@rhel7 ~]# ls -l /mysqlbackup/
total 4
drwxr-x---. 7 root root 4096 Dec 13 12:36 2016-12-13_12-27-13
[root@rhel7 ~]# du -sm /mysqlbackup/*
206 /mysqlbackup/2016-12-13_12-27-13


prepare完成后恢复数据到原MySQL的数据目录


注意:MySQL的数据目录必须为空,MySQL服务也必须停止,否则恢复会报错(除非恢复部分备份)


4.增量备份的操作步骤


1)创建备份,增量备份需要有一个全量备份做基础,所以先做一个全量备份再做增量备份


#创建全备
[root@rhel7 mysql]# innobackupex --user=root --password=123456 /mysqlbackup/
[root@rhel7 mysql]# ls -l /mysqlbackup/
total 4
drwxr-x---. 8 root root 4096 Dec 13 13:10 2016-12-13_13-10-48
#删除一个测试库
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |
| wl |
| zx |
+--------------------+
7 rows in set (0.00 sec)

mysql> drop database zx;
Query OK, 0 rows affected (0.07 sec)
#创建增量备份(基于全备)
[root@rhel7 mysql]# innobackupex --user=root --password=123456 --incremental /mysqlbackup/ --incremental-basedir=/mysqlbackup/2016-12-13_13-10-48/
......
[root@rhel7 mysql]# ls -l /mysqlbackup/
total 8
drwxr-x---. 8 root root 4096 Dec 13 13:10 2016-12-13_13-10-48
drwxr-x---. 7 root root 4096 Dec 13 13:16 2016-12-13_13-16-17
[root@rhel7 mysql]# du -sm /mysqlbackup/*
90 /mysqlbackup/2016-12-13_13-10-48
3 /mysqlbackup/

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

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目