= Backup == What is "Backup"? “Backup” is a RubyGem, written for Ruby on Rails. It's main purpose is to Backup any files to Amazon S3 or any remotely accessible server through SSH (SCP). It supports database and regular file backups. On top of that, it's extremely easy to set up. Backup will provide a generator script that will place all necessary files inside your Rails application. Two of which, are “yaml” configuration files. Using just these two files to configure a backup for database formats such as a MySQL, SQLite3 or any Assets folder. Setting up “Backup” takes only about a minute or two! === Backup makes use of two storage methods: - Amazon S3 - Any Remote Server You Can Access Through "SSH" === Currently it supports these adapters: - SQLite3 - MySQL - Assets/Folders (and Sub Folders) of Assets (Think of: Documents, Images, Etc.) === Your database type not on the list? - Custom Custom enables you to, regardless whether "Backup" supports your database type or not, to still enable you to make backups and benefit from the other features! There is just one thing you must do yourself inside one of the configuration files that Backup provides, and that is (assuming you know how to create a SQL dump through the command line for your database type), to actually create that command. If you don't how, you can probably find out how when searching through "google". Usually, it takes just "one line" to make a SQL dump, regardless of what database type we're talking about. So now, if you know that particular command to generate that SQL dump for your database, you're practically set to benefit from "Backup"! ==== Again, whether "Backup" has an adapter that supports your database or not, ==== if you are able to generate the SQL dump through command line, you will still benefit from the following: - Backup Archiving - Backup Compression - Backup Encryption (see below) - Backup Cleaning (see below) - Backup Transfer to S3 - Backup Transfer through SSH(SCP) to any remote server The only difference is that you now have to know how to produce a SQL dump yourself. Here's an example of the PostgreSQL command: pg_dump -U {user-name} {source_db} -f {dumpfilename.sql} So, after you experimented using the command you found, and see it works, you just copy that 'working command' inside the configuration files in a special section, and you're set to use it with "Backup" and benefit from the other features! === Encryption Backup also provides encryption. Adding a single line to one of the configuration files will enable encryption for your backups! This is what that line looks like: encrypt: my_secret_password Now all backups will be encrypted with the specified password. === Backup Cleaning Backup has the ability to clean up old backup files. If you don't feel the need to have more than 120 backups on your S3 account then you can easily specify so! It's as simple as adding this line to your configuration file. (or rather, uncommenting it) keep_backups: 120 It will now automagically remove the oldest backup from for example, S3, when the 121st backup gets uploaded. == Why? - I wanted a simple Backup Gem for Rails - I wanted minimum and easy configuration - I wanted it to take less than 2 minutes to set up - I wanted it to support (AT LEAST) both SQLite3 as well as MySQL - I wanted it to support an additional (custom) adapter incase the database type isn't SQLite3 or MySQL - I wanted it to support compression - I wanted it to support archiving - I wanted it to support encryption - I wanted to be able to store my files on my private backup server and on Amazon S3 - I wanted it to be able to automatically remove old backups to keep S3/backup server costs low ==== Setting up Backup takes me about 1-2 minutes and it's really easy! == Interested in trying out Backup? === Check out the following Wiki pages: === Installation http://wiki.github.com/meskyanichi/backup/installation === Getting started http://wiki.github.com/meskyanichi/backup/getting-started === Rake Tasks http://wiki.github.com/meskyanichi/backup/rake-tasks === Automatic Backups http://wiki.github.com/meskyanichi/backup/automatic-backups === Capistrano Recipes http://wiki.github.com/meskyanichi/backup/capistrano-recipes === Capistrano, Whenever! http://wiki.github.com/meskyanichi/backup/capistrano-whenever === Understanding "The Backup Database" http://wiki.github.com/meskyanichi/backup/the-backup-database === Trouble Shooting http://wiki.github.com/meskyanichi/backup/troubleshooting === Requirements http://wiki.github.com/meskyanichi/backup/requirements === Resources http://wiki.github.com/meskyanichi/backup/resources === Requests If anyone wishes to see support for PostgreSQL or any other database format, please send me a message! === Suggestions? Send me a message! Fork the project! Help out! :) === Found a Bug? Report it! http://github.com/meskyanichi/backup/issues === Copyright Copyright (c) 2009 Michael van Rooijen | Final Creation. See LICENSE for details.