No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
done
lib
tmp
.gitignore
README
wfbackup.rb

README

Backup Script for backing up to amazon s3 from disk and mysql

Requires the following gems:

rio aws-s3 sequel inifile


Usage:

First, edit config/database.cnf and config/config.rb

config/database.cnf holds login information for mysql. 
If you specify the root password here, the script will backup all databases. 
If you specify just a user account, you must use the -s flag to specify databases to backup, e.g. ./wfbackup -s mydb1,mydb2

config/config.rb holds Amazon S3 configuration, as well as a list of directories to archive. 

Usage: wfbackup.rb [options]
    -v, --[no-]verbose               Run verbosely
    -d, --databases                  Backup Database Files
    -s, --specific DB1,DB2,DB3       Backup specific databases rather than all.
    -u, --upload                     Upload files in done to s3
    -c, --cleanup [DAYS]             Remove files from S3 older than DAYS
    -a, --archive                    Archive Directories specified in config
    -f, --full                       Full Run. Same as -d -u -c
    -h, --help                       Show this message

Example crontab entry

44 14 * * * cd /wfbackup/install/path && /opt/bin/ruby /wfbackup/install/path/wfbackup.rb -f

to do a full backup and cleanup