tag:www.rhnh.net,2008:/backup Backup - Xavier Shay's Blog 2009-03-09T15:25:00Z Enki Xavier Shay notreal@rhnh.net tag:www.rhnh.net,2008:Post/794 2009-03-09T15:25:00Z 2009-03-09T15:25:00Z Backup 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 &#8211; <a href="http://github.com/xaviershay/db2s3">db2s3</a>. It&#8217;s a rails plugin that provides rake tasks for backing up your database and storing it on Amazon&#8217;s S3 cloud storage. S3 is a trivially cheap offsite backup solution &#8211; for small databases it costs about 4 cents per month, even if you&#8217;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&#8217;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&#8217;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&#8217;s why a plugin was needed. It&#8217;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/429 2008-02-02T07:24:00Z 2008-03-29T03:54:44Z Seagate 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 &#8220;Seagate 500Gb external drive&#8221;. What is not stupid is the packaging. It&#8217;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>&#8220;Note: Times may vary depending on how excited you are about using your new FreeAgent Pro data mover.&#8221;</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&#8217;t support writing to <span class="caps">NTFS</span> volumes. This makes me sad. I presume linux can write to Mac&#8217;s filesystem, but <span class="caps">AFAIK</span> windows can&#8217;t, which unfortunately I need to support because that&#8217;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&#8217;t mind Mac catching up.</p> <p>It is much quieter than I expected. It&#8217;s under full load right now &#8211; I&#8217;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&#8217;m back from my holiday, but I&#8217;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>