Skip to content
MySQL教程
Appearance
Menu
Return to top
On this page
基于日志的恢复
时间点恢复 PITR
先有
全量备份
(某时刻 T0)。
保留
T0 之后的 binlog
。
恢复到
误操作前
:全量恢复到 T0,再用
mysqlbinlog
重放 binlog 到目标时刻,
跳过
误删语句(手工编辑或
GTID 排除
,复杂需谨慎)。
mysqlbinlog
将 binlog 转为可读 SQL 或管道给
mysql
执行。
生产
恢复在
隔离实例
验证后再切换。
RPO
无连续 binlog 则
最多丢到上次全备
;重要库
binlog 与全备
双保留。