Simple Ruby script to backup a MySql database to Subversion
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
dbbackup

README

NAME
	dbbackup -- back up a MySQL database in a Rails environment.

SYNOPSIS
	dbbackup <environment> [--mysqldump-path=</full/path/to/mysqldump>] [--no-gzip] [--no-svn]

DESCRIPTION
    By default, dbbackup gets the DB info from config/database.yml, dumps and gzips it into "<Rails Root>/db/dump_<environment>.sql.gz",
	and	adds/commits that to Subversion.
	
	
	The following parameters are available:
	<environment> 			Required, must be defined in config/database.yml
	--mysqldump-path=		If mysqldump isn't in PATH or has a different name than "mysqldump" (eg, some OS X installs use "mysqldump5")
	--no-gzip				Don't gzip the output file
	--no-svn				Don't commit the output file to Subversion			
	
EXAMPLES
	Create 'db/dump_production.sql.gz' and commit it to Subversion (if it's a new file, add it to Subversion and then commit)
		
		dbbackup production		

	Create 'db/dump_development.sql' (not zipped) and don't commit to Subversion. Use mysqldump at /usr/local/mysql/bin/mysqldump
	
		dbbackup development --mysqldump-path=/usr/local/mysql/bin/mysqldump --no-gzip --no-svn