tag:www.rhnh.net,2008:/backupBackup - Xavier Shay's Blog2009-03-09T15:25:00ZEnkiXavier Shaynotreal@rhnh.nettag:www.rhnh.net,2008:Post/7942009-03-09T15:25:00Z2009-03-09T15:25:00ZBackup MySQL to S3 with Rails<p><strong><span class="caps">UPDATE</span>:</strong> This code is too old. Use <a href="https://github.com/yob/db2fog">db2fog</a> instead. It does the same thing but better.</p>
<p>Here is some code I wrote over the weekend – <a href="http://github.com/xaviershay/db2s3">db2s3</a>. It’s a rails plugin that provides rake tasks for backing up your database and storing it on Amazon’s S3 cloud storage. S3 is a trivially cheap offsite backup solution – for small databases it costs about 4 cents per month, even if you’re sending full backups every hour.</p>
<p>There are <a href="http://info-architects.net/2007/08/25/rake-task-for-mysql-backup-to-amazon-s3/">many</a> <a href="http://pauldowman.com/2009/02/08/mysql-s3-backup/">scripts</a> <a href="http://therailscoder.typepad.com/the_rails_coder_ruby_on_r/2008/04/automatic-mysql.html">around</a> that do this already, but they fail to address the biggest actual problem. The <a href="http://amazon.rubyforge.org">aws-s3</a> gem provides a really nice ruby interface to S3, and dumping a backup then storing it really isn’t that hard. The real problem is that <strong>I really hate system administration.</strong> I want to spend as little time as possible and I want things to Just Work.</p>
<p>A script is great but there’s still too many things for me to do. Where does it go in my project? How do I set my credentials? How do I call it?</p>
<p>That’s why a plugin was needed. It’s as little work as possible for a rails developer to backup their database, so they can get back to making their app awesome.</p>
<p><a href="http://github.com/xaviershay/db2s3">db2s3</a>. Check it out.</p>tag:www.rhnh.net,2008:Post/4292008-02-02T07:24:00Z2008-03-29T03:54:44ZSeagate 500Gb FreeAgent Pro external drive - first impressions<p>It has a stupid name. The title is the first and last time I will refer to it as anything other than a “Seagate 500Gb external drive”. What is not stupid is the packaging. It’s clear, concise, fun, and most importantly makes me feel like Seagate actually cares about the people who use its products. Observe the following shots of the static packaging and the instruction booklet:</p>
<p><a href="http://www.flickr.com/photos/18919286@N08/2235621041/" title="Packaging by Xavier Shay, on Flickr"><img src="http://farm3.static.flickr.com/2171/2235621041_754b605d2a_m.jpg" width="240" height="218" alt="Packaging" /></a></p>
<p><a href="http://www.flickr.com/photos/18919286@N08/2236410986/" title="Instructions #1 by Xavier Shay, on Flickr"><img src="http://farm3.static.flickr.com/2224/2236410986_b40c4851fa.jpg" width="500" height="166" alt="Instructions #1" /></a></p>
<p><a href="http://www.flickr.com/photos/18919286@N08/2235620975/" title="Instructions #2 by Xavier Shay, on Flickr"><img src="http://farm3.static.flickr.com/2210/2235620975_b37849eb27.jpg" width="500" height="167" alt="Instructions #2" /></a></p>
<p>Text on the last frame says: <em>“Note: Times may vary depending on how excited you are about using your new FreeAgent Pro data mover.”</em> Delicious.</p>
<p>I had to format it as <span class="caps">FAT32</span> because as far as I can tell <span class="caps">OSX</span> doesn’t support writing to <span class="caps">NTFS</span> volumes. This makes me sad. I presume linux can write to Mac’s filesystem, but <span class="caps">AFAIK</span> windows can’t, which unfortunately I need to support because that’s what all my family use :( No fault of the drive here, just another windows gripe. Although linux has had <span class="caps">NTFS</span> write support stable for a while now, I wouldn’t mind Mac catching up.</p>
<p>It is much quieter than I expected. It’s under full load right now – I’m rsyncing to it.</p>
<p>5 year warranty, so I guess they have confidence in the product.</p>
<p>Initial impression is positive, ask me again when I actually have to restore from it.</p>
<p><strong>Unrelated footnote:</strong> Technically I’m back from my holiday, but I’m snowed under with dancing commitments for now so coding updates (and enki updates) will still be sporadic.</p>
<p><strong><span class="caps">UPDATE</span></strong> Just reformatted for Time Machine, YAGNIed the work-with-family requirement.</p>