如何在Mysql中进行增量备份[重复]

时间:2022-11-26 23:02:44

Possible Duplicate:
What is the best way to do Incremental backups in Mysql?

可能重复:在Mysql中进行增量备份的最佳方法是什么?

Is there a way to do differential incremental backup in MySQL ? I dont know if there is a PHP script or shell script able to do this.

有没有办法在MySQL中进行差异增量备份?我不知道是否有PHP脚本或shell脚本能够做到这一点。

I believe each tables states must be saved and their differences must be exported in the backup. Any way to accomplish this?

我相信必须保存每个表状态,并且必须在备份中导出它们的差异。有没有办法实现这个目标?

I know there are other types of backup but I like the way smallers backup are generated at time in differential incremental backups.

我知道还有其他类型的备份,但我喜欢在差异增量备份中生成smallers备份的方式。

Edit:

编辑:

I forgot to specify that my DB engine is InnoDB

我忘了指定我的数据库引擎是InnoDB

1 个解决方案

#1


6  

Yes, is called incremental backup instead of differential backup
(correct me if I making wrong assumption)

是的,称为增量备份而不是差异备份(如果我做出错误的假设,请更正我)

use binary log (replication sql log)

使用二进制日志(复制sql日志)

in nutshell, binary log contains list of write sql (insert,delete,update,alter table...) and execute these statement sequentially will provide a incremental update (which is what replication does)

简而言之,二进制日志包含写入sql的列表(插入,删除,更新,更改表...)并按顺序执行这些语句将提供增量更新(这是复制的作用)

#1


6  

Yes, is called incremental backup instead of differential backup
(correct me if I making wrong assumption)

是的,称为增量备份而不是差异备份(如果我做出错误的假设,请更正我)

use binary log (replication sql log)

使用二进制日志(复制sql日志)

in nutshell, binary log contains list of write sql (insert,delete,update,alter table...) and execute these statement sequentially will provide a incremental update (which is what replication does)

简而言之,二进制日志包含写入sql的列表(插入,删除,更新,更改表...)并按顺序执行这些语句将提供增量更新(这是复制的作用)