如何在Mysql中进行增量备份 [英] How to do a incremental backup in Mysql
问题描述
Possible Duplicate:
What is the best way to do Incremental backups in Mysql?
有没有办法在MySQL中进行 differential 增量备份?我不知道是否有PHP脚本或Shell脚本能够做到这一点.
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.
我相信每个表状态都必须保存,并且它们的差异必须在备份中导出.有什么办法做到这一点?
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.
我忘记指定数据库引擎为InnoDB
I forgot to specify that my DB engine is InnoDB
推荐答案
是的,被称为增量备份,而不是差异备份
(如果我做错了假设,请纠正我)
Yes, is called incremental backup instead of differential backup
(correct me if I making wrong assumption)
使用二进制日志(复制sql日志)
use binary log (replication sql log)
- http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html
- http://dev.mysql. com/doc/refman/5.1/en/point-in-time-recovery.html
- http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html
- http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html
简而言之,二进制日志包含写入sql的列表(insert,delete,update,alter table ...),并依次执行这些语句将提供增量更新(这就是复制的作用)
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)
这篇关于如何在Mysql中进行增量备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!