Skip to content

A simple Ruby backup solution for MySQL & MongoDB databases, file directories, and single files to Amazon S3.

License

Notifications You must be signed in to change notification settings

insiders/simple-s3-backup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple S3 Backup

A simple Ruby script to back up MySQL databases, MongoDB databases, full directories, and groups of single files to Amazon S3 (Simple Storage Service).

Steps for using:

  1. Set up an Amazon S3 account: http://aws.amazon.com/s3/
  2. Install the gems via Bundler, or install the gems listed in Gemfile manually.
  3. Rename settings-sample.rb to settings.rb
  4. In settings.rb, fill in specific command paths, your Amazon API credentials, a bucket name, MySQL login info & databases, and any directories you want backed up. Just comment out the constants for backups you don't want to run.
  5. Set the script to run with cron - I have mine run every night, like so:

15 3 * * * /usr/bin/ruby /home/username/backups/simple-s3-backup.rb

To do:

  1. Split daily archives into separate directories in the bucket? Would be helpful for those with lots of files, and lots of days
  2. Support buckets in other regions than US East (N. Virginia)

About

A simple Ruby backup solution for MySQL & MongoDB databases, file directories, and single files to Amazon S3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%