2009年3月5日星期四

Mysql 备份解决方案的10点注意事项

Are you using someone else’s backup solution for your MySQL data? Do you care a lot about your data? Are you sure you’re getting a reliable, recoverable backup that’ll work for your business and your application, and won’t impact your critical processes while it runs? Here are ten questions you need to be able to answer:


1.是否是热备份?是的话,备份时服务器运行状态阻塞、I/O、缓存等对备份有什么影响?(Does the backup require shutting down MySQL? If not, what is the impact on the running server? Blocking, I/O load, cache pollution, etc? )
2.使用什么技术来备份,是mysqldump或者类似的方法,还是直接备份数据文件的方法?(What technique is used for the backup? Is it mysqldump or a custom product that does something similar? Is it a filesystem copy? )
3.InnoDB 引擎的数据库是不可以通过直接备份数据文件的方式来备份的(Does the backup system understand that you cannot back up InnoDB by simply copying its files? )
4.FLUSH TABLES, LOCK TABLES, or FLUSH TABLES WITH READ LOCK等操作都需要中断数据库的正常进程(Does the backup use FLUSH TABLES, LOCK TABLES, or FLUSH TABLES WITH READ LOCK? These all interrupt processing. )
5.对数据库还有其他的影响吗?(What other effects are there on MySQL? I’ve seen systems that do a RESET MASTER, which immediately breaks replication. Are there any FLUSH commands at all, like FLUSH LOGS? )
6.恢复备份的可靠性怎么样?(How does the system guarantee that you can perform point-in-time recovery? )
7.怎么样保证恢复后在二进制日志、InnoDB日志和主从复制之间数据的一致性?(How does the system guarantee consistency with the binary log, InnoDB logs, andreplication? )
8.可以使用这个系统来建立一个主从复制的从服务器吗?(Can you use the system to set up new MySQL replication slaves? How? )
9.此系统可验证备份是可恢复的吗?如:InnoDB 的恢复(Does the system verify that the backup is restorable, e.g. does it run InnoDB recovery before declaring success? )
10.对这个备份有系统的标准、保险和可恢复执行什么样的要求?它的强壮性如何?它的可靠性如何?(Does anyone stand behind it with support, and guarantee working, recoverable backups? How strong is the legal guarantee of this and how much insurance do they have? )


There are a lot of other things a backup solution needs to provide, but these are some of the things I’d require specifically for MySQL, or more so for MySQL than for other types of backups.

Where is this post coming from? Well, I’ve had a couple of frustrating encounters with vendors who sell backup products with some kind of agent for MySQL backup. I am almost never able to get any significant technical detail on how their backups are implemented, and often I can’t even get the most basic information such as “dump or file copy.” Sometimes they tell me to register and download a whitepaper that just has a bullet point “Support for MySQL Databases”. Or “I have to transfer you to the salesperson who covers your region” and I never get to talk to anyone.

Some of them even use the word “proprietary” as if it’s a good thing. In reality, a proprietary, secret backup black-box is unacceptable. MySQL backups are complex and difficult to get right. It is very application-dependent and technology-dependent. Unless I know exactly how it works, I cannot tell the client whether it’ll work for them at all.

So I offer the above list as a way to evaluate your backup provider’s suitability for enterprise-ready backup uses. If you can’t answer these questions, it’s a system that you can’t evaluate seriously, in my opinion.

翻译的不准确请大家谅解。
原文地址:http://www.mysqlperformanceblog.com/2009/03/03/10-things-you-need-to-know-about-backup-solutions-for-mysql/

没有评论: