xtrabackup增量备份方案,备份恢复全过程记录(四)

2014-11-24 11:54:06 · 作者: · 浏览: 1
048576 Mar 27 14:49 t.ibd
[root@Slave02 inno]# chown -R mysql:mysql /usr/local/mysql/data/inno/ ----修改权限和全备的走的流程一样
[root@Slave02 inno]# ls -la
total 2112
drwx------ 2 mysql mysql 4096 Mar 27 14:49 .
drwxr-xr-x 8 mysql mysql 4096 Mar 27 14:49 ..
-rw-r----- 1 mysql mysql 8554 Mar 27 14:49 mm.frm
-rw-r--r-- 1 mysql mysql 1048576 Mar 27 14:49 mm.ibd
-rw-r----- 1 mysql mysql 8554 Mar 27 14:49 t.frm
-rw-r--r-- 1 mysql mysql 1048576 Mar 27 14:49 t.ibd
[root@Slave02 inno]# service mysqld restart -----重新启动数据库即可
Shutting down MySQL... [ OK ]
Starting MySQL.. [ OK ]
[root@Slave02 inno]# mysql -uroot -proot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.13-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
use inno
Database changed
mysql> show tables; ---严重增量备份的数据是否有效
+----------------+
| Tables_in_inno |
+----------------+
| mm |
| t |
+----------------+
2 rows in set (0.00 sec)
mysql> select * from mm;
+------+
| a |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 9999 |
+------+
5 rows in set (0.01 sec)
mysql> select * from t;
+------+
| a |
+------+
| 1 |
| 2 |
| 3 |
| 9999 |
+------+
4 rows in set (0.00 sec)
mysql> -------经校验无误,增量备份成功;
增量备份优点:
  1、数据库太大没有足够的空间全量备份,作增量备份有效节省空间,且效率高。
  2、支持热备份。备份过程不锁表,不受时间限制,不影响用户使用。
  3、每日备份只产生少量数据,远程备份传输更方便。同时节省空间。
  4、备份恢复基于文件操作,降低直接对数据库操作风险。
  5、备份效率更高,恢复效率更高。
6、现在的增量备份可以通道来进行备份比以前老版本的速度快很多,大家可以使用,目前测试,生产上可以12个通道一起开通,上百G的数据文件,增备很快便可完成