设为首页 加入收藏

TOP

mysql的xtrabackup备份恢复等基本操作教程(四)
2018-04-18 06:06:46 】 浏览:770
Tags:mysql xtrabackup 备份 恢复 基本操作 教程
puser'@'localhost' IDENTIFIED BY 'S3cret2233$'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO 'bkpuser'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) --设置备份路径 [root@single-instance xtrabackup_dir]# mkdir -p /mysql/xtrabackup_dir/ [root@single-instance xtrabackup_dir]# chown mysql:mysql /mysql/xtrabackup_dir/ [root@single-instance ~]# vi /etc/my.cnf --添加参数 [xtrabackup] target_dir = /mysql/xtrabackup_dir/

3、xtrabackup全量备份

--xtrabackup 全量备份
[root@single-instance ~]# xtrabackup --backup --user=bkpuser --password=S3cret2233$
180416 17:38:44  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'bkpuser'  (using password: YES).
180416 17:38:44  version_check Connected to MySQL server
180416 17:38:44  version_check Executing a version check against the server...
180416 17:38:44  version_check Done.
180416 17:38:44 Connecting to MySQL server host: localhost, user: bkpuser, password: set, port: not set, socket: not set
Using server version 5.7.19-log
xtrabackup version 2.4.10 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 3198bce)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
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: Number of pools: 1
180416 17:38:44 >> log scanned up to (2777824)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 54 for flydb/t_list#P#p0, old maximum was 0
180416 17:38:44 [01] Copying ./ibdata1 to /mysql/xtrabackup_dir/ibdata1
180416 17:38:44 [01]        ...done
......
180416 17:38:44 [01] Copying ./mysql/slave_worker_info.ibd to /mysql/xtrabackup_dir/mysql/slave_worker_info.ibd
180416 17:38:44 [01]        ...done
180416 17:38:45 >> log scanned up to (2777824)
180416 17:38:45 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
180416 17:38:45 Executing FLUSH TABLES WITH READ LOCK...
180416 17:38:45 Starting to backup non-InnoDB tables and files
180416 17:38:45 [01] Copying ./flydb/t_list.frm to /mysql/xtrabackup_dir/flydb/t_list.frm
180416 17:38:45 [01]        ...done
......
180416 17:38:47 [01] Copying ./mysql/help_relation.frm to /mysql/xtrabackup_dir/mysql/help_relation.frm
180416 17:38:47 [01]        ...done
180416 17:38:47 Finished backing up non-InnoDB tables and files
180416 17:38:47 [00] Writing /mysql/xtrabackup_dir/xtrabackup_binlog_info
180416 17:38:47 [00]        ...done
180416 17:38:47 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '2777815'
xtrabackup: Stopping log copying thread.
.180416 17:38:47 >> log scanned up to (2777824)

180416 17:38:47 Executing UNLOCK TABLES
180416 17:38:47 All tables unlocked
180416 17:38:47 [00] Copying ib_buffer_pool to /mysql/xtrabackup_dir/ib_buffer_pool
180416 17:38:47 [00]        ...done
180416 17:38:47 Backup created in directory '/mysql/xtrabackup_dir/'
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 4/10/10
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇阿里云服务器上安装mysql并开启远.. 下一篇Centos7系统下安装Mysql教程

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目