<?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>Bit Matrix &#187; restore</title>
	<atom:link href="http://blog.bit-matrix.com/tag/restore/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bit-matrix.com</link>
	<description>Tech. Code. Linux. MySQL. Ones. Zeroes.</description>
	<lastBuildDate>Tue, 31 Aug 2010 01:10:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running Simple and Effective MySQL Backups</title>
		<link>http://blog.bit-matrix.com/2008/12/09/running-simple-and-effective-mysql-backups/</link>
		<comments>http://blog.bit-matrix.com/2008/12/09/running-simple-and-effective-mysql-backups/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 07:56:53 +0000</pubDate>
		<dc:creator>Bit Matrix</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[restore]]></category>

		<guid isPermaLink="false">http://blog.bit-matrix.com/?p=28</guid>
		<description><![CDATA[We all know that we should backup our data regularly. This is doubly true when it is not our data but our employers data that we are entrusted with. There are two parts to any successful backup strategy: backup and restore. Often, the restore part is left as an exercise to the reader once needed. [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that we should backup our data regularly. This is doubly true when it is not our data but our employers data that we are entrusted with. There are two parts to any successful backup strategy: backup and restore. Often, the restore part is left as an exercise to the reader once needed. I will outline a few tip in this blog for how to make a simple and effective backup processes for a MySQL database.<span id="more-28"></span></p>
<h4>Tip #1: Check the file sizes</h4>
<p><em>&#8220;Why sure boss, I have last night&#8217;s backup right here, it&#8217;s&#8230; 0 bytes!&#8221;</em></p>
<p>While running backups very often is good it can fill up your backup drives rather quick. The solution is to consolidate your backup at the end of each day. Delete all the previous backups for that day and only keep the latest. And always check the file sizes of your backups! Generally they should always increase and should definitely not be zero bytes!</p>
<h4>Tip #2: Run backups off a replicated slave</h4>
<p>If you are making a backup of the database while someone if trying to access it they will have to wait until the backup is done before they can commit any writes. This is annoying to the user and the larger your database gets, the more they&#8217;ll have to wait. A common solution is to setup a <a title="What is replication?" href="/2008/11/26/what-is-mysql-replication/">replicated slave</a> and make the backups from that machine instead of the master database. This way the client is unaffected. If course, make sure your replication slave is running when using that server for backups.</p>
<h4>Tip #3: Dump a single table at a time</h4>
<p>If you are making backups by dumping data into an SQL file (which would be the most common way) the best practice is to dump a single table at a time. There are a few advantages to this. Firstly, if you need to restore data from only one table at a later data you can just import that SQL file instead of trawling through the entire database dump. This makes the restoring job much simpler. Secondly, it results in smaller files which are easier to manage.</p>
<h4>Conclusion</h4>
<p>Using these tips will result in simple and transparent backup system which is easy to monitor and, most importantly, is actually useful when it comes to restoring data.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bit-matrix.com/2008/12/09/running-simple-and-effective-mysql-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
