备份脚本:

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操作日志的更多相关文章

  1. Mysql 纪录用户操作日志

    有时,我们想追踪某个数据库操作记录,如想找出是谁操作了某个表(比如谁将字段名改了). 二进制日志记录了操作记录,线程号等信息,但是却没有记录用户信息,因此需要结合init-connect来实现追踪. ...

  2. mysql之 innobackupex备份+binlog日志的完全恢复【转】

    前言: MySQL的完全恢复,我们可以借助于完整的 备份+binlog 来将数据库恢复到故障点. 备份可以是热备与逻辑备份(mysqldump),只要备份与binlog是完整的,都可以实现完全恢复. ...

  3. MySql 的操作日志 历史记录

    如何查看mysql数据库操作记录日志 1.首先确认你日志是否启用了mysql>show variables like 'log_bin'. 2.如果启用了,即ON,那日志文件就在mysql的安装 ...

  4. mysql颠覆实战笔记(三)-- 用户登录(二):保存用户操作日志的方法

    版权声明:笔记整理者亡命小卒热爱自由,崇尚分享.但是本笔记源自www.jtthink.com(程序员在囧途)沈逸老师的<web级mysql颠覆实战课程 >.如需转载请尊重老师劳动,保留沈逸 ...

  5. [实战]MVC5+EF6+MySql企业网盘实战(21)——网盘操作日志

    写在前面 上篇文章介绍了一个bootstrap的分页插件,这篇将弄一个完整的例子,就以日志分页为例说明如何请求服务端然后进行分页. 系列文章 [EF]vs15+ef6+mysql code first ...

  6. mysql热备及查询mysql操作日志

    mysql热备 1 查看mysql版本,保证主库低于等于从库 2 主库配置:   A 需要打开支持日志功能:log-bin=mysql-bin   B 提供server-id:server-id=1  ...

  7. MySQL数据库4Python操作mysql、索引、慢查询日志

    目录 一.Python 操作 mysql 1.1python 操作 mysql 1.2查询数据 1.3增加(添加.更新)数据 1.4修改数据 1.5删除数据 1.6SQL注入问题 1.6.1问题的引入 ...

  8. mysql 选取操作日志(mysql-bin.0000恢复数据)

    my.ini 配置log-bin=mysql-bin 启用日志 用  mysql-bin.0000 mysqlbinlog -d keyboard ../data/mysql-bin.000024 – ...

  9. MySQL备份与恢复-innobackupex

    :上一片myloder搞崩溃,为什么百度的博文都是抄袭一模一样的,哎烦! 这一片文章我们来介绍物理备份工具xtracebackup! 首先是安装可以percona官网下载安装,下载rpm包直接yum安 ...

  10. MySQL Backup mysqldump备份流程学习

    我们都知道MySQL逻辑备份工具mysqldump可以保证备份数据的一致性,但是它是怎么保持一致性的? 本文不讨论mysqldump具体的选项和用法,一直对mysqldump的工作机制梳理的不太清楚, ...

随机推荐

  1. 认领该应用 apk空白包签名 方法

    起因: apicloud开发的项目,上架应用宝市场,被要求做这个 解决方法: 下载签名工具,并解压缩.解压缩.解压后是两个文件夹,选择keystore签名工具. 下载地址: linux 签名工具(命令 ...

  2. TypeScript 菜鸟教程

    非常好的Js教程,web api,canvas API教程 https://wangdoc.com/ 语法基础 https://www.runoob.com/typescript/ts-install ...

  3. EasyNVR摄像机网页H5全平台无插件直播流媒体播放服务二次开发之接口鉴权示例讲解

    背景需求 EasyNVR的使用者应该都清楚的了解到,EasyNVR一个强大的功能就是可以进行全平台的无插件直播.主要原因在于rtsp协议的视频流(默认是需要插件才可以播放的)经由EasyNVR处理可以 ...

  4. jwplayer :若请求不到流,则页面一直转圈请求效果

    思路: 利用jwplayer onPlay(播放) .onError(出错)事件. 页面:背景图为黑色,嵌入一张背景为黑色的 git 动态图,加载页面时隐藏. 流程:若进入到onPlay 方法,则说明 ...

  5. [LeetCode] 361. Bomb Enemy 炸敌人

    Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number zero), return ...

  6. RAID磁盘阵列结构

    RAID磁盘阵列结构原理其实很简单,就是每块硬盘不插在主板的硬盘接口上了,而是全插在RAID卡上,然后RAID卡再插到主板上,由RAID卡统一管理硬盘,做各种RAID磁盘策略(RAID0,RAID1, ...

  7. 【Python开发】C和Python之间的接口实现

    作者:Jerry Jho 链接:https://www.zhihu.com/question/23003213/answer/56121859 ## 更新:关于ctypes,见拙作 聊聊Python ...

  8. objectARX2010及其以上版本使用publish打印(发布)图纸,后台布局打印图纸例子浅析

    AutoCAD 2010版本开始新增了一个发布图纸的功能,可以后台打印图纸,以下是ADN官方博客例子浅析 原文地址 https://adndevblog.typepad.com/autocad/201 ...

  9. 湖南省第6届程序大赛 Repairing a Road

    Problem G Repairing a Road You live in a small town with R bidirectional roads connecting C crossing ...

  10. 对于并发任务,应该使用 Task 替代 BackgroundWorker

    背景 EF + Oracle,并发存储监控记录,使用 BackgroundWorker 时产生错误如下: public void MonitorLogging(DateTime DateStart, ...