NewBackup

Backs up an RDS instance, saving the backup in an S3 bucket. Runs an obfuscation script on the backup, saving that in an S3 bucket as "clean".

Installation

Add this line to your application's Gemfile:

gem 'new_backup'

And then execute:

$ bundle

Or install it yourself as:

$ gem install new_backup

Usage

$ new_backup [options] config-file

Configuration

The config-file on the command line needs to contain the following:

fog_timeout: (in seconds)
dump_directory: (directory to save files)
dump_ttl: (number of backups to keep)
aws_region: 
db_instance_type: 
timestamp_format: (strftime format string, no spaces for extra goodness)
rds_instance_id: (AWS RDS instance to back up)
db_subnet_group_name: (AWS RDS Subnet Group)
backup_bucket: (AWS S3 bucket to contain the raw backups)
s3_bucket: (AWS S3 bucket to contain the cleaned (obfuscated) backups)
s3_prefix: (Prefix, aka "subdirectory", to store backups in)
aws_s3_region: (AWS S3 region to use for saving)
mysql_username: (user name of data base)
mysql_database: (data base in RDS instance to back up)
mysql_password: (password for user)
obfuscate_script: (path to script to run to obfuscate the database)
datadog_apikey: (Datadog API key to use to report progress and errors)
aws_access_key_id: (Your AWS access key)
aws_secret_access_key: (Your AWS secret key)

The file sample-config.yml can be modified to your suiting.

Contributing

  1. Fork it
  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 new Pull Request