public
Description: A rails plugin to backup Mysql to Amazon S3
Homepage:
Clone URL: git://github.com/xaviershay/db2s3.git
Click here to lend your support to: db2s3 and make a donation at www.pledgie.com !
db2s3 / README
100644 38 lines (29 sloc) 1.028 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 "db2s3", :source => "http://gemcutter.org"
 
  # In Rakefile
  require 'db2s3/tasks'
 
  # In config/initializers/db2s3.rb
  DB2S3::Config.instance_eval do
    S3 = {
      :access_key_id => 'yourkey',
      :secret_access_key => 'yoursecretkey',
      :bucket => 'yourapp-db-backup'
    }
  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 does not clean up old back ups
 
Kudos:
  http://github.com/pauldowman/blog_code_examples/tree/master/mysql_s3_backup