innodb在线备份的新方法
2008-11-22 22:15
183 查看
在google code的
google-mysql-tools公布了一个innodb在线备份的新方法:在不关闭mysql服务器的情况下,可以禁止掉所有的innodb文件的
写,但不阻塞读,这个时候可以利用操作系统的文件拷贝命令进行在线备份。要实现这个功能,需要打一个google的mysql开发团队弄出的一个patch.
下面是这个patch的详细介绍:
InnodbFreeze
Freeze Innodb file system activity
Commands
set global innodb_disallow_writes=ON
set global innodb_disallow_writes=OFF
Purpose
These
enable and disable all Innodb file system activity except for reads. If
you want to take a database backup without stopping the server and you
don't use LVM, ZFS or some other storage software that provides
snapshots, then you can use this to halt all destructive file system
activity from InnoDB and then backup the InnoDB data files. Note that
it is not sufficient to run FLUSH TABLES WITH READ LOCK as there are
background IO threads used by InnoDB that may still do IO.
5.0.37 Patch
从一个网友的回复中,看到基本上可以达到相同效果的另外一种方法:
Any chance that you can
accomplish a similar mechanism by setting innodb_max_dirty_pages_pct to
zero and then waiting for dirty buffers to equal zero... then
performing the snapshot (of course with a READ LOCK) on all the tables.
I generally think this patch is a bit more elegant though.
Kevin Burton (spinn3r.com)
总的来说,mysql的备份与ORACLE的备份相比,还有许多需要去改进的地方。google自己的mysql开发团队一直都在努力改变着mysql的代码,可以根据自己的需求去定制mysql,什么时候我们也可以这样做呢?
--EOF--
google-mysql-tools公布了一个innodb在线备份的新方法:在不关闭mysql服务器的情况下,可以禁止掉所有的innodb文件的
写,但不阻塞读,这个时候可以利用操作系统的文件拷贝命令进行在线备份。要实现这个功能,需要打一个google的mysql开发团队弄出的一个patch.
下面是这个patch的详细介绍:
InnodbFreeze
Freeze Innodb file system activity
Commands
set global innodb_disallow_writes=ON
set global innodb_disallow_writes=OFF
Purpose
These
enable and disable all Innodb file system activity except for reads. If
you want to take a database backup without stopping the server and you
don't use LVM, ZFS or some other storage software that provides
snapshots, then you can use this to halt all destructive file system
activity from InnoDB and then backup the InnoDB data files. Note that
it is not sufficient to run FLUSH TABLES WITH READ LOCK as there are
background IO threads used by InnoDB that may still do IO.
5.0.37 Patch
从一个网友的回复中,看到基本上可以达到相同效果的另外一种方法:
Any chance that you can
accomplish a similar mechanism by setting innodb_max_dirty_pages_pct to
zero and then waiting for dirty buffers to equal zero... then
performing the snapshot (of course with a READ LOCK) on all the tables.
I generally think this patch is a bit more elegant though.
Kevin Burton (spinn3r.com)
总的来说,mysql的备份与ORACLE的备份相比,还有许多需要去改进的地方。google自己的mysql开发团队一直都在努力改变着mysql的代码,可以根据自己的需求去定制mysql,什么时候我们也可以这样做呢?
--EOF--
相关文章推荐
- MySql直接备份数据库文件的方法(MyISAM和InnoDB有所不同)
- .net在线备份压缩修复Access数据库方法
- innodb_index_stats导入备份数据时报错表主键冲突的解决方法
- MySql直接备份数据库文件的方法(MyISAM和InnoDB有所不同)
- 使用CopyTable工具方法在线备份HBase表
- 使用CopyTable工具方法在线备份HBase表
- mysql ndb集群备份数据库和还原数据库的方法
- MongoDB 备份方法
- oracle11g备份数据库不备份空表解决方法
- 数据库备份的几种方法
- SVN备份及其还原 — dump/load方法
- JS实现在线统计一个页面内鼠标点击次数的方法
- Mysql innodb 分析定位DeadLock的方法
- SQL Server 2005“备份集中的数据库备份与现有的数据库不同”解决方法此信息转载自BlueSky's Blog,www.heuupk.com,为尊重无价的知识请保留此版权信息。
- 网站论坛搬家之数据库备份,mysql数据库的导出与备份方法总结。
- MySQL binlog 远程备份方法详解
- innobackupex: fatal error: no ‘innodb_buffer_pool_filename’解决方法
- 阿里在线笔试题 折半方法求最接近sum值
- 基于PLSQL的数据库备份方法
- mysql 启动不了 innodb的 一启动就报错的解决方法