MySQL Backup--innobackupex操作日志
备份脚本:
innobackupex \
--defaults-file="/export/servers/mysql/etc/my.cnf" \
--host="localhost" \
--port=3358 \
--user='admin' \
--password='admin_psw' \
--slave-info \
--safe-slave-backup \
"/export/bak/"
备份操作访问MySQL记录:
--05T14::43.620313+: Connect root@localhost on using Socket
--05T14::43.620472+: Query set autocommit=
--05T14::43.620585+: Query SET SESSION wait_timeout=
--05T14::43.620722+: Query SELECT CONCAT(@@hostname, @@port)
--05T14::43.620922+: Quit
--05T14::43.622332+: Connect root@localhost on using Socket
--05T14::43.622387+: Query SET SESSION wait_timeout=
--05T14::43.622454+: Query SHOW VARIABLES
--05T14::43.624597+: Query SHOW ENGINE INNODB STATUS
--05T14::43.625395+: Query SELECT
CONCAT(table_schema, '/', table_name), engine
FROM information_schema.tables
WHERE engine NOT IN (
'MyISAM', 'InnoDB', 'CSV', 'MRG_MYISAM'
)
AND table_schema NOT IN (
'performance_schema', 'information_schema', 'mysql'
)
--05T14::46.878898+: Query SHOW SLAVE STATUS
--05T14::46.879139+: Query SET SESSION lock_wait_timeout=
--05T14::46.879229+: Query FLUSH NO_WRITE_TO_BINLOG TABLES
--05T14::46.879381+: Query FLUSH TABLES WITH READ LOCK
--05T14::46.964749+: Query SHOW VARIABLES
--05T14::46.967103+: Query SHOW SLAVE STATUS
--05T14::46.967201+: Query SHOW MASTER STATUS
--05T14::46.967244+: Query SHOW VARIABLES
--05T14::46.969062+: Query FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS
--05T14::47.169430+: Query UNLOCK TABLES
--05T14::47.170049+: Query SELECT UUID()
--05T14::47.170119+: Query SELECT VERSION()
--05T14::47.374226+: Quit
备份操作输出日志:
190605 14:28:14 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
190605 14:28:14 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=localhost;port=3358' as 'admin' (using password: YES).
190605 14:28:14 version_check Connected to MySQL server
190605 14:28:14 version_check Executing a version check against the server...
190605 14:28:14 version_check Done.
190605 14:28:14 Connecting to MySQL server host: localhost, user: admin, password: set, port: 3358, socket: not set
Using server version 5.7.24-log
innobackupex version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 97330f7)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /export/data/mysql/data/
xtrabackup: open files limit requested 65535, set to 196605
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = /export/data/mysql/data
xtrabackup: innodb_data_file_path = ibdata1:1024M:autoextend
xtrabackup: innodb_log_group_home_dir = /export/data/mysql/data
xtrabackup: innodb_log_files_in_group = 3
xtrabackup: innodb_log_file_size = 1073741824
xtrabackup: using O_DIRECT
InnoDB: Number of pools: 1
190605 14:28:14 >> log scanned up to (2510555)
InnoDB: Opened 4 undo tablespaces
InnoDB: 0 undo tablespaces made active
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 27 for db001/tb001, old maximum was 4
190605 14:28:14 [01] Copying /export/data/mysql/data/ibdata1 to /export/bak/2019-06-05_14-28-14/ibdata1
190605 14:28:15 >> log scanned up to (2510555)
190605 14:28:16 >> log scanned up to (2510555)
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying /export/data/mysql/undo/undo001 to /export/bak/2019-06-05_14-28-14/undo001
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying /export/data/mysql/undo/undo002 to /export/bak/2019-06-05_14-28-14/undo002
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying /export/data/mysql/undo/undo003 to /export/bak/2019-06-05_14-28-14/undo003
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying /export/data/mysql/undo/undo004 to /export/bak/2019-06-05_14-28-14/undo004
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying ./db001/tb001.ibd to /export/bak/2019-06-05_14-28-14/db001/tb001.ibd
190605 14:28:17 [01] ...done
Not checking slave open temp tables for --safe-slave-backup because host is not a slave
190605 14:28:17 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
190605 14:28:17 Executing FLUSH TABLES WITH READ LOCK...
190605 14:28:17 Starting to backup non-InnoDB tables and files
190605 14:28:17 [01] Copying ./db001/db.opt to /export/bak/2019-06-05_14-28-14/db001/db.opt
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying ./db001/tb002.MYD to /export/bak/2019-06-05_14-28-14/db001/tb002.MYD
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying ./db001/tb002.frm to /export/bak/2019-06-05_14-28-14/db001/tb002.frm
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying ./db001/tb002.MYI to /export/bak/2019-06-05_14-28-14/db001/tb002.MYI
190605 14:28:17 [01] ...done
190605 14:28:17 [01] Copying ./db001/tb001.frm to /export/bak/2019-06-05_14-28-14/db001/tb001.frm
190605 14:28:17 [01] ...done
190605 14:28:18 [01] Copying ./mysql/innodb_index_stats.frm to /export/bak/2019-06-05_14-28-14/mysql/innodb_index_stats.frm
190605 14:28:18 [01] ...done
190605 14:28:18 [01] Copying ./mysql/gtid_executed.frm to /export/bak/2019-06-05_14-28-14/mysql/gtid_executed.frm
190605 14:28:18 [01] ...done
190605 14:28:18 Finished backing up non-InnoDB tables and files
190605 14:28:18 [00] Writing /export/bak/2019-06-05_14-28-14/xtrabackup_binlog_info
190605 14:28:18 [00] ...done
190605 14:28:18 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '2510546'
xtrabackup: Stopping log copying thread.
.190605 14:28:18 >> log scanned up to (2510555)
190605 14:28:18 Executing UNLOCK TABLES
190605 14:28:18 All tables unlocked
190605 14:28:18 [00] Copying ib_buffer_pool to /export/bak/2019-06-05_14-28-14/ib_buffer_pool
190605 14:28:18 [00] ...done
190605 14:28:18 Backup created in directory '/export/bak/2019-06-05_14-28-14/'
MySQL binlog position: filename 'mysql-bin.000002', position '6503', GTID of the last change '38787e3d-86a3-11e9-b1b1-246e965eae3d:1-21'
190605 14:28:18 [00] Writing /export/bak/2019-06-05_14-28-14/backup-my.cnf
190605 14:28:18 [00] ...done
190605 14:28:18 [00] Writing /export/bak/2019-06-05_14-28-14/xtrabackup_info
190605 14:28:18 [00] ...done
xtrabackup: Transaction log of lsn (2510546) to (2510555) was copied.
190605 14:28:18 completed OK!
在备份过程中,先拷贝Innodb表数据,然后在备份非InnoDB表时备份InnoDB表的表结构。
MySQL Backup--innobackupex操作日志的更多相关文章
- Mysql 纪录用户操作日志
有时,我们想追踪某个数据库操作记录,如想找出是谁操作了某个表(比如谁将字段名改了). 二进制日志记录了操作记录,线程号等信息,但是却没有记录用户信息,因此需要结合init-connect来实现追踪. ...
- mysql之 innobackupex备份+binlog日志的完全恢复【转】
前言: MySQL的完全恢复,我们可以借助于完整的 备份+binlog 来将数据库恢复到故障点. 备份可以是热备与逻辑备份(mysqldump),只要备份与binlog是完整的,都可以实现完全恢复. ...
- MySql 的操作日志 历史记录
如何查看mysql数据库操作记录日志 1.首先确认你日志是否启用了mysql>show variables like 'log_bin'. 2.如果启用了,即ON,那日志文件就在mysql的安装 ...
- mysql颠覆实战笔记(三)-- 用户登录(二):保存用户操作日志的方法
版权声明:笔记整理者亡命小卒热爱自由,崇尚分享.但是本笔记源自www.jtthink.com(程序员在囧途)沈逸老师的<web级mysql颠覆实战课程 >.如需转载请尊重老师劳动,保留沈逸 ...
- [实战]MVC5+EF6+MySql企业网盘实战(21)——网盘操作日志
写在前面 上篇文章介绍了一个bootstrap的分页插件,这篇将弄一个完整的例子,就以日志分页为例说明如何请求服务端然后进行分页. 系列文章 [EF]vs15+ef6+mysql code first ...
- mysql热备及查询mysql操作日志
mysql热备 1 查看mysql版本,保证主库低于等于从库 2 主库配置: A 需要打开支持日志功能:log-bin=mysql-bin B 提供server-id:server-id=1 ...
- MySQL数据库4Python操作mysql、索引、慢查询日志
目录 一.Python 操作 mysql 1.1python 操作 mysql 1.2查询数据 1.3增加(添加.更新)数据 1.4修改数据 1.5删除数据 1.6SQL注入问题 1.6.1问题的引入 ...
- mysql 选取操作日志(mysql-bin.0000恢复数据)
my.ini 配置log-bin=mysql-bin 启用日志 用 mysql-bin.0000 mysqlbinlog -d keyboard ../data/mysql-bin.000024 – ...
- MySQL备份与恢复-innobackupex
:上一片myloder搞崩溃,为什么百度的博文都是抄袭一模一样的,哎烦! 这一片文章我们来介绍物理备份工具xtracebackup! 首先是安装可以percona官网下载安装,下载rpm包直接yum安 ...
- MySQL Backup mysqldump备份流程学习
我们都知道MySQL逻辑备份工具mysqldump可以保证备份数据的一致性,但是它是怎么保持一致性的? 本文不讨论mysqldump具体的选项和用法,一直对mysqldump的工作机制梳理的不太清楚, ...
随机推荐
- mysql中的递归
别人问的一个需求: 数据库里面保存的是父子关系结构: 展示出来的需要根据子类一直查到顶类后将名称全部放一个字段里面,如下: 比如输入的code是1099,名称要显示 配料/花椒/ces ...
- RedisHelper Redis帮助类
using StackExchange.Redis; using System; using System.Collections.Generic; using System.IO; using Sy ...
- Centos7.3部署安装Maven
需要提前配置好java环境 1.下载压缩包 将安装包下载到root家目录下 http://maven.apache.org/download.cgi 选择bin.tar.gz格式的压缩包 我是直接执行 ...
- [LeetCode] 237. Delete Node in a Linked List 删除链表的节点
Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...
- nvm安装、解决nvm command not found问题、卸载
安装 nvm是node的包版本管理工具,github地址如下:nvm 安装命令 1 curl -o- https://raw.githubusercontent.com/creationix/nvm/ ...
- 最新 梆梆安全java校招面经 (含整理过的面试题大全)
从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿.梆梆安全等10家互联网公司的校招Offer,因为某些自身原因最终选择了梆梆安全.6.7月主要是做系统复习.项目复盘.Leet ...
- openstack-keystone外组件命令行
摘自openstack文档 镜像(glance) 列出您可以访问的镜像 $ openstack image list 删除指定的镜像 $ openstack image delete IMAGE 描述 ...
- JAVA代码:生成一个集合,自定义大小,100以内的随机整数
JAVA代码:生成一个集合,自定义大小,100以内的随机整数 方法一:(Random类) package com.dawa.test; import java.util.ArrayList; impo ...
- python实践项目六:正则表达式-强口令
描述:写一个函数,它使用正则表达式,确保传入的口令字符串是强口令.强口令的定义是:长度不少于8 个字符, 同时包含大写和小写字符, 至少有一位数字. 代码: #!/usr/bin/python # ...
- 小程序重置index,重置item
重置index,重置item <block wx:for="{{index_data.banner_list}}" wx:for-index="idx" ...