mysqlbinlog基于时间点恢复
基于时间点恢复
/data/mysq/mysqlbin.000026
#mysqlbinlog文件,恢复如下内容:
注意:按照时间点恢复时,可能同一个时间点有其他的操作,要结合上下文的时间选取~
# at 523
#181113 17:15:44 server id 161 end_log_pos 554 CRC32 0x2ad408d1 Xid = 4203
COMMIT/*!*/;
# at 554
#181113 17:16:01 server id 161 end_log_pos 637 CRC32 0x2b50f226 Query thread_id=324 exec_time=0 error_code=0
SET TIMESTAMP=1542100561/*!*/;
BEGIN
/*!*/;
# at 637
#181113 17:16:01 server id 161 end_log_pos 746 CRC32 0x711957ca Query thread_id=324 exec_time=0 error_code=0
SET TIMESTAMP=1542100561/*!*/;
update test set id=3 where id=4 #要取出的内容
/*!*/;
# at 746
#181113 17:16:01 server id 161 end_log_pos 777 CRC32 0x48210a15 Xid = 4217
COMMIT/*!*/;
# at 777
#181113 17:16:29 server id 161 end_log_pos 1201 CRC32 0xe8aa067a Query thread_id=324 exec_time=0 error_code=0
use `test`/*!*/;
SET TIMESTAMP=1542100589/*!*/;
create table student(
#基于时间恢复的命令如下:
[root@a mysql]# mysqlbinlog mysqlbin.000026 --start-datetime='2018-11-13 17:15:50' --stop-datetime='2018-11-13 17:16:25' -r /opt/time.binlog
[root@a mysql]# grep update /opt/time.binlog
update test set id=3 where id=4
mysqlbinlog基于时间点恢复的更多相关文章
- 7.5.1 Point-in-Time Recovery Using Event Times 使用Event Times 基于时间点恢复
7.5.1 Point-in-Time Recovery Using Event Times 使用Event Times 基于时间点恢复 表明开始和结束时间用于恢复, 指定 --start-datet ...
- 7.5 Point-in-Time (Incremental) Recovery Using the Binary Log 使用binay log 基于时间点恢复
7.5 Point-in-Time (Incremental) Recovery Using the Binary Log 使用binay log 基于时间点恢复 7.5.1 Point-in-Tim ...
- 【Oracle】rman基于时间点恢复
rman基于时间点恢复 场景: 由于某研究的误操作,导致财务模块的数据丢失,如何使用rman基于时间点恢复数据. 思路 1.克隆数据库的虚拟机,直接对数据库的数据进行恢复 RMAN> shutd ...
- 13. ClustrixDB 基于时间点恢复
在不太可能发生灾难的情况下,可以在特定数据库.表或整个集群上执行ClustrixDB集群的某个时间点恢复.应该非常小心地处理这一问题. 先决条件 在你可以使用时间点恢复之前,你的集群应该有几个先决条件 ...
- mysqlbinlog基于位置点恢复
基于位置点恢复 /data/mysq/mysqlbin.000026 #mysqlbinlog文件,恢复如下内容: # at 406 #181113 17:15:44 server id 161 e ...
- xtrabackup全量备份+binlog基于时间点恢复
1.通过xtrabackup的备份恢复数据库. 2.找到start-position和binlog名称 cat xtrabackup_info 3.导出mysqlbinlog为sql文件,并确定恢复的 ...
- 基于时间点恢复数据库stopat
create database newtestdb use newtestdbgo drop table t1go create table t1 (id int not null identity( ...
- 1.MongoDB 2.7主从复制(master –> slave)环境基于时间点的恢复
(一)MongoDB恢复概述 对于任何类型的数据库,如果要将数据库恢复到过去的任意时间点,否需要有过去某个时间点的全备+全备之后的重做日志,MongoDB也不例外.使用全备将数据库恢复到固定时刻,然后 ...
- mysql 开发进阶篇系列 43 逻辑备份与恢复(mysqldump 的基于时间和位置的不完全恢复)
一. 概述 在上篇讲到了逻辑备份,使用mysqldump工具来备份一个库,并使用完全恢复还原了数据库.在结尾也讲到了误操作是不能用完全恢复的.解决办法是:我们需要恢复到误操作之前的状态,然后跳过误操作 ...
随机推荐
- android -------- Retrofit + RxJava2.0 + Kotlin + MVP 开发的 WanAndroid 项目
简介 wanandroid项目基于 Retrofit + RxJava2.0 + Kotlin + MVP 用到的依赖 implementation 'io.reactivex.rxjava2:rxj ...
- 小程序 input 组件内容显示不全(显示的长度不满 input 宽度)问题
问题:小程序的input组件经常用到,但在使用input组件的时候会出现一种现象:明明设置了input的宽度,但是输入的内容显示的长度范围却怎么都不到一整个input组件的宽度,而且后面没显示的地方无 ...
- Bootstrap框架整理
bootstrap框架的介绍 栅格系统 bootstrap框架把整个浏览器的宽度分为12列,并能适配各种屏幕的尺寸大小进行相应的匹配,达到调节页面大小的效果. 首先需要放置一个容器div,class= ...
- Django框架(五)
九.Django与Ajax 一.Ajax简介 AJAX(Asynchronous Javascript And XML)翻译成中文就是“异步Javascript和XML”.即使用Javascript语 ...
- Solr安装使用教程
一.安装 1.1 安装jdk solr是基于lucene而lucene是java写的,所以solr需要jdk----当前安装的solr-7.5需要jdk-1.8及以上版本,下载安装jdk并设置JAVA ...
- Python字符编码的发展、cmd寻找路径
字符编码的发展: ASCII(American Standard Code for Information Interchange,美国标准信息交换代码)是基于拉丁字母的一套电脑编码系统,主要用于显示 ...
- 两小时内sql
select convert(datetime,convert(char(20),dateadd(hour,-2,getdate())))
- python mysql and ORM
http://www.cnblogs.com/alex3714/articles/5950372.html 9. ORM sqlachemy学习 http://www.cnblogs.com/alex ...
- C++ allocator
C++ allocator http://www.cnblogs.com/wpcockroach/archive/2012/05/10/2493564.html 说一说C++里的allocator.我 ...
- excel导入数据库实例(含源码 超级详细适合新手)
(案例的源码在我的百度网盘里,需要的朋友可以加我微信分享,gqljxg1514) 所有文件一览: 运行结果图: 1,首先创建实体类Student.java package com.b510.excel ...