tag:www.rhnh.net,2008:/databaseDatabase - Xavier Shay's Blog2010-06-01T00:56:09ZEnkiXavier Shaynotreal@rhnh.nettag:www.rhnh.net,2008:Post/8152010-06-01T01:58:00Z2010-06-01T00:56:09ZRails DB Training - US/UK Tour<p>You may not know, but I run an advanced rails training session titled “Your Database Is Your Friend”. Previously, I have only done this in Australia. Starting late July, I will be running this session throughout the United States and the United Kingdom. I’m still planning dates and venues, if you or someone you know is interested in hosting a session, please get in touch.</p>
<p>For details, see the <a href="http://www.dbisyourfriend.com">DB is your friend rails training website</a>.</p>tag: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>