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工具来备份一个库,并使用完全恢复还原了数据库.在结尾也讲到了误操作是不能用完全恢复的.解决办法是:我们需要恢复到误操作之前的状态,然后跳过误操作 ...
随机推荐
- 做h5动画会用到的一个很好的缓动算法库
http://www.zhangxinxu.com/wordpress/2016/12/how-use-tween-js-animation-easing/
- android ------- 开发者的 RxJava 详解
在正文开始之前的最后,放上 GitHub 链接和引入依赖的 gradle 代码: Github: https://github.com/ReactiveX/RxJava https://github. ...
- vue 上传图片视频组件,可拍照选择照片,解决苹果手机拍照旋转问题
1.创建组件components > uploadImg > index.vue <template> <input type="file" name ...
- 『TensorFlow』使用集合collection控制variables
Variable Tensorflow使用Variable类表达.更新.存储模型参数. Variable是在可变更的,具有保持性的内存句柄,存储着Tensor 在整个session运行之前,图中的全部 ...
- 『OpenCV3』基于色彩分割图片
一.遍历图像实现色彩掩码 本节我们实现这样一个算法,我们指定某种颜色和一个阈值,根据输入图片生成一张掩码,标记符合的像素(和指定颜色的差异在阈值容忍内). 源代码如下,我们使用一个class完成这个目 ...
- 数据分析库之matplotlib
一.Matplotlib基础知识 Matplotlib中的基本图表包括的元素 x轴和y轴 axis 水平和垂直的轴线 轴标签 axisLabel 水平和垂直的轴标签 x轴和y轴刻度 tick 刻度标示 ...
- html 存放PDF文档
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" hei ...
- vue-router中query和params传参(接收参数)以及$router、$route的区别
query传参: this.$router.push({ path:'/...' query:{ id:id } }) 接收参数:this.$route.query.id params传值: 传参: ...
- nginx中try_files
location / { try_files $uri $uri/ /index.php?$query_string; } 当用户请求 http://localhost/example 时,这里的 $ ...
- 【转】ASP.NET Core开发之HttpContext
ASP.NET Core中的HttpContext开发,在ASP.NET开发中我们总是会经常用到HttpContext. 那么在ASP.NET Core中要如何使用HttpContext呢,下面就来具 ...