<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Why you can&#8217;t rely on a replica for disaster recovery</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: crownedgrouse</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-777112</link>
		<dc:creator>crownedgrouse</dc:creator>
		<pubDate>Thu, 07 Oct 2010 14:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-777112</guid>
		<description>Hi,
A replication is not a backup. It is aimed to provide High availability (HA) , not disaster recovery (DR).

To be safe (the minimum !) :
1) use good harware. Mainly by doubling all devices (power, etc ...).
2) use RAIDx disks on a SAN (be careful on the &#039;write back&#039; or &#039;write through&#039; parameter !)
3) use ZFS if possible, or at least a journalized FS.
4) use ACID compliant database (postgresql ...), use internal replication feature if possible, for HA and DR (see 6)
5) snapshots can be usefull sometimes, but rarely for databases because data can be inconsistent. 
   Don&#039;t snapshot database directories, except if you can tell the database that you are backuping or snapshoting the data. (Postgresql allow it : SELECT pg_start_backup(&#039;label&#039;); )
   ZFS allow powerfull snapshots that can be sent to another remote node...
6) do regular database dumps in a (compressed) file for snapshots and backups. That can be done on a replicated slave database for performance.
7) do complete and incremental backups on tapes, disks and optical disks. Protect it in fireproof vault.
8) use system versioning for system configuration (/etc/, ...) and protect it (tripwire ...)
9) duplicate the whole in two datacenters in two different cities, at least, or two continents if possible.
   cross the backups : Datacenter A is backuped on datacenter B and the contrary.
10) test data recovery and your disaster recovery plan (imply you wrote it :&gt;) ...)

And pray... if you are believer.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
A replication is not a backup. It is aimed to provide High availability (HA) , not disaster recovery (DR).</p>
<p>To be safe (the minimum !) :<br />
1) use good harware. Mainly by doubling all devices (power, etc &#8230;).<br />
2) use RAIDx disks on a SAN (be careful on the &#8216;write back&#8217; or &#8216;write through&#8217; parameter !)<br />
3) use ZFS if possible, or at least a journalized FS.<br />
4) use ACID compliant database (postgresql &#8230;), use internal replication feature if possible, for HA and DR (see 6)<br />
5) snapshots can be usefull sometimes, but rarely for databases because data can be inconsistent.<br />
   Don&#8217;t snapshot database directories, except if you can tell the database that you are backuping or snapshoting the data. (Postgresql allow it : SELECT pg_start_backup(&#8216;label&#8217;); )<br />
   ZFS allow powerfull snapshots that can be sent to another remote node&#8230;<br />
6) do regular database dumps in a (compressed) file for snapshots and backups. That can be done on a replicated slave database for performance.<br />
7) do complete and incremental backups on tapes, disks and optical disks. Protect it in fireproof vault.<br />
 <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> use system versioning for system configuration (/etc/, &#8230;) and protect it (tripwire &#8230;)<br />
9) duplicate the whole in two datacenters in two different cities, at least, or two continents if possible.<br />
   cross the backups : Datacenter A is backuped on datacenter B and the contrary.<br />
10) test data recovery and your disaster recovery plan (imply you wrote it :&gt;) &#8230;)</p>
<p>And pray&#8230; if you are believer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Schwartz</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-771531</link>
		<dc:creator>Baron Schwartz</dc:creator>
		<pubDate>Mon, 16 Aug 2010 18:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-771531</guid>
		<description>InnoDB does support raw devices, and if used, then this type of problem is avoided. But it&#039;s kind of nice to be able to use &quot;cp&quot; and &quot;mv&quot; and other tools.  Most people don&#039;t want to give that up.  &quot;Complete and total control&quot; comes with limitations.</description>
		<content:encoded><![CDATA[<p>InnoDB does support raw devices, and if used, then this type of problem is avoided. But it&#8217;s kind of nice to be able to use &#8220;cp&#8221; and &#8220;mv&#8221; and other tools.  Most people don&#8217;t want to give that up.  &#8220;Complete and total control&#8221; comes with limitations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Watson</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-771528</link>
		<dc:creator>Andrew Watson</dc:creator>
		<pubDate>Mon, 16 Aug 2010 17:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-771528</guid>
		<description>Why doesn&#039;t MySQL support raw devices like Oracle?  Then you don&#039;t have to rely on a file system driver for anything! you write the bits out to the device yourself and have complete and total control over that device.</description>
		<content:encoded><![CDATA[<p>Why doesn&#8217;t MySQL support raw devices like Oracle?  Then you don&#8217;t have to rely on a file system driver for anything! you write the bits out to the device yourself and have complete and total control over that device.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Schwartz</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-771509</link>
		<dc:creator>Baron Schwartz</dc:creator>
		<pubDate>Mon, 16 Aug 2010 12:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-771509</guid>
		<description>Read previous comments, please.</description>
		<content:encoded><![CDATA[<p>Read previous comments, please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-771503</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Mon, 16 Aug 2010 10:51:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-771503</guid>
		<description>InnoDB got a transaction log. Isn&#039;t this log responsible for recovering any glitches after a power outage?</description>
		<content:encoded><![CDATA[<p>InnoDB got a transaction log. Isn&#8217;t this log responsible for recovering any glitches after a power outage?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Schwartz</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-771502</link>
		<dc:creator>Baron Schwartz</dc:creator>
		<pubDate>Mon, 16 Aug 2010 10:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-771502</guid>
		<description>The unreliability of ext2 is just one specific example of a larger principle, in my opinion.</description>
		<content:encoded><![CDATA[<p>The unreliability of ext2 is just one specific example of a larger principle, in my opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florian Haas</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-771500</link>
		<dc:creator>Florian Haas</dc:creator>
		<pubDate>Mon, 16 Aug 2010 09:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-771500</guid>
		<description>I know I&#039;m a bit late in responding to this, but isn&#039;t this really about &quot;why you can&#039;t rely on ext2 for anything&quot;? I think pretty much everyone agrees that using a non-journaling file system is a really bad idea if you want any resilience in the face of power outage at all, regardless of whether any sort of replication is involved.

Just my $.02.</description>
		<content:encoded><![CDATA[<p>I know I&#8217;m a bit late in responding to this, but isn&#8217;t this really about &#8220;why you can&#8217;t rely on ext2 for anything&#8221;? I think pretty much everyone agrees that using a non-journaling file system is a really bad idea if you want any resilience in the face of power outage at all, regardless of whether any sort of replication is involved.</p>
<p>Just my $.02.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baron Schwartz</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-770920</link>
		<dc:creator>Baron Schwartz</dc:creator>
		<pubDate>Sun, 08 Aug 2010 03:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-770920</guid>
		<description>Given a properly behaving operating environment, InnoDB does not corrupt your data, and it is better than most at detecting and recovering from many types of misbehavior.  But if the database writes and fsync()s a file, and the filesystem botches the result good and proper, there is nothing the database CAN do.

For a different perspective on this topic, I suggest reading http://www.xaprb.com/blog/2010/02/08/how-postgresql-protects-against-partial-page-writes-and-data-corruption/.</description>
		<content:encoded><![CDATA[<p>Given a properly behaving operating environment, InnoDB does not corrupt your data, and it is better than most at detecting and recovering from many types of misbehavior.  But if the database writes and fsync()s a file, and the filesystem botches the result good and proper, there is nothing the database CAN do.</p>
<p>For a different perspective on this topic, I suggest reading <a href="http://www.xaprb.com/blog/2010/02/08/how-postgresql-protects-against-partial-page-writes-and-data-corruption/" rel="nofollow">http://www.xaprb.com/blog/2010/02/08/how-postgresql-protects-against-partial-page-writes-and-data-corruption/</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Casey</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-770915</link>
		<dc:creator>Patrick Casey</dc:creator>
		<pubDate>Sun, 08 Aug 2010 01:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-770915</guid>
		<description>Andreas, I think it actually depends on both the DB and the fileystem. The most common linux file systems like ext3 are journaling file systems and as such they very, very, very rarely get corrupted during a hard power off, but it does happen. If your file system gets corrupted, it really doesn&#039;t matter what kind of shape the database is in because the underlying FS is munged and you can&#039;t get your blocks back.

In practise, I can&#039;t recall a snap of mine ever failing a recovery on EXT3, buts its not outside the realm of possibility.

Point being I suppose is that modern file system almost always survive a crash, so we tend to take that kind of durability for granted, but it really isn&#039;t. The fact that a server comes back at all after an abrupt power loss is a testment to some very careful file system design. The fact that a database running on top of that file system recovers as well is still more good engineering, but both have to work to get your data back :).</description>
		<content:encoded><![CDATA[<p>Andreas, I think it actually depends on both the DB and the fileystem. The most common linux file systems like ext3 are journaling file systems and as such they very, very, very rarely get corrupted during a hard power off, but it does happen. If your file system gets corrupted, it really doesn&#8217;t matter what kind of shape the database is in because the underlying FS is munged and you can&#8217;t get your blocks back.</p>
<p>In practise, I can&#8217;t recall a snap of mine ever failing a recovery on EXT3, buts its not outside the realm of possibility.</p>
<p>Point being I suppose is that modern file system almost always survive a crash, so we tend to take that kind of durability for granted, but it really isn&#8217;t. The fact that a server comes back at all after an abrupt power loss is a testment to some very careful file system design. The fact that a database running on top of that file system recovers as well is still more good engineering, but both have to work to get your data back <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/comment-page-1/#comment-770912</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Sun, 08 Aug 2010 01:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3420#comment-770912</guid>
		<description>Quote: A snapshot on the SAN is just the same as cutting the power to the machine â€” the block device is in an inconsistent state.

So you are telling me i can loose all my data just by cutting power?
I won&#039;t blame the filesystem here, i will blame the database.</description>
		<content:encoded><![CDATA[<p>Quote: A snapshot on the SAN is just the same as cutting the power to the machine â€” the block device is in an inconsistent state.</p>
<p>So you are telling me i can loose all my data just by cutting power?<br />
I won&#8217;t blame the filesystem here, i will blame the database.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

