关于mysqlhotcopy的疑问

hehe4569 2010-10-21 05:47:24
(1)mysqlhotcopy是采用锁表然后CP备份的方式备份数据。那为什么不能备份innoDB引擎的表??难道mysqlhotcopy采用的就是lock table table_name read.
(2)若采用flush tables with read lock锁定全表,应该也可以用CP数据文件的方法来备份innoDB引擎的数据表吧?
...全文
113 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ACMAIN_CHM 2010-10-21
  • 打赏
  • 举报
回复
文档中解释得很清楚了。

1. mysqlhotcopy 是一个PERL脚本。
2. 它使用 LOCK TABLES, FLUSH TABLES,来把数据全部写入文件,然后锁定,
3. 它使用操作系统的 cp 命令来复制文件。

而INNODB所有的东西都在同一个或几个公共的数据文件中,所以你自然不可能用CP命令来进行什么复制。
小小小小周 2010-10-21
  • 打赏
  • 举报
回复
我觉得支持事务有关系.不像myisam一样所有东西就在就在一个目录下面.innodb 还有其他的一些信息在共享表空间里面
hao1hao2hao3 2010-10-21
  • 打赏
  • 举报
回复
ACMAIN_CHM 2010-10-21
  • 打赏
  • 举报
回复
[Quote]mysqlhotcopy is a Perl script that was originally written and contributed by Tim Bunce. It uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a database backup quickly. It is the fastest way to make a backup of the database or single tables, but it can be run only on the same machine where the database directories are located. mysqlhotcopy works only for backing up MyISAM and ARCHIVE tables. It runs on Unix and NetWare.

[/Quote]

56,940

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧