Skip to content
No description or website provided.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
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
Something went wrong with that request. Please try again.