0.0
No commit activity in last 3 years
No release in over 3 years
This gem allows to create DB backups in a way that does not block the production RDS instance
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.9
~> 10.0
 Project Readme

RdsDbBackup

http://kurbaitis.io/blog/DB-backups-with-AWS-RDS

Prerequisites

Installation

Add this line to your application's Gemfile:

gem 'rds_db_backup'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rds_db_backup

Configuration

If using Rails, please add this to your config/initializers/rds_db_backup.rb:

RdsDbBackup.configure do |config|
  config.region = 'us-west-2'
  config.db_instance_name = 'gem'
  config.db_bucket = 'gem-rds-db-backups'
  config.db_name = 'test'
  config.db_username = 'root'
  config.db_password = '5441c9b378c586441cd56ccbcb3'
  config.db_host = 'gem.cupedrznbqvt.us-west-2.rds.amazonaws.com'
  config.db_port = 3306
  config.db_params_group = 'default.mysql5.6'
  config.db_security_group = 'sg-7b429a1f'
  config.db_host_name_domain = 'cupedrznbqvt.us-west-2.rds.amazonaws.com'
  config.aws_access_key_id = 'AKIAJVZUKE7OKCH7T66A'
  config.aws_secret_access_key = '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'
  config.aws_rds_home_path = '/opt/aws/apitools/rds'
  config.java_home_path = '/usr/lib/jvm/jre'
  config.aws_bin_path = '/usr/local/bin'
  config.tmp_dir = Rails.root.join('tmp')
  config.logger = Logger.new(STDOUT)
end

Usage

Build DB backup and push to S3:

RdsDbBackup::Factory::Build.new('your_database_name').perform

Contributing

  1. Fork it ( https://github.com/kurbaitis/rds_db_backup/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request