ffmike / db2s3_plus

Database backup to Amazon S3, using either MySQL or PostgreSQL

This URL has Read+Write access

name age message
file README Sat Oct 24 11:19:56 -0700 2009 README tweak [ffmike]
file Rakefile Sat Oct 24 11:14:32 -0700 2009 initial commit, based on db2s3 plugin [ffmike]
file db2s3_plus.gemspec Sat Oct 24 11:17:28 -0700 2009 Quick tweaks. Not sure I'll build as a gem, but... [ffmike]
file init.rb Sat Oct 24 11:14:32 -0700 2009 initial commit, based on db2s3 plugin [ffmike]
directory lib/ Sat Oct 24 12:30:27 -0700 2009 Holy typoes, batman! [ffmike]
directory rails/ Sat Oct 24 11:14:32 -0700 2009 initial commit, based on db2s3 plugin [ffmike]
directory spec/ Sat Oct 24 11:14:32 -0700 2009 initial commit, based on db2s3 plugin [ffmike]
directory tasks/ Sat Oct 24 11:14:32 -0700 2009 initial commit, based on db2s3 plugin [ffmike]
README
DB2S3 - A rails plugin to backup Mysql to Amazon S3
---------------------------------------------------
You're looking at a monthly spend of four cents
So pony up you cheap bastard, and store your backups on S3

Usage:
  # In config/environment.rb
  config.gem "xaviershay-db2s3", :lib => "db2s3", :source => "http://gems.github.com"

  # In Rakefile
  require 'db2s3/tasks'

  # In config/initializers/db2s3.rb
  DB2S3::Config.instance_eval do
    S3 = {
      :access_key_id     => 'YourAccessKeyID',
      :secret_access_key => 'YourSecretAccessKey',
      :bucket            => 'your-backup-bucket-name',
      :keep_backups      => 336
    }
  end
  # DB credentials are read from your rails environment

  rake gems:install

  # Add to your crontab or whatever
  rake db2s3:backup:full
  rake db2s3:backup:incremental # Unimplemented

  # Handy tasks
  rake db2s3:metrics         # Estimated costs
  rake db2s3:backup:restore  # You should be testing this regularly

Caveats:
  Currently only stores the latest backup

Kudos:
  http://github.com/pauldowman/blog_code_examples/tree/master/mysql_s3_backup
  Xavier Shay and Felipe Coury for work on original db2s3 plugin