Robot Has No Heart

Xavier Shay blogs here

A robot that does not have a heart

Backup MySQL to S3 with Rails

UPDATE: This code is too old. Use db2fog instead. It does the same thing but better.

Here is some code I wrote over the weekend – db2s3. 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.

There are many scripts around that do this already, but they fail to address the biggest actual problem. The aws-s3 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 I really hate system administration. I want to spend as little time as possible and I want things to Just Work.

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?

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.

db2s3. Check it out.

Seagate 500Gb FreeAgent Pro external drive - first impressions

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:


Instructions #1

Instructions #2

Text on the last frame says: “Note: Times may vary depending on how excited you are about using your new FreeAgent Pro data mover.” Delicious.

I had to format it as FAT32 because as far as I can tell OSX doesn’t support writing to NTFS volumes. This makes me sad. I presume linux can write to Mac’s filesystem, but AFAIK 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 NTFS write support stable for a while now, I wouldn’t mind Mac catching up.

It is much quieter than I expected. It’s under full load right now – I’m rsyncing to it.

5 year warranty, so I guess they have confidence in the product.

Initial impression is positive, ask me again when I actually have to restore from it.

Unrelated footnote: 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.

UPDATE Just reformatted for Time Machine, YAGNIed the work-with-family requirement.

A pretty flower Another pretty flower