<?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>Rian&#039;s Really Good Technoblog! &#187; Infrastructure</title>
	<atom:link href="http://riansreallygoodtechnoblog.com/category/infrastructure/feed/" rel="self" type="application/rss+xml" />
	<link>http://riansreallygoodtechnoblog.com</link>
	<description>Technology tidbits from adapters to z... z... uh... zip files!</description>
	<lastBuildDate>Thu, 22 Jul 2010 01:09:59 +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>Moving to the clouds&#8230; err&#8230; cloud&#8230;</title>
		<link>http://riansreallygoodtechnoblog.com/2010/04/27/moving-to-the-clouds-err-cloud/</link>
		<comments>http://riansreallygoodtechnoblog.com/2010/04/27/moving-to-the-clouds-err-cloud/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 00:46:41 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Infrastructure]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/?p=54</guid>
		<description><![CDATA[For years, I&#8217;ve been dealing with hosting hardware&#8230; from my first built-from-parts server under my desk in my San Francisco apartment to my most recent situation as the occupant of a cage in a colocation facility.  In all cases&#8230; it sucked.  At the least convenient moment, some component goes south, leaving me with the eternal [...]]]></description>
			<content:encoded><![CDATA[<p>For years, I&#8217;ve been dealing with hosting hardware&#8230; from my first built-from-parts server under my desk in my San Francisco apartment to my most recent situation as the occupant of a cage in a colocation facility.  In all cases&#8230; it sucked.  At the least convenient moment, some component goes south, leaving me with the eternal puzzle &#8220;how in the hell am I going to fix <strong>that </strong>before I get fired.&#8221;</p>
<p>I&#8217;ve been neck-deep in development for my current client and haven&#8217;t much of an opportunity for my own infrastructure, but a new gig has given me pause to consider what, if any, changes I need to make to my situation to improve robustness, flexibility, portability, and total cost of ownership.</p>
<p>I decided it&#8217;s time to check out &#8220;computing in the cloud.&#8221;  (I think I saw that on a billboard or 2,000 on my normal commute to the Bay Area.)  If that idea&#8217;s new to you, it boils down to treating your hardware resource needs as abstract commodities that you buy incrementally from a provider, who manages huge physical resources to provide virtual units of processing, storage, etc.</p>
<p>Maybe that&#8217;s too obscure.  Think of it this way: you need a web server.  You don&#8217;t really want a box, a couple of hard drives, a motherboard, power supply, etc.  You want a web server that you can control and utilize.  Your cloud computing provider says &#8220;OK, for $.0X/hour, I&#8217;ll make a &#8217;server&#8217; available to you.  You&#8217;ll never see it.  It doesn&#8217;t actually exist as a physical thing, but you can log in, install stuff, and serve pages.&#8221;</p>
<p>That means there&#8217;s no power supply to burn out, the disks are redundant (i.e., 10X less likely to fail), and you don&#8217;t have anything to throw away when the thing&#8217;s obsolete in three months.  In fact, it won&#8217;t be, because they&#8217;ll just keep adding resources to the pile, and you get your share.  I like the sound of that.</p>
<p>OK, so where&#8217;s my data?  If this thing is virtual, my data must BE somewhere?  Well, in the case of Amazon&#8217;s Web Services (AWS), you get to decide.  If you want your data to persist between shutdowns (um, yes, you probably do), you need to arrange for persistent storage.  Again, you buy what you need at a few cents per GB.  Now, when you boot this &#8220;image&#8221; of your server, it can start up on any virtual &#8220;instance&#8221; of their servers and look exactly the same.  What&#8217;s more, you might decide to fire up another server for dev purposes.  Easy, snapshot your image, attach it to another instance, and boot.</p>
<p>Total time: maybe a couple of minutes with a break to get a glass of wine.  Done developing?  Turn it off and toss the storage.  I ran one server for practice for most of a day, and it cost me $.60.</p>
<p>Downsides?  Thus far, I haven&#8217;t found too many in comparison to the colo.  Maybe the biggest is that, to keep costs down, you need to apply a bit of discipline to your storage and planning.  In the colo, when in doubt, I can just stick another 1TB drive in there.  That gets pricey in this scenario, but it&#8217;s not a very good idea anyway.  It&#8217;s the computer equivalent of being a packrat.</p>
<p>More details as I experiment, but so far, I have to say that the colocation business is in deep trouble.</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2010/04/27/moving-to-the-clouds-err-cloud/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hey, Me!  Stop Procrastinating!  Fix Your Backups!</title>
		<link>http://riansreallygoodtechnoblog.com/2009/12/04/hey-me-stop-procrastinating-fix-your-backups/</link>
		<comments>http://riansreallygoodtechnoblog.com/2009/12/04/hey-me-stop-procrastinating-fix-your-backups/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 23:05:15 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[online storage]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/?p=37</guid>
		<description><![CDATA[Not too long ago, I, Mr. Check-me-out-I&#8217;m-so-technical-and-cool, had a catastrophic data loss.  As implied by the use of the word &#8216;catastrophic&#8217;, I lost some stuff that&#8230; I did not want to lose.  At all. Lost, lost.  Too bad.  Sucks to be me.  How could this happen to a guy who does this for a living?  [...]]]></description>
			<content:encoded><![CDATA[<p>Not too long ago, I, Mr. Check-me-out-I&#8217;m-so-technical-and-cool, had a catastrophic data loss.  As implied by the use of the word &#8216;catastrophic&#8217;, I lost some stuff that&#8230; I did not want to lose.  At all. Lost, lost.  Too bad.  Sucks to be me.  How could this happen to a guy who does this for a living?  I&#8217;ll tell you how: <strong>procrastination</strong>.</p>
<p>I knew that off-site storage was necessary.  I have space on remote servers in secure locations&#8230; one of these days, I&#8217;m going to figure out a good way to, uh&#8230; <em>hey, I gotta go pick up the pizza! </em></p>
<p>But, it&#8217;s worse than that.  I actually have a mirrored-disk, network-attached storage (NAS) box specifically for backups.  I have external drives specifically for making local backups, too.  So, short of my office burning down, I should be covered, no?  Uh&#8230; no.<span id="more-37"></span></p>
<p>Turns out that my backup software to the NAS box had been failing silently because of some change in the client configuration.  Moreover, I&#8217;d procrastinated on replacing the batteries on my UPSs&#8211; they&#8217;d been pulled out for that reason (see where this is going?  no surge protection?) Now, mix that with my preference to use &#8220;logical volumes&#8221; for my storage because of their flexibility in sizing and storage, and toss in a completely unusual (but nonetheless real) power surge/outage.</p>
<p>What you get is a garfed logical volume (i.e., the physical device with the filesystem information on it survived but was irretrievably scrambled&#8230;) and the local backup external disk gets completely fried at the same time.  No network backup.  No local backup.  And the data itself has vanished.  What did I lose?  Well, my company books and tax records, for one thing.  (The actual happy ending is that because of my paranoia level, I had actually imaged my drives not too long ago to yet ANOTHER drive that I kept unattached.  I was able to reconstruct most of my data, but it took hours of work and validation.  Who knows what miscellaneous data I&#8217;ll notice is missing at some point.)</p>
<p>As W. famously said, &#8220;There&#8217;s an old saying in Tennessee — I know it&#8217;s in Texas, probably in Tennessee&#8230; that says, fool me once, shame on&#8230; shame on you. Fool me&#8230; you can&#8217;t get fooled again.&#8221;</p>
<p>So true, Mr. President.  So true.</p>
<p>Well, I can&#8217;t get fooled again.  So, no more procrastinating.  First order of business was to order myself a shiny, new UPS.  I went with the <a title="No, I don't get any money from this." href="http://www.newegg.com/Product/Product.aspx?Item=N82E16842102048&amp;cm_re=cyberpower-_-42-102-048-_-Product" target="_blank">CyberPower 1500AVR</a>.  At less than $200, and with the juice to run my (excessive) pile of gear for at least a half hour, it&#8217;s easy and inexpensive insurance against some putz putting his backhoe into the power main.  Still, they&#8217;ll think of something that I haven&#8217;t.</p>
<p>So, it&#8217;s on to my data.  Firstly, I forced myself back into a rational storage model.  Being your typical ADHD type, I have a tendency to keep EVERYTHING and keep it wherever it happens to land.  Forever.  Don&#8217;t know what it is?  Better just leave it.  You never know.  Right?</p>
<p>No, no, no&#8230; that&#8217;s not OK.  What I need to do is to keep my documents in, say, a DOCUMENTS folder.  Branch out by use (not&#8230; say&#8230; document type or date).  OK, so, &#8216;business&#8217; and &#8216;personal&#8217;.  Business can have &#8216;clients&#8217; and &#8216;financial&#8217;&#8230; and so on.  Everything goes into one of those folders.  EVERYTHING.  Is is a photo?  OK, it goes into personal/photos.  Or a separate photos folder.  Not both.  That file that I can&#8217;t identify?  My system to create an &#8220;unidentified&#8221; folder with dated sub-folders.  Everything I find that I can&#8217;t identify goes in those.  If, after a month or two, I still don&#8217;t know what it is and haven&#8217;t needed it&#8230; it goes.</p>
<p>Great, so, now I&#8217;ve got all my data in one place on my system&#8230; that is&#8230; my desktop system&#8230; which&#8230; doesn&#8217;t include my virtual systems&#8230; or my MacBook&#8230; oh boy.</p>
<p>Enter on-line storage and synchronization.  After some checking around, I went with <a title="I don't get money from this, either." href="http://getdropbox.com/" target="_blank">Dropbox</a>.  Other good options include: <a title="Same.  No Money." href="http://www.mozy.com/" target="_blank">mozy</a>, <a title="Same.  No Money." href="http://ww.jungledisk.com/" target="_blank">Jungledisk</a>, Ubuntu One, Amazon S3, and many others.  Dropbox appealed to me because of the drop-dead ease of installation, the cross-platform clients, and what seems like a pretty reasonable price for all that (about $10/mo. for 50GB of storage as of this writing).</p>
<p>Basically, Dropbox puts, what looks like, another folder on your system.  In this case, though, if you drop a file in there, it&#8217;s copied up to their storage and synced to any systems that you also have connected to your account.  Drop your resume into that folder on your Linux box and edit it on your Mac, output the PSD to the Dropbox folder, and open it up on your&#8230; iPod Touch?  Virtual XP instance?  Anywhere you can get to a browser?</p>
<p>I&#8217;ve always had a tendency to roll my own solution for this kind of thing, but the technology has advanced to the point that there is no way that I can justify the kind of effort it would take to get something like that righter than they have for that kind of money.  $120/year?  That&#8217;s one internal hard drive.  Dropbox installed and was doing its thing in about 5 minutes&#8211; on three systems.</p>
<p>So, we&#8217;ve got reliable, filtered power and offsite storage of critical data.  The last thing I needed to address was local backups.  Given the inexpensive drives available these days, it only makes sense to me to keep very complete backups locally so that I can do a complete recovery if the problem is a fried disk.  So, I had that pretty well covered already with <a title="These guys don't even HAVE money." href="http://www.fsarchiver.org/Main_Page" target="_blank">FSArchiver</a> for complete images and Back In Time for scheduled backups to the NAS box (a <a title="DNS-323 at Newegg.  Again, no money for me." href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822155003&amp;Tpk=dns-323" target="_blank">D-Link DNS-323</a>).</p>
<p>Maybe next time some super-freaky, never-happen-in-a-million-years thing happens, I won&#8217;t have to spend the day engaged in self-loathing and fear.  I&#8217;ll just restore my stuff and keep on keepin&#8217; on.  In the meantime, my next project is to write a little script to make sure that my backups are actually taking place.  If they&#8217;re not, I need to make something to pester me about it.</p>
<p>I&#8217;ll probably do that tomorrow&#8230; d&#8217;oh!</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2009/12/04/hey-me-stop-procrastinating-fix-your-backups/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VirtualBox: Great Thing&#8230; or&#8230; nevermind&#8230;</title>
		<link>http://riansreallygoodtechnoblog.com/2009/11/17/virtualbox-great-thing-or-nevermind/</link>
		<comments>http://riansreallygoodtechnoblog.com/2009/11/17/virtualbox-great-thing-or-nevermind/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 19:02:49 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/?p=33</guid>
		<description><![CDATA[Let me start by saying that I hate Windows.  The Microsoft product.  I don&#8217;t hate Microsoft.  I don&#8217;t hate Bill Gates, but  I hate, hate, hate Windows.  This is not a religious thing, either.  I have had that operating system break my spirit more times than I care to [...]]]></description>
			<content:encoded><![CDATA[<p>Let me start by saying that I hate Windows.  The Microsoft product.  I don&#8217;t hate Microsoft.  I don&#8217;t hate Bill Gates, but  I hate, hate, hate Windows.  This is not a religious thing, either.  I have had that operating system break my spirit more times than I care to think about (and I&#8217;ve been at it since&#8230; Windows 3.0?).  Between the blue screens of death, weird distrustful activation schemes, arbitrary proprietary methodologies, and horrible security record, I just can&#8217;t stand the operating system itself.  And I&#8217;m staring at two copies of Vista on my shelf that I can&#8217;t use because they suck.  That&#8217;s about $600 sitting there.  Sucking.</p>
<p>Having said that, I also know that I can&#8217;t run everything that I&#8217;d like to run in Linux.  And as much as I love my MacBook, I don&#8217;t think I care to buy all my software over again for the Mac, thank you very much.</p>
<p>No, for better or worse, I&#8217;m a Linux guy.  Note that I am NOT recommending that ANYONE in their right mind switch to Linux for their desktop.  I have a propeller on my beanie the size of a helicopter blade.  If you&#8217;re starting out and can afford it, go Mac.  If you can&#8217;t afford that, go Windows 7.  If you&#8217;re a total geek who sits in his (or her) underwear until three in the morning trying to get a cron job to be able to get a custom kernel to build so you can hook up your old radio-controlled light-switch-remote to your machine&#8230; Linux is for you.  Now, go take a shower and go to bed.<span id="more-33"></span></p>
<p>So, what&#8217;s a guy to do?  I have clients who run Fedora, and I run Ubuntu.  I have apps that *only* run on Windows, and the Linux &#8220;equivalent&#8221; is&#8230; let&#8217;s say, lacking. (I&#8217;m talking to you, GnuCash).</p>
<p>Welcome to virtualization.  With virtualization, you can run nearly any (I haven&#8217;t tried hacking OSX, though I hear it&#8217;s possible) OS on nearly any other OS.  It amounts to a PC within a PC.  You install the virtualization software (e.g., Sun&#8217;s VirtualBox, VMWare, xen, kvm), create a virtual disk, and boot this virtual machine into your installation media.  Just like that (in some cases) you&#8217;ve got a window with Windows on your desktop.  No dual-booting.  No second machine.  Sweet.</p>
<p>Well, kind of.  VMWare is probably the granddaddy of commercial virtualization solutions, and it can be pricey.  It&#8217;s also, apparently, not the best performer on the block.  The open source solutions, specifically kvm, are&#8230; well, again, if you&#8217;ve got a lot of crumbs in your beard and a Jolt-cola-gut, you might have the patience for all the obtuse, esoteric incantations needed to get the thing set up.  (I can just hear him saying &#8220;well, if you can&#8217;t handle the command line&#8230; and I do NOT have crumbs in my beard&#8230;&#8221;)</p>
<p>Anyway, enter <a href="http://www.virtualbox.org" target="_blank">VirtualBox</a>.  The VirtualBox project (now owned by Sun&#8230; or somethinged by Sun&#8230; who knows&#8230;) is a super-easy-to-install virtualization solution that will even work if your processor doesn&#8217;t have the <a title="In case you don't know what I'm talking about..." href="http://en.wikipedia.org/wiki/X86_virtualization#Hardware_support" target="_blank">virtualization extensions</a> (not well, but it&#8217;ll work).</p>
<p>I&#8217;ve installed VBox on Linux, Windows, and Mac, and it has worked great each time.  Performance is, I think, quite remarkable given the situation.  The interface, after installing the guest utilities that come on an ISO disk image, can be resized or run fullscreen, and except for a couple things I&#8217;ll get to, you nearly can&#8217;t tell it&#8217;s not running on the &#8220;bare metal&#8221;.</p>
<p>It&#8217;s not perfect, of course (but nothing is).  For one thing, the relationship between things like virtual processor allocation (you can assign as many as you have to the guest OS) and performance is unintuitive.  In my case, assigning two (after having run on one) caused a significant performance degradation in Windows.  There are issues with APIC extensions having the same problem.</p>
<p>Also, I see very strange performance problems with some applications wherein they bring the guest OS (and the host, if you&#8217;re not careful) to a standstill.  I can&#8217;t elaborate too much, because I haven&#8217;t seen much of a pattern, but for some reason, Dreamweaver, for instance, can barely operate if I view &#8220;Design/Code&#8221; mode, but &#8220;Design&#8221; by itself is fine, and &#8220;Code&#8221; by itself is fine.</p>
<p>Still, my instances of Fedora and BSDixes run great, and since the UI is much less of a concern, they can be run in console mode for the most part.</p>
<p>My latest experiment, having successfully converted my physical XP installation into a VirtualBox guest (called P2V, &#8220;physical to virtual&#8221; conversion) is to go the other way.  I&#8217;m going to configure a client&#8217;s mail server on a virtual instance and then burn that image to a hard drive to install into the currently active hardware.  If all goes well, we&#8217;ll skip all the iffy upgrades that we&#8217;d need to do otherwise, and only need to be down for the time required to burn the image and reboot.</p>
<p>So, if you&#8217;re a Windows person wanting to learn Linux, a Linux person needing to run Windows apps, or a Mac user wanting either&#8230; check out VirtualBox.  There&#8217;s an open source version (OSE) and a personal use and evaluation version (PUEL).  I recommend the PUEL version unless you have a good reason to go with the OSE.  There are a few things, such as USB support, that the PUEL provides that the OSE does not.  In either case, though, it&#8217;s easy enough that you needn&#8217;t be a total geek to get it running.  And just because I am one doesn&#8217;t mean I don&#8217;t appreciate that.</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2009/11/17/virtualbox-great-thing-or-nevermind/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Routing Over PPTP VPN</title>
		<link>http://riansreallygoodtechnoblog.com/2009/11/16/routing-over-pptp-vpn/</link>
		<comments>http://riansreallygoodtechnoblog.com/2009/11/16/routing-over-pptp-vpn/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 22:18:52 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/2009/11/16/routing-over-pptp-vpn/</guid>
		<description><![CDATA[Granted, I tend to be a little&#8230; extreme&#8230; in the oddly setup network scenarios.  Still, there are times when I need to make my freaky little combination work with a client&#8217;s environment without reconfiguring their network to meet my own needs.
I have a client that has a PPTP-based VPN solution in place.  While [...]]]></description>
			<content:encoded><![CDATA[<p>Granted, I tend to be a little&#8230; extreme&#8230; in the oddly setup network scenarios.  Still, there are times when I need to make my freaky little combination work with a client&#8217;s environment without reconfiguring their network to meet my own needs.</p>
<p>I have a client that has a PPTP-based VPN solution in place.  While I prefer a more robust SSL or IPSec VPN&#8211; this isn&#8217;t about me.  That&#8217;s what they have, and it works for them.  I needed to make my tools work with that situation.</p>
<p>On my end, though, I run a Linux desktop with virtualized (ask me later) instances of client servers or development environments.  In this case, I had a Windows XP guest system running, but I needed to be able to access my Linux system as well on their network.  So, while Linux&#8217;s NetworkManager would happily make a connection to their relatively oldish VPN server device, I couldn&#8217;t make another from the XP client at the same time.</p>
<p>What&#8217;s more, their VPN server device was having no part of routing my network&#8217;s traffic.  (Note: I am not specifying the parts involved here because I don&#8217;t want to start a &#8216;you should have done THIS!&#8217; discussion.  I&#8217;m very much a &#8216;get it working and move on&#8217; person.)</p>
<p><span id="more-28"></span></p>
<p>OK, so, I had a couple of choices.  I could go into their network and see if I could reroute all the traffic that looked like it came from me back through the VPN (I actually tried that, and it didn&#8217;t work, but it was no good anyway since it was too invasive).  Worse, I could reconfigure their VPN device to route my traffic, but again, that&#8217;s their machine, and I wasn&#8217;t going to spend all day figuring out how to accomplish that&#8211; on a device that isn&#8217;t even made anymore.</p>
<p>That&#8217;s all a long build-up to what turned out to work, not require anything on their side, and take me all of about 5 minutes.  The answer was to NAT the traffic from my guest OS to the Linux box.  (NAT = network address translation.  That&#8217;s when you wrap all the traffic from your network in your exposed single address, so that routers treat it like it came from that machine.  That&#8217;s how you can have a bunch of computers in your house running on that one IP address that comes with your DSL.)</p>
<p>192.168.1.X = Linux box with actual VPN connection<br />
10.0.0.131 = The assigned VPN address for that machine on the client network<br />
192.168.1.Y = XP virtual instance<br />
10.0.0.0/24 = client network</p>
<p>Step 1) Route the traffic from the XP client.</p>
<pre>route add 10.0.0.0 mask 255.255.255.0 192.168.1.X</pre>
<p>Step 2) Make sure the Linux box is routing traffic.</p>
<pre>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre>
<p><em>(set it permanently in /etc/sysctl.conf as net.ipv4.conf.default.forwarding=1)</em></p>
<p>Step 3) Setup iptables to NAT the traffic.  (Connect to VPN first, of course.)</p>
<pre>iptables -t nat -A POSTROUTING -d 10.0.0.0/24 -o ppp0 -j SNAT --to 10.0.0.131</pre>
<p>What you see there is my adding a rule to iptables that tells it that the last thing to do with any packets going to my client&#8217;s network is to wrap them in the aforementioned outer envelope with a return address of the Linux box&#8217;s assigned IP address in the client&#8217;s network.</p>
<p>If all goes well, the receiving end recognizes that this is a NATed packet, unwraps it, does whatever with it, and responds to the source with another packet wrapped similarly in an envelope that delivers it to the Linux box, where it&#8217;s unwrapped and passed back to the originating XP machine.</p>
<p>And, for what it&#8217;s worth, it did go well.  I was able to route both machines&#8217; traffic over the same connection without having to noodle with the client&#8217;s internal routing at all.</p>
<p>&#8220;I love it when a plan comes together.&#8221;  &#8212; Hannibal Smith, The A-Team</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2009/11/16/routing-over-pptp-vpn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NX: Great Thing or The Greatest Thing</title>
		<link>http://riansreallygoodtechnoblog.com/2009/11/03/nx-great-thing-or-the-greatest-thing/</link>
		<comments>http://riansreallygoodtechnoblog.com/2009/11/03/nx-great-thing-or-the-greatest-thing/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:35:00 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[freenx]]></category>
		<category><![CDATA[nomachine]]></category>
		<category><![CDATA[nx]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/?p=18</guid>
		<description><![CDATA[If you&#8217;re like me and have more than one machine to worry about, you&#8217;ve no doubt tried to remotely access one from the other.  There are times when you just can keep getting up to go over to the other machine just to enter some command or see how something&#8217;s running.  Then there are times [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me and have more than one machine to worry about, you&#8217;ve no doubt tried to remotely access one from the other.  There are times when you just can keep getting up to go over to the other machine just to enter some command or see how something&#8217;s running.  Then there are times when one machine is in a colocation closet in San Francisco, and you&#8217;re living in, say, Japan, like I was.  Or maybe your mom can&#8217;t get the 12:00 to stop blinking on her VCR (and she still has a VCR), and now she&#8217;d like you to figure out why &#8220;the Internet is broken.&#8221;<span id="more-18"></span></p>
<p><strong>RDP, VNC, ABC&#8230;</strong></p>
<p>Well, if you&#8217;re lucky, you can use something like the Windows Remote Desktop (RDP), which, generally speaking, can give pretty good results if you&#8217;ve got a nice fast connection with very low latency.  You might also have access to something like PCAnywhere, GoToMyPC, or some other proprietary solution.  Likewise, they&#8217;re able to be optimized to get pretty reasonable results.</p>
<p>If you&#8217;re <em>unlucky</em>, you&#8217;re managing a Linux box, and the best that you could hope for was <a title="It's Wikipedia... so it's probably not true." href="http://en.wikipedia.org/wiki/Virtual_Network_Computing" target="_blank">VNC</a>.  I&#8217;m not sure what I&#8217;m missing about VNC, but it has generally sucked.  I mean, it&#8217;s great that it works at all, but I&#8217;ve tried <a href="http://www.tightvnc.com/" target="_blank">Tight</a>, <a href="http://www.uvnc.com/" target="_blank">Ultra</a>, Vine, etc., and they&#8217;re all laggy and clunky.  It&#8217;s one of those things where it&#8217;s just annoying enough that I throw up my hands and go all command line on their asses.</p>
<p>That&#8217;s fine too, but the truth is, my <a title="If you're clicking on this, you probably have it, too.  Pay attention." href="http://www.add.org/" target="_blank">ADD</a> likes to have twenty things going at once, and it&#8217;s just very nice to have a desktop that lets me run process, file, or resource monitors and terminals for one machine on one and all those things for another machine on a separate one.  VNC lets me do it, but the performance, particularly over a sub-optimal connection, is not spectacular&#8211; unusably so often.</p>
<p><strong>And The Angels Descended from Heaven&#8230;</strong></p>
<p>Some time ago, I read about NX.  This was one of those cases where I noticed the mention of something one day, and the next day it was <em>everywhere</em>.  I had no clue what it was, and, frankly, I was too set in my ways to check it out.  Finally, about a year or so ago, I decided to look into it.  It turned out that it was a remote access system that was something between VNC and remote X-Windows.  Finally, I pulled down <a title="NoMachine's Site" href="http://www.nomachine.com/" target="_blank">NoMachine</a>&#8217;s <a title="There's also one for Solaris" href="http://www.nomachine.com/select-package.php?os=linux&amp;id=1" target="_blank">&#8220;Free Forever&#8221; Linux edition</a> and installed it on my servers at the colo and the client on my Mac laptop.</p>
<p><em>Yoiks!</em> Before too long, I was running a desktop over a long-distance net connection (on top of a VPN, to boot), and it performed like I was sitting in front of it&#8211; with the obvious exception of any kind of large graphics or video, there&#8217;s only so much you can do to compress graphics.  But my monitors and terminals reacted to my input almost instantaneously.  This was a huge step forward for me and anyone involved in the remote administration of Linux boxen.</p>
<p>I haven&#8217;t even touched the NX network facilities that allow for nodes to be defined, to distribute applications between those nodes, and then to nest them together on the client, but I use it constantly in the most basic remote desktop configuration. I hope to delve into those additional features to configure myself some aggregated remote desktops for different networks (assuming I understand those features correctly).</p>
<p><strong>How It Works: Taking X Back to Its Roots</strong></p>
<p>NX works by re-discovering the original nature of X-Windows.  X was developed as a network-based protocol.  It&#8217;s far less integrally tied to the operating system than, say, Windows.  The operating system runs the apps and outputs to an &#8220;X server&#8221;, a separate application responsible for rendering that output.  Usually, that X server is running on the same machine, and it appears to simply be a desktop environment no different than a Mac or Windows.  But, by changing the display variable, X can output to any arbitrary X server, whether it&#8217;s local or across the world.  The X server does the heavy lifting of drawing the output to whatever machine it&#8217;s on.</p>
<p>The problem is that X doesn&#8217;t do a very good job dealing with the world as it is.  It doesn&#8217;t handle compression of the, sometimes fat, data stream.  It doesn&#8217;t adapt to different bandwidths.  It isn&#8217;t very smart about &#8220;differential&#8221; analysis of the action on screen (i.e., only include in the data stream that which has changed on the screen and leave the rest.)</p>
<p>NX does all that and does it amazingly well.  I have to color-code my desktops so that I can tell them apart on my Linux workstation&#8211; my daily use desktop.  I rarely have that problem with RDP or VNC.  It&#8217;s pretty obvious that that&#8217;s what you&#8217;re looking at in those cases since you usually have to cut display parameters so far back that the display looks like a bad 1990 animated GIF.  With NX, the display looks nearly identical to my local display.  All without much impact at all on my local resources.</p>
<p><strong>OK, Now I Start Whining</strong></p>
<p>Of course, NX isn&#8217;t perfect.  I had some trouble getting my headless servers setup to work with it without causing a mad avalanche of installation to get Gnome or KDE working, but <a title="Between Fluxbox and Gnome, there's..." href="http://www.xfce.org/" target="_blank">XFCE</a> was quick to install and works great.  Like most things <em>Whateverix</em>, there&#8217;s a fairly high noodle factor to get it optimally set up, but thus far, on Fedora, Ubuntu, and Debian distros, it&#8217;s worked nearly flawlessly.  And that includes clients for Windows and Mac.</p>
<p>There aren&#8217;t too many things you can say that about.  I&#8217;ve become quite accustomed to things just not working quite right&#8211; most anyone who had the misfortune to install Ubuntu&#8217;s Jaunty release with, let&#8217;s say, an ATI graphics card can likely attest to that.  Mine installed to a black screen, required the installation of pre-release drivers from an unsupported repository, filled my logs with propeller-headed nonsense about BARs and MMIOs, and just generally was a turd.  But that&#8217;s another story&#8230;</p>
<p>My point is that NX, for me at least, has been one of those almost entirely pleasant, worthwhile experiences that has definitely made my work easier and more pleasant.  Imagine that.</p>
<p><strong>Commercial Vs. Open Source</strong></p>
<p>Now, there&#8217;s NX and there&#8217;s NX&#8230; ever a fan of open source, I tried to install <a title="Godspeed, I hope you have better luck." href="http://freenx.berlios.de/" target="_blank">FreeNX</a> rather than the commercial version from NoMachine.  Sadly, it was immediately apparent that there&#8217;s some internal squabble about libraries (I&#8217;m running 64-bit Linux) or <em>Something-Else-I-Don&#8217;t-Care-About</em>, and it simply wouldn&#8217;t install correctly.</p>
<p>Faced with a perfectly functional (and free, as in beer) version from NoMachine, I wasn&#8217;t about to spend yet another day trying to decode the passive-aggressive oneupmanship that can be open source &#8220;support&#8221; (<em>&#8216;RTFM n00b!&#8217;</em>).  Now, I should say that I think open source is the cat&#8217;s pajamas.  I contribute money when I can&#8217;t contribute time, but there is a tendency in the community to think that most users or low-level kernel driver engineers.  I&#8217;m not.  I&#8217;m just a big doofus who likes the stuff.  Honestly, I&#8217;m pretty far down the geek path, but one can only dedicate so much time to getting their tools to work.  Ya know?</p>
<p><strong>Give It a Shot</strong></p>
<p>So, if you&#8217;re someone who wants to remotely access a Linux box, and you&#8217;ve been dissatisfied with your options so far, give NX a whirl.  You&#8217;ll need to download the Client, Node, and Server packages for the server.  The client requires only that package.  Install those guys and (at least in my case) little or no server-side configuration was needed.  It just worked &#8220;right out of the box&#8221;.  Poke around and check out the options. They also claim to support Citrix, RDP, and VNC, though, again, I haven&#8217;t had the inclination nor time to check those out yet.</p>
<p>It&#8217;s secure (runs over SSH), relatively easy to setup (at least by Linux standards), and free for Linux.  Do it.  You can thank me later.</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2009/11/03/nx-great-thing-or-the-greatest-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Backing Up MySQL: Know Your Cat: Storage Engines</title>
		<link>http://riansreallygoodtechnoblog.com/2009/11/02/more-backing-up-mysql-know-your-cat-storage-engines/</link>
		<comments>http://riansreallygoodtechnoblog.com/2009/11/02/more-backing-up-mysql-know-your-cat-storage-engines/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 19:05:20 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[fulltext]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[myisam]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[storage engines]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/?p=10</guid>
		<description><![CDATA[Last time, I wrote about options for backing up MySQL, but I talked about them as though there is one kind of database, the MySQL database.  However, that&#8217;s not at all true.  There are two main types of storage engine used in MySQL&#8211; MyISAM and InnoDB.  In fact, there are many more, but these are [...]]]></description>
			<content:encoded><![CDATA[<p><a title="In case you missed it..." href="http://riansreallygoodtechnoblog.com/2009/10/31/backing-up-mysql-more-than-one-way-to-skin-a-cat/" target="_blank">Last time</a>, I wrote about options for backing up MySQL, but I talked about them as though there is one kind of database, the MySQL database.  However, that&#8217;s not at all true.  There are two main types of storage engine used in MySQL&#8211; MyISAM and InnoDB.  In fact, there are many more, but these are the two most commonly used without special requirements.<em> This is about the point where those of you not interested in the more, well, &#8220;technical&#8221; aspects of databases might want to go outside for a walk. <span id="more-10"></span></em></p>
<p>In reality, you could use MySQL for years and really know little or nothing about these database engines.  I did.  After all, if you&#8217;re setting up a database to manage, say, your office equipment in a small business, you&#8217;ll maybe have a couple of hundred rows?  You may only access the database once a week.  Who cares what the engine is?  MySQL will default to MyISAM (usually), and that will work fine.  You&#8217;ll never notice, nor care.</p>
<p>However, when you begin to approach almost any kind of consistency, performance, or resource constraint, you&#8217;ll want to think about which engine you&#8217;re using.  This, in turn, will affect your backup process.</p>
<p><strong>The 10,000 foot comparison of MyISAM and InnoDB</strong></p>
<p>I always find that it&#8217;s nice to look at these things in a table:</p>
<table style="text-align: left; width: 100%;" border="1" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td style="vertical-align: top;"></td>
<td style="vertical-align: top;">MyISAM</td>
<td style="vertical-align: top;">InnoDB</td>
</tr>
<tr>
<td style="vertical-align: top;">ACID (i.e., transactional)</td>
<td style="vertical-align: top;">No</td>
<td style="vertical-align: top;">Yes</td>
</tr>
<tr>
<td style="vertical-align: top;">Foreign Keys</td>
<td style="vertical-align: top;">No</td>
<td style="vertical-align: top;">Yes</td>
</tr>
<tr>
<td style="vertical-align: top;">Full-text Searches</td>
<td style="vertical-align: top;">Yes</td>
<td style="vertical-align: top;">No</td>
</tr>
<tr>
<td style="vertical-align: top;">Locking</td>
<td style="vertical-align: top;">Table</td>
<td style="vertical-align: top;">Row</td>
</tr>
<tr>
<td style="vertical-align: top;">Memory Use</td>
<td style="vertical-align: top;">Less</td>
<td style="vertical-align: top;">More</td>
</tr>
<tr>
<td style="vertical-align: top;">Speed Winner</td>
<td style="vertical-align: top;">Possibly in light load</td>
<td style="vertical-align: top;">Usually</td>
</tr>
<tr>
<td style="vertical-align: top;">Backup</td>
<td style="vertical-align: top;">mysqldump, mysqlhotcopy, replication, files</td>
<td style="vertical-align: top;">mysqldump, replication, files*, ibbackup**</td>
</tr>
</tbody>
</table>
<p><em>* you technically <span style="text-decoration: underline;">can</span> do a files-based backup with InnoDB (in fact, I do), but it&#8217;s a bit more involved.  See below for a discussion.</em></p>
<p><em>** ibbackup is a commercial product sold by the developers of the innodb engine, now a subsidiary of, gulp, Oracle.  The price? According to their site: &#8220;&#8230;please contact innodb_sales_ww at oracle.com&#8230;&#8221; i.e., &#8220;how much ya got?&#8221;</em></p>
<p>Let&#8217;s hit these in order:</p>
<p><strong>ACID</strong>: atomicity, consistency, uh&#8230; isohedron, um&#8230; danger?  Whatever.  It&#8217;s an acronym that means that the engine has mechanisms in place to ensure that &#8220;transactions&#8221; are performed reliably.  The classic example is the bank transfer.  You need to know that if you take the money out of account A, it gets into account B.  If not, the whole thing is called off.  MyISAM does not implement these mechanisms.  InnoDB does.</p>
<p><strong>Foreign Keys (FK)</strong>: Similarly to ACID, FK assures that your data makes sense in relation to your model.  For example, if you&#8217;re looking at an 8-track tape collection (I&#8217;m super old), you can&#8217;t have a recording without the recording&#8217;s artist.  So, before the recording table gets &#8220;They Only Come Out at Night&#8221; inserted, the artist table must contain Edgar Winter.  If you delete Edgar from the artist table, you&#8217;d better be sure that &#8220;TOCOAN&#8221; is also out of the recording table.  So, unlike ACID, which enforces proper operation of the database, FK enforces proper/logical USE of the database.  MyISAM does not support FK.  InnoDB does.</p>
<p><strong>Full-text Searches</strong>: In short, if you have a large text-type field, MyISAM supports special functions to index that field so that it can be searched against keywords with natural language and keyword expansion extensions if desired.  InnoDB doesn&#8217;t.</p>
<p><strong>Locking</strong>: MyISAM does not support row-level locking.  That means that if you want to lock a field to prevent it from changing during an operation, you need to lock the entire table that it&#8217;s in.  That means all write operations stop until you&#8217;re done.  In a heavy load situation, that&#8217;s, as they say, &#8220;bad&#8221;.  This is one of the main reasons that InnoDB whoops MyISAM in its ability to support concurrent access, particularly at heavy loads.</p>
<p><strong>Memory</strong> Use: All those fancy features of InnoDB aren&#8217;t free.  One cost is additional memory use.  For instance, InnoDB maintains &#8220;clustered&#8221; indexes and includes the primary key in any secondary indexes.  This speeds data access and improves CPU and IO efficiency, but at a cost of storing all that information in memory.  MyISAM stores  data and indexes in separate files.  Less efficient, but easier on the RAM.</p>
<p><strong>Speed Winner</strong>: Oh boy, I hate to even get into this one, but most of the benchmarks I&#8217;ve seen show InnoDB to win speed contests in most cases.  This becomes particularly true at high load levels.  This makes a lot of sense if you consider the concurrency and efficiency characteristics.  Or, if you have some anecdotal evidence to the contrary, let&#8217;s just agree that you&#8217;re right, and I&#8217;m wrong.  (But I&#8217;m not.)</p>
<p><strong>BACKUP!</strong>: Finally.  OK, so the big difference is that it&#8217;s not quite as easy to just copy the InnoDB files and expect anything good to happen.  With MyISAM, you can.  This means, according to the MySQL peeps, that you also cannot use the mysqlhotcopy utility with InnoDB since it uses the file mechanism to make the backup. You can, however, use the mysqldump utility with either.  Both are easier to do with a logical volume snap or replicated slave server to shutdown during the backup.  I also included InnoBase&#8217;s ibbackup program in case you&#8217;ve got some money burning a hole in your pocket.  Given the available options, I&#8217;m not sure I see the point in such a thing, but if you need some of the features it provides and don&#8217;t want to roll your own, it might be worth looking into.</p>
<p>So, that brings us back to my solution.  Given that I personally prefer to default my storage to InnoDB unless there&#8217;s a reason not to, I went with the replication model&#8211; create a slave server and calmly shut that down, make the backup, and restart the slave.  The thing I like about this approach is that it requires a minimum of fuss, causes no downtime, provides a running backup server, and does nothing that precludes me from using whatever type of storage engine I choose or mixing them together.</p>
<p><strong>Two Pronged Approach to Backups:</strong></p>
<p>Firstly, I turn on binary logging on the slave.  Then, when I shut the database down, I copy the relevant files (ibdata, .ibd, ib_logfile, .frm, and the my.cnf) to the backup staging area.  After that I can start the database back up, and it&#8217;ll sync itself back to the master.  There&#8217;s definitely some exposure to Murphy&#8217;s Law in there (e.g., the master takes on more data while the slave is shut down and then crashes before it syncs) but the probability of that is pretty minuscule.</p>
<p>Then, on a less frequent basis, I take a mysqldump of the database.  It takes a lot longer, but it&#8217;s got the advantages of not being binary, so it&#8217;s readable and less likely to become completely corrupted.  It&#8217;s sort of a backup-backup in case I need to fall back from a corrupt binary backup.</p>
<p>OK, maybe that&#8217;s enough on that topic.  Can hardly wait to see what I write about next&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2009/11/02/more-backing-up-mysql-know-your-cat-storage-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing up MySQL: More than one way to skin a cat.</title>
		<link>http://riansreallygoodtechnoblog.com/2009/10/31/backing-up-mysql-more-than-one-way-to-skin-a-cat/</link>
		<comments>http://riansreallygoodtechnoblog.com/2009/10/31/backing-up-mysql-more-than-one-way-to-skin-a-cat/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 03:46:41 +0000</pubDate>
		<dc:creator>rian</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[logical volumes]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://riansreallygoodtechnoblog.com/?p=8</guid>
		<description><![CDATA[Moving to MySQL
I&#8217;m currently involved in moving an application from SQL Server (2000) to MySQL.  The reasoning isn&#8217;t terribly relevant, but primarily it&#8217;s an open source v. closed source issue.  This (aging) J2EE app required a proprietary bridge between the application server (Java on Linux) and the database (SQL Server on Windows 2000 Server).  That [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Moving to MySQL</strong></p>
<p>I&#8217;m currently involved in moving an application from SQL Server (2000) to MySQL.  The reasoning isn&#8217;t terribly relevant, but primarily it&#8217;s an open source v. closed source issue.  This (aging) J2EE app required a proprietary bridge between the application server (Java on Linux) and the database (SQL Server on Windows 2000 Server).  That odd adapter has caused us all stress over the years.  Being proprietary, we didn&#8217;t know <em>exactly</em> how it worked nor whether it would be around tomorrow.<span id="more-8"></span></p>
<p>The cost was also a consideration.  Updating the server to the current version would likely cost us thousands of dollars just for the RDBMS itself.  We&#8217;d likely move to the latest OS and upgrade the hardware, too.  It got very pricey, very quickly.</p>
<p>We came to the conclusion that a better solution would be to migrate the whole mess over to MySQL on a Linux server.  I am intimately familiar with MySQL and knew that for very little dough we could provide a fast data store with replication for fail-over, and we&#8217;d eliminate that vaguely disconcerting feeling that relying on closed source proprietary software creates.</p>
<p><strong>A More DIY Model of Disaster Recovery</strong></p>
<p>However, one of the nice things that MSSQL does provide is a backup mechanism from within that database manager itself.  MySQL does not.  I needed to evaluate my options given the situation and choose the most reliable, simplest-to-implement backup solution that wouldn&#8217;t cost additional money nor require disruptive, time-consuming reconfiguration of existing systems.</p>
<p>It appears to me that there are three common methods for backing up a simple MySQL database:</p>
<ol>
<li>mysqldump<br />
Shut down the database, dump out a text file with all of the SQL statements required to recreate the database, and restart.  Then, back up the file like any other file.</li>
<li>LVM snapshots<br />
Lock the tables, create a logical volume snapshot of the data partition, and unlock the tables.  Then back up the snapshot and remove it when completed.</li>
<li>Replication<br />
Create a slave database server that replicates the target server, and simply stop the slave, back up the data, and restart the slave.</li>
</ol>
<p>Mysqldump has the advantage of being very simple to setup and script.  Also, the backup is a text file, and so a ding to the file isn&#8217;t likely to destroy it completely.  With a binary backup, a data ding could render the whole thing useless.  Still, it requires a fair amount downtime, which is bad, and the backup files can be very large, which just makes backups and restores take that much longer.</p>
<p>LVM snapshots sound great.  There&#8217;s very little downtime (just enough to create the snapshot), and the backup is the actual datafile.  It&#8217;s likely to be smaller and restore takes essentially no time since the data file can just be dropped back into a running server and used.  Still, snapshots only work when the filesystem is built on logical volumes (another good topic to discuss, I think).  We were looking at some older systems that used standard physical partitions, and I was not enthusiastic about shutting them down, backing everything up, and reinstalling on LVM just to accomplish this.</p>
<p>So, I settled on replication.  MySQL provides a very slick ability to create a master-slave replication arrangement wherein one server maintains an identical copy of the master database (god willing).  There&#8217;s just a bit of setup, but with this arrangement, there&#8217;s no downtime for the master, and the slave can be backed up in any convenient way without concern for the time involved.  Also, should something befall the master, it is quite likely that the application server can just be pointed to the slave and carry on as though nothing happened.</p>
<p>As it happened, we had a machine in our colocation cabinet just sucking power, doing nothing.  I set up a replication slave on it in just a few minutes.  Then, I wrote a quick script to shut it down, run the backup, and restart the slave.  I added that to the cron table, and we had our backups licked.</p>
<p>Now, obviously, I&#8217;m not talking about a very complex setup here.  This is an application that is critical to the business, but not what I consider heavily used.  Should it ever graduate to the level of something like a load-balanced cluster, I&#8217;ll have to revisit this topic.  In the meantime, we&#8217;re securely covered with a backup process that doesn&#8217;t require downtime and provides the side-benefit of a spinning fail-over server as an even faster disaster recovery path.</p>
<p><strong>A Condescending Lecture on Backups</strong></p>
<p>Backup, backup, backup&#8230; it&#8217;s so often overlooked until it&#8217;s too late.  Do yourself a favor, spend a little money and time and back up more than you think you need to.  When the Bad Thing happens, a good backup strategy can mean the difference between a routine mechanical replacement and restore (<em>everyone&#8217;s happy!</em>) and an uncertain scrounging of data or total loss (<em>ain&#8217;t nobody happy</em>).  Make it a priority.</p>
<p>And like most things, the best way to start is to just start.  Now.  Don&#8217;t worry if it&#8217;s not perfect.  Just take a disk image if that&#8217;s all you can do.  Then, consider what would happen if various nasty scenarios occurred.  Then think about how you might recover.  What if the machine&#8217;s stolen (it happens)?  What if the machine bursts into flames (that&#8217;s happened to me)?  What if an earthquake crushes the colo (<em>probably not, but what if</em>)?</p>
<p>Classify your data by criticality and back it up accordingly.  I recently nearly lost my company books when a power surge took out my active drive and the routine backup drive.  I was lazy and calculated the probability that both of those drives would fail at the same time and decided without really thinking about it that I&#8217;d get around to good backups&#8230; later&#8230; sometime&#8230; Luckily for me, I&#8217;d had at least the forethought to take an image of my drives and store them offline.  I&#8217;d forgotten that I&#8217;d done that and spent the better part of a day engaged in self-loathing.  Now, I regularly take some time to consider how I might improve my backups&#8211; net-based, portable disks swapped offsite, RAIDed online storage, or maybe all of the above.  It&#8217;s done wonders for my comfort factor to know that if my backups turn out to be insufficient, it&#8217;s likely that I&#8217;ll be more worried about the zombies than my business records.</p>
<p>Oh, happy Halloween.</p>
]]></content:encoded>
			<wfw:commentRss>http://riansreallygoodtechnoblog.com/2009/10/31/backing-up-mysql-more-than-one-way-to-skin-a-cat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
