<?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>Tom Greenaway &#187; Uncategorized</title>
	<atom:link href="http://www.tomgreenaway.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tomgreenaway.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 Feb 2011 09:16:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Rolling Backups with Cron</title>
		<link>http://www.tomgreenaway.com/2011/02/rolling-backups-with-cron/</link>
		<comments>http://www.tomgreenaway.com/2011/02/rolling-backups-with-cron/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 09:14:39 +0000</pubDate>
		<dc:creator>TCMG</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tomgreenaway.com/?p=319</guid>
		<description><![CDATA[I recently needed to add some better backup systems to my current pet project. There are 3 pretty important things to consider backing up in the case of this system: The code The database data Some flat file uploads from &#8230; <a href="http://www.tomgreenaway.com/2011/02/rolling-backups-with-cron/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently needed to add some better backup systems to my current pet project.</p>
<p>There are 3 pretty important things to consider backing up in the case of this system:</p>
<ul>
<li>The code</li>
<li>The database data</li>
<li>Some flat file uploads from users</li>
</ul>
<p><span id="more-319"></span></p>
<p>I&#8217;ve arranged my code so there&#8217;s a single JSON file to control its configuration between environments. Beyond that there&#8217;s the whole code base, of course this is under version control and is available on my local machine and I have an extra backup process going on for my local machine&#8217;s copy. So the code is pretty safely backed up at the moment.</p>
<p>The main things I considered today were the second two matters. Backing up the database was pretty trivial in Cron, especially since the database data is incredibly small, most users will probably consume less than a megabyte but nonetheless that data is significant (auth details, relationships etc):</p>
<pre class="brush: bash;">
0 4 * * * mysqldump -u username -pdbpasswd dbname &gt; /directory/to/store/databasebackup
</pre>
<p>Backing up the third was trickier, I really wanted a rolling window of backups for this data. By rolling window I mean that backups will be made at a regular interval but only the last X backups will be kept. In the example below I&#8217;m rolling the last 5 days of backups.</p>
<p>A quick search across StackOverflow led me to these two commands:</p>
<pre class="brush: bash;">
# Backup all data
0 4 * * * tar -zcf /directory/to/store/backups/data`date +\%F`.tar.gz /directory/to/backup

# Remove all backups beyond 5 days
0 5 * * * cd /directory/to/store/backups/ &amp;amp;&amp;amp; (ls -t|head -n 5;ls)|sort|uniq -u|xargs rm
</pre>
<p>The backslash in the Backup all data command is significant as Cron will interpret the % differently otherwise. And by differently I mean in a way you really don&#8217;t want <img src='http://www.tomgreenaway.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;d like to see other people&#8217;s solutions, perhaps a more scattered backup schedule? Five backups for the past five days, one backup every week for four weeks? one backup every month for the past six months? These could be achieved easily by adapting the above with separate directories or perhaps prefixing the filenames.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomgreenaway.com/2011/02/rolling-backups-with-cron/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reboot</title>
		<link>http://www.tomgreenaway.com/2010/09/reboot/</link>
		<comments>http://www.tomgreenaway.com/2010/09/reboot/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 12:02:18 +0000</pubDate>
		<dc:creator>TCMG</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tomgreenaway.com/?p=301</guid>
		<description><![CDATA[I&#8217;ve just finished applying a new fresh coat of paint to my website. Hopefully I can find time to blog again on here.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished applying a new fresh coat of paint to my website. Hopefully I can find time to blog again on here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomgreenaway.com/2010/09/reboot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indenting WordPress Code</title>
		<link>http://www.tomgreenaway.com/2009/01/indenting-wordpress-code/</link>
		<comments>http://www.tomgreenaway.com/2009/01/indenting-wordpress-code/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 22:59:51 +0000</pubDate>
		<dc:creator>TCMG</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tgreenaway.com/?p=234</guid>
		<description><![CDATA[I use the following plugin for the highlighted code on this blog: http://wordpress.org/extend/plugins/syntaxhighlighter/ However, I found code was never indented properly. After rummaging around and reading a few other blogs it seems the answer is to wrap your Syntax Highlighting &#8230; <a href="http://www.tomgreenaway.com/2009/01/indenting-wordpress-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I use the following plugin for the highlighted code on this blog:</p>
<p>http://wordpress.org/extend/plugins/syntaxhighlighter/</p>
<p>However, I found code was never indented properly. After rummaging around and reading a few other blogs it seems the answer is to wrap your Syntax Highlighting tags with the HTML &#8216;pre&#8217; tags.</p>
<p>In my case that is like so:</p>
<blockquote><p>&lt;pre&gt;[/sourcecode]&lt;/pre&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.tomgreenaway.com/2009/01/indenting-wordpress-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cooking Attempto! Pork Medallions</title>
		<link>http://www.tomgreenaway.com/2008/11/cooking-attempto-pork-medallions/</link>
		<comments>http://www.tomgreenaway.com/2008/11/cooking-attempto-pork-medallions/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 10:49:09 +0000</pubDate>
		<dc:creator>TCMG</dc:creator>
				<category><![CDATA[Gastronomie]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[recipe]]></category>

		<guid isPermaLink="false">http://tgreenaway.com/?p=152</guid>
		<description><![CDATA[Ingredients: Pork medallions Roma Tomatoes Salad Lime juice Cashews Oregano, Parmesan &#38; Pepper Garlic cloves Pasta sauce Dijon Mustard Avocado Crush the following into a mess. Lime juice Cashews Tomato Oregano Parmesan Pour the following into the pan when cooking &#8230; <a href="http://www.tomgreenaway.com/2008/11/cooking-attempto-pork-medallions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ingredients:</p>
<ul>
<li>Pork medallions</li>
<li>Roma Tomatoes</li>
<li>Salad</li>
<li>Lime juice</li>
<li>Cashews</li>
<li>Oregano, Parmesan &amp; Pepper</li>
<li>Garlic cloves</li>
<li>Pasta sauce</li>
<li>Dijon Mustard</li>
<li>Avocado</li>
</ul>
<p>Crush the following into a mess.</p>
<ul>
<li>Lime juice</li>
<li>Cashews</li>
<li>Tomato</li>
<li>Oregano</li>
<li>Parmesan</li>
</ul>
<p>Pour the following into the pan when cooking the pork.</p>
<ul>
<li>Lime juice</li>
<li>Crushed Garlic</li>
<li>Black pepper</li>
<li>Oil</li>
</ul>
<p>Remove all visible fat form the pork, chuck it into the pan.</p>
<p>Cooking the pork for 3 minutes on each side. Add the tomato mince and supplement with pasta sauce.</p>
<p>Cook for a further 5 minutes.</p>
<p>Serve along with salad and avocado and the following dressing:</p>
<ul>
<li>Vinegar</li>
<li>Olive oil</li>
<li>Pepper</li>
<li>Lime Juice</li>
<li>Dijon Mustard</li>
</ul>
<p>Hazaa, early preparation.</p>
<p style="text-align: center;"><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0311.jpg"><img class="alignnone size-thumbnail wp-image-155" title="img_0311" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0311-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0306.jpg"><img class="alignnone size-thumbnail wp-image-156" title="img_0306" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0306-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Pork!</p>
<p style="text-align: center;"><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0307.jpg"><img class="alignnone size-thumbnail wp-image-159" title="img_0307" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0307-150x150.jpg" alt="" width="150" height="150" /> <img class="alignnone size-thumbnail wp-image-157" title="img_0309" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0309-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;">After adding the mushrooms&#8230; and getting the salad dressing ready!</p>
<p style="text-align: center;"><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0310.jpg"><img class="alignnone size-thumbnail wp-image-158" title="img_0310" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0310-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0312.jpg"> <img class="alignnone size-thumbnail wp-image-160" title="img_0312" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0312-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Product!</p>
<p style="text-align: center;"><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0313.jpg"><img class="alignnone size-thumbnail wp-image-161" title="img_0313" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0313-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0314.jpg"><img class="alignnone size-thumbnail wp-image-162" title="img_0314" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0314-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><a href="http://tgreenaway.com/wp-content/uploads/2008/11/img_0315.jpg"><img class="aligncenter size-medium wp-image-163" title="img_0315" src="http://tgreenaway.com/wp-content/uploads/2008/11/img_0315-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomgreenaway.com/2008/11/cooking-attempto-pork-medallions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Harmony!</title>
		<link>http://www.tomgreenaway.com/2008/08/harmony/</link>
		<comments>http://www.tomgreenaway.com/2008/08/harmony/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 11:55:59 +0000</pubDate>
		<dc:creator>TCMG</dc:creator>
				<category><![CDATA[Leisure]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bob dylan]]></category>
		<category><![CDATA[harmonica]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://tgreenaway.com/?p=45</guid>
		<description><![CDATA[A friend bought me a harmonica as a birthday gift yesterday. It&#8217;s a simple device with ten holes, breathing in or out on which will produce different sounds. So you&#8217;ve effectively got 20 notes to play with. Producing chords is &#8230; <a href="http://www.tomgreenaway.com/2008/08/harmony/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A friend bought me a harmonica as a birthday gift yesterday. It&#8217;s a simple device with ten holes, breathing in or out on which will produce different sounds. So you&#8217;ve effectively got 20 notes to play with. Producing chords is quite easy, just play through multiple holes at once.</p>
<p><a href="http://tgreenaway.com/wp-content/uploads/2008/08/l-640-480-9b5200ee-c489-41f6-af0c-7539fcbfa26c.jpeg"><img class="alignnone size-full wp-image-364" src="http://tgreenaway.com/wp-content/uploads/2008/08/l-640-480-9b5200ee-c489-41f6-af0c-7539fcbfa26c.jpeg" alt="" width="300" height="225" /></a></p>
<p>The brand is German, after speaking with a German fellow tonight I discovered the instrument is quite popular over there. Go figure!</p>
<p><a href="http://tgreenaway.com/wp-content/uploads/2008/08/p-640-480-9f6bb52c-d5bc-4225-ab11-e167498b4499.jpeg"><img class="alignnone size-full wp-image-364" src="http://tgreenaway.com/wp-content/uploads/2008/08/p-640-480-9f6bb52c-d5bc-4225-ab11-e167498b4499.jpeg" alt="" width="225" height="300" /></a></p>
<p>So far I&#8217;ve been reading tutorials on how to hold the instrument and the skills one should build. Via personal experimentation though I&#8217;ve discovered the most critical requirement to learning the harmonica:</p>
<ul>
<li>Put a Bob Dylan album on before you start.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tomgreenaway.com/2008/08/harmony/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

