MySQL | |
RELOAD/ LOCK TABLES | RELOADflush-hosts, flush-logs, flush-privileges, flush-status, flush-tables,flush-threads, refresh, reloadXtraBackup FLUSH TABLES WITH READ LOCK FLUSH ENGINE LOGS |
REPLICATION CLIENT | Position |
CREATE TABLESPACE | |
PROCESS | SHOW ENGINE INNODB STATUS |
SUPER | slave threads |
CREATE | Percon ServerPERCONA_SCHEMA.xtrabackup_history |
INSERT | PERCONA_SCHEMA.xtrabackup_history |
SELECT | ERCONA_SCHEMA.xtrabackup_history |
mysql> use mysql;
Database changed
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql>
[root@DB-Server ~]# chown -R mysql:mysql /data
[root@DB-Server ~]# su - mysql
-bash-3.2$
参数--no-timestamp 表示不生成带时间戳的目录
mysql> use MyDB;
Database changed
Query OK, 0 rows affected (0.13 sec)
mysql> insert into test
Query OK, 1 row affected (0.01 sec)
mysql> insert into test
Query OK, 1 row affected (0.01 sec)
mysql> insert into test
Query OK, 1 row affected (0.01 sec)
mysql>
[root@DB-Server 2017-07-19_17-39-56]# ls -lrt
total 12380
-rw-r----- 1 mysql mysql 12582912 Jul 19 17:39 ibdata1
[root@DB-Server 2017-07-19_17-39-56]# more xtrabackup_checkpoints
backup_type = full-backuped
from_lsn = 0
to_lsn = 1637691
last_lsn = 1637691
compact = 0
recover_binlog_info = 0
[root@DB-Server 2017-07-19_17-39-56]# more xtrabackup_binlog_info
[root@DB-Server 2017-07-19_17-39-56]# more xtrabackup_info
uuid = cfb5c2d8-6cca-11e7-8113-b083fe5532e5
name =
tool_name = innobackupex
tool_command = --defaults-file=/usr/my.cnf --user=backuser --password=... /u02/mysql_backup/full
tool_version = 2.4.6
ibbackup_version = 2.4.6
server_version = 5.6.20-enterprise-commercial-advanced-log
start_time = 2017-07-19 17:39:56
end_time = 2017-07-19 17:39:58
lock_time = 0
binlog_pos = filename 'DB-Server-bin.000001', position '871'
innodb_from_lsn = 0
innodb_to_lsn = 1637691
partial = N
incremental = N
format = file
compact = N
compressed = N
encrypted = N
[root@DB-Server ~]# service mysql start
[root@DB-Server ~]# mysql -u root -p
Enter password:
Your MySQL connection id is 1
Server version: 5.6.20-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2014, 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.
mysql> use MyDB;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from test;
+------+
+------+
| 1000 |
| 2000 |
| 3000 |
+------+
3 rows in set (0.00 sec)
[root@DB-Server 2017-07-24_09-40-11]# more xtrabackup_info
uuid = 9f916d24-7075-11e7-8f2e-b083fe5532e5
name =
tool_name = innobackupex
tool_command = --defaults-file=/usr/my.cnf --user=root --password=... --incremental --incremental-basedir=/u02/mysql_backup/full/2017-07-24_09-38-32/ /u02/mysql_backup/incr/
tool_version = 2.4.6