<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>一个故事@MySQL DBA &#187; backup</title>
	<atom:link href="http://www.orczhou.com/index.php/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.orczhou.com</link>
	<description>一个故事@MySQL DBA</description>
	<lastBuildDate>Tue, 20 Dec 2011 15:51:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MySQL 备份基础</title>
		<link>http://www.orczhou.com/index.php/2009/05/mysql-backup-abc/</link>
		<comments>http://www.orczhou.com/index.php/2009/05/mysql-backup-abc/#comments</comments>
		<pubDate>Thu, 07 May 2009 05:33:49 +0000</pubDate>
		<dc:creator>orczhou</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[备份]]></category>

		<guid isPermaLink="false">http://orczhou.com/?p=205</guid>
		<description><![CDATA[<p><a href="http://orczhou.com/wp-content/uploads/2009/04/logo_mysql_sun_a.gif"><img class="size-full wp-image-151 alignleft" title="logo_mysql_sun_a" src="http://orczhou.com/wp-content/uploads/2009/04/logo_mysql_sun_a.gif" alt="logo_mysql_sun_a" width="114" height="68" /></a></p>
<p>一般来说，你有两种可供选择的备份MySQL的方式----mysqldump 或者mysqlhotcopy。</p>
<p>mysqldump可以备份各种类型的数据表，但是mysqlhotcopy<a href="http://dev.mysql.com/doc/refman/5.0/en/backup.html" target="_blank">只适合</a>备份MyISAM和ISAM的数据表。所以使用mysqlhotcopy之前，你必须确认你的数据表是不是有其他的存储引擎(storage engines)的。[......]</p><p class='read-more'><a href='http://www.orczhou.com/index.php/2009/05/mysql-backup-abc/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://orczhou.com/wp-content/uploads/2009/04/logo_mysql_sun_a.gif"><img class="size-full wp-image-151 alignleft" title="logo_mysql_sun_a" src="http://orczhou.com/wp-content/uploads/2009/04/logo_mysql_sun_a.gif" alt="logo_mysql_sun_a" width="114" height="68" /></a></p>
<p>一般来说，你有两种可供选择的备份MySQL的方式----mysqldump 或者mysqlhotcopy。</p>
<p>mysqldump可以备份各种类型的数据表，但是mysqlhotcopy<a href="http://dev.mysql.com/doc/refman/5.0/en/backup.html" target="_blank">只适合</a>备份MyISAM和ISAM的数据表。所以使用mysqlhotcopy之前，你必须确认你的数据表是不是有其他的存储引擎(storage engines)的。<span id="more-205"></span></p>
<p><span style="color: #0000ff;"><strong>How To：</strong></span></p>
<ol type="1">
<li><span style="color: #ff0000;">mysqldump      -uroot -p*** DBNAME | gzip -f&gt;/backup/dbname.'date      +%w'.dump.gz</span></li>
<li><span style="color: #ff0000;">mysqlhotcopy      DBNAME -u root -p *** /backup</span></li>
</ol>
<p><span style="color: #0000ff;"><strong>两者速度：</strong></span>因为mysqlhotcopy会直接拷贝存储数据的文件，所以其速度是依赖于磁盘操作的速度，较之mysqldump要快些。下面是两种方式备份同一个数据的时候的时间消耗比较：</p>
<ol>
<li>mysqldump  <span style="color: #008000;">耗时22分39秒</span>（gzip压缩后文件大小为747M.）</li>
<li>mysqlhotcopy  <span style="color: #008000;">耗时6分07秒</span>（tar gzip打包压缩后文件大小为1014M.）</li>
</ol>
<p>参考：</p>
<ol>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/backup.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/backup.html</a><a href="http://www.mysqlperformanceblog.com/2009/03/03/10-things-you-need-to-know-about-backup-solutions-for-mysql/"></a></li>
<li><a href="http://www.mysqlperformanceblog.com/2009/03/03/10-things-you-need-to-know-about-backup-solutions-for-mysql/">ttp://www.mysqlperformanceblog.com/2009/03/03/10-things-you-need-to-know-about-backup-solutions-for-mysql/</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.orczhou.com/index.php/2009/05/mysql-backup-abc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

