什么是在MySQL中执行增量备份的最佳方式? [英] What is the best way to do incremental backups in MySQL?

查看:102
本文介绍了什么是在MySQL中执行增量备份的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用MySQL 5.0版本,大多数表是InnoDB。我们运行复制到从服务器。我们正在考虑每天备份MySQL日志文件。

We are using MySQL version 5.0 and most of the tables are InnoDB. We run replication to a slave server. We are thinking of backing up the MySQL log files on a daily basis.



  • 执行增量备份时的最佳做法是什么?

  • ul>
  • Is there any other way of doing an incremental backup without using the log files?
  • What are the best practices when doing incremental backups?

推荐答案

AFAIK进行增量备份的唯一方法是使用二进制日志。如果您想要进行完整备份(InnoDB热复制),您还有其他选项,但增量意味着您需要记录所有已完成的交易。

AFAIK the only way of doing incremental backups is by using the binary-log. You have other options if you want to do full backups (InnoDB hotcopy), but incremental means that you need to log all transactions made.

您需要问自己为什么'备份数据。因为你有一个从属的复制,我认为备份主要是为了恢复数据,如果意外删除?

You need to ask yourself why you're backing up data. Since you have a slave for replication, I assume the backup is primarly for reverting data in case of accidental deletion?

我可能每1小时旋转日志,并采取备份它。这意味着,恢复会将数据保留至多1小时,您可以恢复到上次完整快照后的任何时间点。

I would probably rotate the logs every 1 hour and take a backup of it. Meaning, restoring would leave the data at most 1 hour old, and you can restore to any point in time since the last full snapshot.

这篇关于什么是在MySQL中执行增量备份的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆